summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/satellitedaemon/App.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/satellitedaemon/App.java')
-rw-r--r--src/main/java/org/openslx/satellitedaemon/App.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/App.java b/src/main/java/org/openslx/satellitedaemon/App.java
index 3fe143a..cf99ba0 100644
--- a/src/main/java/org/openslx/satellitedaemon/App.java
+++ b/src/main/java/org/openslx/satellitedaemon/App.java
@@ -11,6 +11,7 @@ import java.security.interfaces.RSAPublicKey;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;
+import org.openslx.network.ProxyConfiguration;
import org.openslx.network.StaticProxyAuthenticator;
import org.openslx.network.StaticProxySelector;
import org.openslx.satellitedaemon.filetransfer.FileDownloadWorker;
@@ -123,7 +124,7 @@ public class App
log.info( "Configure proxy settings ..." );
// Configuring proxy settings. First read options from config file.
- String proxyConfiguration = Globals.getProxyConf();
+ String proxyConfiguration = ProxyConfiguration.getProxyConf();
if ( ( proxyConfiguration.equals( "AUTO" ) ) || ( proxyConfiguration.equals( "" ) ) ) {
log.info( "Configuring proxy settings automatically..." );
// Configuring proxy settings automatically.
@@ -137,20 +138,20 @@ public class App
} else if ( proxyConfiguration.equals( "YES" ) ) {
// Take the proxy settings from config file.
// First check if one of the following necessary options might not be set.
- if ( Globals.checkProxySettings() ) {
- String proxyAddress = Globals.getProxyAddress();
- int proxyPort = Globals.getProxyPort();
+ if ( ProxyConfiguration.checkProxySettings() ) {
+ String proxyAddress = ProxyConfiguration.getProxyAddress();
+ int proxyPort = ProxyConfiguration.getProxyPort();
// Configure proxy.
Proxy proxy = new Proxy( Proxy.Type.SOCKS, new InetSocketAddress( proxyAddress, proxyPort ) );
StaticProxySelector sPS = new StaticProxySelector( proxy );
ProxySelector.setDefault( sPS );
- if ( ! ( Globals.getProxyUsername().equals( "" ) ) && ! ( Globals.getProxyPassword().equals( "" ) ) ) {
+ if ( ! ( ProxyConfiguration.getProxyUsername().equals( "" ) ) && ! ( ProxyConfiguration.getProxyPassword().equals( "" ) ) ) {
log.info( "Configuring proxy settings manually WITH authentication..." );
// use Proxy with authentication.
- String proxyUname = Globals.getProxyUsername();
- String proxyPass = Globals.getProxyPassword();
+ String proxyUname = ProxyConfiguration.getProxyUsername();
+ String proxyPass = ProxyConfiguration.getProxyPassword();
// Set authentication.
StaticProxyAuthenticator sPA = new StaticProxyAuthenticator( proxyUname, proxyPass );