I'm currently using httpjob to do a poststring to a server.
However, one of my clients has to use a SOCKS5 proxy server for all his network traffic.
I'd like httpjob to tell the server name, userid and password to use for the proxy connection, but "out of the box" okhttp in B4J doesn't seem to support this?
I've found some solutions on the forum for http(s) proxies, but not for SOCK5 proxies. Any help here please?
Hi all, I'm trying to deploy one of my sw in a very strictly controlled LAN where everything should pass through a proxy. They ask me to integrate the ability to make use of their proxy in my sw. What should I do? As an example of data transmission, I have: Dim pJob As HttpJob...
Platforms: B4J (1st post) and B4A (2nd post) This code creates an SSL socket that doesn't verify the server certificate. Depends on jNet / Net and JavaObject libraries. Private Sub CreateTrustAllSSLSocket (EventName As String) As Socket Dim socket As Socket socket.Initialize(EventName)...
Yes. The code in the first post seems to be for http proxies. I'm dealing with a socks proxy here.
Edit: also found this online, not sure if that's the reason why it's not working:
B4X:
JDK HttpClient doesn't support socks proxies, only HTTP(S) proxies, even though types like java.net.Proxy.Type.SOCKS do exist. This problem isn't documented at all in the Java JDK, which causes Java to silently disregard the socks proxy when you try to use it, by using a non-proxy connection.
This problem is reported as a bug in 2018 to OpenJDK, but hasn't been fixed yet: https://bugs.openjdk.java.net/browse/JDK-8214516
But I get a java.net.SocketException: SOCKS : authentication failed. If I'm correct you need to write an authenticator routine in Java? Who can help me with this? Should only be a couple of lines I guess...