return new ProxySettings(proxyHost, proxyPort, proxyUserName, proxyPassword);
}
public static ProxySettings fromForgeConfiguration(Configuration configuration) {
Configuration proxyConfig = configuration.getScopedConfiguration(
ConfigurationScope.USER).subset("proxy");
if (proxyConfig != null && !proxyConfig.isEmpty())
{
return new ProxySettings(proxyConfig.getString(PROXY_CONFIG_HOST_KEY),
proxyConfig.getInt(PROXY_CONFIG_PORT_KEY), proxyConfig.getString(PROXY_CONFIG_USERNAME_KEY),
proxyConfig.getString(PROXY_CONFIG_PASSWORD_KEY));
}
else
{
return null;
}