【发布时间】:2021-08-12 11:39:46
【问题描述】:
如何添加用户密码?我的代理使用用户密码进行身份验证 代码 androidx.webkit:1.4.0
//my code need to add user password
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");
}
});
}
}
【问题讨论】: