'Java Socks5 Proxy Authentication
public void setProxy(){
if(WebViewFeature.isFeatureSupported(WebViewFeature.PROXY_OVERRIDE)) {
ProxyConfig proxyConfig = new ProxyConfig.Builder()
. addProxyRule("123.123.123.123:8080")
. addDirect().build();
ProxyController.getInstance().setProxyOverride(proxyConfig, new Executor() {
@Override
public void execute(Runnable command) {
//do nothing
}
}, new Runnable() {
@Override
public void run() {
Log.w(TAG, "WebView");
}
});
}
}
myWebView.setWebViewClient(new WebViewClient(){
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {
handler.proceed("user", "pass");
}
});
socks proxy connects without using password. But this code is not working for username - password authentication. It only works for HTTPS proxy. What should I do
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
