Skip to content
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

socks5 proxy error #7

Closed
suconghou opened this issue Jun 5, 2018 · 6 comments
Closed

socks5 proxy error #7

suconghou opened this issue Jun 5, 2018 · 6 comments

Comments

@suconghou
Copy link

server

./wstunnel_linux_x64 --server wss://0.0.0.0:443 -v

client

 wstunnel -D 0.0.0.0:5566 wss://ws.feds.club:443 -v

client error and print log

Starting socks5 proxy ServerSettings {listenOn = 5566, bindOn = "0.0.0.0"}
DEBUG :: Socks5 authentification request ResponseAuth {version = 5, method = Login}
DEBUG :: Socks5 forward request Error writing log message: Data.Binary.Get.runGet at position 4: Data.Binary.Get(Alternative).empty
CallStack (from HasCallStack):
  error, called at libraries/binary/src/Data/Binary/Get.hs:342:5 in binary-0.8.3.0:Data.Binary.Get (original message: DEBUG :: Socks5 forward request wstunnel: Data.Binary.Get.runGet at position 4: Data.Binary.Get(Alternative).empty
CallStack (from HasCallStack):
  error, called at libraries/binary/src/Data/Binary/Get.hs:342:5 in binary-0.8.3.0:Data.Binary.Get
@erebe
Copy link
Owner

erebe commented Jun 5, 2018

Hello,

First, thanks for reporting it !

Are you using firefox ? If yes, when I tried to reproduce your issue I had also the same kind of errors (but instead of method = Login I had method = GSSAPI), so I suppose Firefox changed its behavior and is forcing by default an authentification, but I am not sure.

I will look into it this week, but in the mean time you can use google chrome.
For me with this version Google Chrome 67.0.3396.62 and starting chrome with google-chrome-stable --proxy-server="socks://localhost:5566" I can use the socks5 proxy

@suconghou
Copy link
Author

yes , I am using firefox. and I also test it with curl ,

curl myip.ipip.net -v -x socks5://127.0.0.1:5566

and also got error

* Rebuilt URL to: myip.ipip.net/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* SOCKS5 communication to myip.ipip.net:80
* SOCKS5 connect to IPv4 111.202.98.86 (locally resolved)
* Failed to receive SOCKS5 connect request ack.
* Closing connection 0
curl: (7) Failed to receive SOCKS5 connect request ack.

only with chrome . it works well

@erebe
Copy link
Owner

erebe commented Jun 5, 2018

ok, so that's my crappy implementation.
I will look into it :)

@erebe
Copy link
Owner

erebe commented Jun 6, 2018

Hi back,
you can download this version https://github.com/erebe/wstunnel/releases/tag/1.2 and it should work properly.
You only need to replace the wstunnel that is acting as the client

Regarding the why, I was not handling ipv4 connection methods but only domainname one. Firefox was using the 2nd one by default in earlier version, which changed now. In fact if you check the box "use dns through socks proxy' it will works properly. also curl myip.ipip.net -v -x socks5h://127.0.0.1:5566 notice the h after the 5 was working properly.

Now I handle both case so It should not matter.
I would a proper realease later this week (during the weekend most likely)

@suconghou
Copy link
Author

I tested it , It works fine . thank you !

@erebe
Copy link
Owner

erebe commented Jun 10, 2018

done

@erebe erebe closed this as completed Jun 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants