|
|
@ -56,6 +56,7 @@ public class ServerSetting implements SimpleListItem { |
|
|
|
private final boolean alarmOnFinishedDownload; |
|
|
|
private final boolean alarmOnFinishedDownload; |
|
|
|
private final boolean alarmOnNewTorrent; |
|
|
|
private final boolean alarmOnNewTorrent; |
|
|
|
private final boolean ssl; |
|
|
|
private final boolean ssl; |
|
|
|
|
|
|
|
private final boolean localSsl; |
|
|
|
private final boolean sslTrustAll; |
|
|
|
private final boolean sslTrustAll; |
|
|
|
private final String sslTrustKey; |
|
|
|
private final String sslTrustKey; |
|
|
|
private final String excludeFilter; |
|
|
|
private final String excludeFilter; |
|
|
@ -83,7 +84,7 @@ public class ServerSetting implements SimpleListItem { |
|
|
|
* @param isAutoGenerated Whether this setting was generated rather than manually inputed by the user |
|
|
|
* @param isAutoGenerated Whether this setting was generated rather than manually inputed by the user |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public ServerSetting(int key, String name, Daemon type, String address, String localAddress, int localPort, String localNetwork, int port, |
|
|
|
public ServerSetting(int key, String name, Daemon type, String address, String localAddress, int localPort, String localNetwork, int port, |
|
|
|
boolean ssl, boolean sslTrustAll, String sslTrustKey, String folder, boolean useAuthentication, String username, |
|
|
|
boolean ssl, boolean localSsl, boolean sslTrustAll, String sslTrustKey, String folder, boolean useAuthentication, String username, |
|
|
|
String password, String extraPass, OS os, String downloadDir, String ftpUrl, String ftpPassword, int timeout, |
|
|
|
String password, String extraPass, OS os, String downloadDir, String ftpUrl, String ftpPassword, int timeout, |
|
|
|
boolean alarmOnFinishedDownload, boolean alarmOnNewTorrent, String excludeFilter, String includeFilter, |
|
|
|
boolean alarmOnFinishedDownload, boolean alarmOnNewTorrent, String excludeFilter, String includeFilter, |
|
|
|
boolean isAutoGenerated) { |
|
|
|
boolean isAutoGenerated) { |
|
|
@ -96,6 +97,7 @@ public class ServerSetting implements SimpleListItem { |
|
|
|
this.localNetwork = localNetwork; |
|
|
|
this.localNetwork = localNetwork; |
|
|
|
this.port = port; |
|
|
|
this.port = port; |
|
|
|
this.ssl = ssl; |
|
|
|
this.ssl = ssl; |
|
|
|
|
|
|
|
this.localSsl = localSsl; |
|
|
|
this.sslTrustAll = sslTrustAll; |
|
|
|
this.sslTrustAll = sslTrustAll; |
|
|
|
this.sslTrustKey = sslTrustKey; |
|
|
|
this.sslTrustKey = sslTrustKey; |
|
|
|
this.folder = folder; |
|
|
|
this.folder = folder; |
|
|
@ -155,6 +157,10 @@ public class ServerSetting implements SimpleListItem { |
|
|
|
return ssl; |
|
|
|
return ssl; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean getLocalSsl() { |
|
|
|
|
|
|
|
return localSsl; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean getSslTrustAll() { |
|
|
|
public boolean getSslTrustAll() { |
|
|
|
return sslTrustAll; |
|
|
|
return sslTrustAll; |
|
|
|
} |
|
|
|
} |
|
|
@ -305,6 +311,7 @@ public class ServerSetting implements SimpleListItem { |
|
|
|
} |
|
|
|
} |
|
|
|
String addressToUse = address; |
|
|
|
String addressToUse = address; |
|
|
|
int portToUse = port; |
|
|
|
int portToUse = port; |
|
|
|
|
|
|
|
boolean sslEnable = ssl; |
|
|
|
if (!TextUtils.isEmpty(localNetwork) && !TextUtils.isEmpty(localAddress) && |
|
|
|
if (!TextUtils.isEmpty(localNetwork) && !TextUtils.isEmpty(localAddress) && |
|
|
|
!TextUtils.isEmpty(connectedToNetwork)) { |
|
|
|
!TextUtils.isEmpty(connectedToNetwork)) { |
|
|
|
String[] localNetworks = localNetwork.split("\\|"); |
|
|
|
String[] localNetworks = localNetwork.split("\\|"); |
|
|
@ -312,11 +319,12 @@ public class ServerSetting implements SimpleListItem { |
|
|
|
if (connectedToNetwork.equals(network)) { |
|
|
|
if (connectedToNetwork.equals(network)) { |
|
|
|
addressToUse = localAddress; |
|
|
|
addressToUse = localAddress; |
|
|
|
portToUse = localPort; |
|
|
|
portToUse = localPort; |
|
|
|
|
|
|
|
sslEnable = localSsl; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return new DaemonSettings(name, type, addressToUse, portToUse, ssl, sslTrustAll, sslTrustKey, folder, |
|
|
|
return new DaemonSettings(name, type, addressToUse, portToUse, sslEnable, sslTrustAll, sslTrustKey, folder, |
|
|
|
useAuthentication, username, password, extraPass, os, downloadDir, ftpUrl, ftpPassword, timeout, |
|
|
|
useAuthentication, username, password, extraPass, os, downloadDir, ftpUrl, ftpPassword, timeout, |
|
|
|
alarmOnFinishedDownload, alarmOnNewTorrent, Integer.toString(key), isAutoGenerated); |
|
|
|
alarmOnFinishedDownload, alarmOnNewTorrent, Integer.toString(key), isAutoGenerated); |
|
|
|
} |
|
|
|
} |
|
|
|