@ -56,6 +56,7 @@ public class ServerSetting implements SimpleListItem {
@@ -56,6 +56,7 @@ public class ServerSetting implements SimpleListItem {
private final boolean alarmOnFinishedDownload ;
private final boolean alarmOnNewTorrent ;
private final boolean ssl ;
private final boolean localSsl ;
private final boolean sslTrustAll ;
private final String sslTrustKey ;
private final String excludeFilter ;
@ -83,7 +84,7 @@ public class ServerSetting implements SimpleListItem {
@@ -83,7 +84,7 @@ public class ServerSetting implements SimpleListItem {
* @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 ,
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 ,
boolean alarmOnFinishedDownload , boolean alarmOnNewTorrent , String excludeFilter , String includeFilter ,
boolean isAutoGenerated ) {
@ -96,6 +97,7 @@ public class ServerSetting implements SimpleListItem {
@@ -96,6 +97,7 @@ public class ServerSetting implements SimpleListItem {
this . localNetwork = localNetwork ;
this . port = port ;
this . ssl = ssl ;
this . localSsl = localSsl ;
this . sslTrustAll = sslTrustAll ;
this . sslTrustKey = sslTrustKey ;
this . folder = folder ;
@ -155,6 +157,10 @@ public class ServerSetting implements SimpleListItem {
@@ -155,6 +157,10 @@ public class ServerSetting implements SimpleListItem {
return ssl ;
}
public boolean getLocalSsl ( ) {
return localSsl ;
}
public boolean getSslTrustAll ( ) {
return sslTrustAll ;
}
@ -305,6 +311,7 @@ public class ServerSetting implements SimpleListItem {
@@ -305,6 +311,7 @@ public class ServerSetting implements SimpleListItem {
}
String addressToUse = address ;
int portToUse = port ;
boolean sslEnable = ssl ;
if ( ! TextUtils . isEmpty ( localNetwork ) & & ! TextUtils . isEmpty ( localAddress ) & &
! TextUtils . isEmpty ( connectedToNetwork ) ) {
String [ ] localNetworks = localNetwork . split ( "\\|" ) ;
@ -312,11 +319,12 @@ public class ServerSetting implements SimpleListItem {
@@ -312,11 +319,12 @@ public class ServerSetting implements SimpleListItem {
if ( connectedToNetwork . equals ( network ) ) {
addressToUse = localAddress ;
portToUse = localPort ;
sslEnable = localSsl ;
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 ,
alarmOnFinishedDownload , alarmOnNewTorrent , Integer . toString ( key ) , isAutoGenerated ) ;
}