B4J Question Webview Proxy (on B4J)

Swiss

New Member
Hi,

Is there a way of specifying a Proxy server with webview loadurl? There are a few posts on the subject but they are all old posts and mainly about B4A.

Thanks in advance.
 

Swiss

New Member
Hi Erel,

Sorry yes I tried this and it isn't working. I have confirmed that the ProxyHost and ProxyPort strings have the specifiied IP and Port present and the UID/PWD will be null, as my Proxy accepts from my WAN IP address (no UID or PWD required). For the test I am accessing a whatsmyipaddress website and the returned IP is my WAN IP. Just to be clear I have the following in the code:-

Dim ProxyHost As String
Dim ProxyPort As Int
Dim ProxyUsername As String
Dim ProxyPassword As String
ProxyHost = "1.1.1.1"
ProxyPort = 11111
ProxyUsername = ""
ProxyPassword = ""
SetSystemProperty("http.proxyHost", ProxyHost )
SetSystemProperty("http.proxyPort", ProxyPort )
SetSystemProperty("http.proxyUser", ProxyUsername )
SetSystemProperty("http.proxyPassword", ProxyPassword )
The website is loaded using loadurl.

Within my code the proxy and port are set correctly and no errors are displayed, I know the Proxy works as I can manually set it via Chrome and all is fine. I am guessing that the webview is unaware that the proxy has been set...? Apologies in advance if this is a daft request for help but I haven't coded in 25 years....
 
Upvote 0
Top