@@ -89,7 +89,7 @@
Specify ban list file, one IP address per line. It is not recommended to statically ban any IP addresses unless you absolutely need to. Banning IPs often excludes the most vulnerable users who are forced to operate entirely behind Tor or other anonymity networks
-
+
diff --git a/src/app/pages/settings/settings.component.ts b/src/app/pages/settings/settings.component.ts
index 96475ba..7bb32d2 100644
--- a/src/app/pages/settings/settings.component.ts
+++ b/src/app/pages/settings/settings.component.ts
@@ -17,6 +17,7 @@ export class SettingsComponent {
public currentSettings: DaemonSettings;
public banListUrl: string = '';
+ public remoteBanList: boolean = false;
public get validBanListUrl(): boolean {
if (this.banListUrl == '') {
@@ -374,7 +375,7 @@ export class SettingsComponent {
public downloadingBanListFile: boolean = false;
public async downloadBanListFile(): Promise {
- if (!this.currentSettings.remoteBanList) {
+ if (!this.remoteBanList) {
return;
}
@@ -382,14 +383,17 @@ export class SettingsComponent {
try {
const destination = await this.electronService.selectFolder();
- const filePath = await this.electronService.downloadFile(this.banListUrl, destination);
- if (!filePath.endsWith('.txt')) {
- throw new Error("Downloaded file doesn't seem to be a valid ban list txt file");
+ if (destination != '') {
+ const filePath = await this.electronService.downloadFile(this.banListUrl, destination);
+
+ if (!filePath.endsWith('.txt')) {
+ throw new Error("Downloaded file doesn't seem to be a valid ban list txt file");
+ }
+
+ this.currentSettings.banList = filePath;
+ this.remoteBanList = false;
}
-
- this.currentSettings.banList = filePath;
- this.currentSettings.remoteBanList = false;
}
catch (error: any) {
console.error(error);
diff --git a/src/common/DaemonSettings.ts b/src/common/DaemonSettings.ts
index 871ba6e..4ef899a 100644
--- a/src/common/DaemonSettings.ts
+++ b/src/common/DaemonSettings.ts
@@ -98,7 +98,6 @@ export class DaemonSettings {
public anonymousInbound: string = '';
public banList: string = '';
- public remoteBanList: boolean = false;
public hideMyPort: boolean = false;
public noSync: boolean = false;