PropertyClass contextConfiguration = ContextHolder.getContext().getConfig();
if (getRequestingProtocol().startsWith("SOCKS")) {
user = contextConfiguration.retrieveProperty(new ContextKey("proxies.socksProxyUser"));
pass = contextConfiguration.retrieveProperty(new ContextKey("proxies.socksProxyPassword"));
} else {
user = contextConfiguration.retrieveProperty(new ContextKey("proxies.http.proxyUser"));
pass = contextConfiguration.retrieveProperty(new ContextKey("proxies.http.proxyPassword"));
}
} catch (Exception e) {
log.error("Failed to get proxy authentication details.");
return null;