DefaultProxySelector proxySelector = new DefaultProxySelector();
Map<String, Map<String, String>> proxies = m_config.getProxySettings();
for (Map<String, String> proxy : proxies.values()) {
//The fields are user, pass, host, port, nonProxyHosts, protocol.
String nonProxyHosts = proxy.get("nonProxyHosts");
Proxy proxyObj = new Proxy(proxy.get("protocol"),
proxy.get("host"),
toInt(proxy.get("port")),
getAuthentication(proxy)
);
proxySelector.add(proxyObj, nonProxyHosts);