-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Got java.net.ProtocolException: Unexpected status line: '� HTTP/1.1 200 OK' while SOCKS5 return command response with address type 'DOMAIN' #5549
Comments
Here is the tcpdump traffics follow tcp stream with port 1080, printed in Hex Dump format
The response line is 05 00 00 03 09 31 32 37 2e 30 2e 30 2e 31 e7 2e According to https://tools.ietf.org/html/rfc1928, section 6. Replies
|
Here is another tcpdump traffics, the socks server was 'SSH -vHD 1080'
|
Current behavior is only response with address type 0x01, the OkHttpClient can works as expected. Once the socks server response with type 0x03, no matter it followed by a non-empty string domain like '05 00 00 03 09 31 32 37 2e 30 2e 30 2e 31 e7 2e', nor an empty string like '05 00 00 03 00 00 00', it all failed by exception
|
Just noticed Socks5ProxyHandler, so avoiding extra deps for now. |
Is this related to #3662 , I still got the error: |
I also encountered this issue on an Android app when the address type of socks server is IPV6. The root cause is I reported this bug to AOSP team and they have help to import the change from openjdk. So if you encountered this issue on Android, there are 2 workarounds:
|
Nice result |
Here is my test case
The SocksServer comes from Netty's sample
https://github.com/netty/netty/blob/4.1/example/src/main/java/io/netty/example/socksproxy/SocksServer.java
And I just make it can start programatically
The text was updated successfully, but these errors were encountered: