2021年3月20日星期六

Set Proxy on WebView for API 26

firstly I have read all the answers written about questions similar to my question. But none of the solutions helped me.

this is my Webview Code

mWebView.loadUrl(siteUrl);         mWebView.getSettings().setUserAgentString(ua);        mWebView.getSettings().setJavaScriptEnabled(true);        mWebView.getSettings().setDomStorageEnabled(true);        mWebView.setWebViewClient(new mWebViewClient());  

i tried to use this class https://gist.github.com/madeye/2297083

And I used this code to set proxy

ProxySettings.setProxy(getApplicationContext(), "x.x.x.x", 8080);  

I also tested this class https://gist.github.com/WanghongLin/50032a4d3933960454a7

and

WebViewHttpProxy.setProxy(mWebView,"x.x.x.x",8080);  

But none of them worked. and proxy was not applied when i ran the app

https://stackoverflow.com/questions/66726389/set-proxy-on-webview-for-api-26 March 21, 2021 at 04:55AM

没有评论:

发表评论