We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example shows to use socks5_pass but you need to use socks5_password as key.
Also you cannot concat a binary like this:
{<<?VERSION, 1, ?USERPASS, (byte_size(User)), User, (byte_size(Password)), Password>>, ?USERPASS}
You need to specifiy User/binary and Password/binary or its a bad arg error.
Infact the whole auth is broken, it needs to be by spec:
handshake(Socket, Options) when is_port(Socket) -> User = get_value(socks5_user, Options, <<>>), Password = get_value(socks5_pass, Options, <<>>), {Greeting, AuthMethod} = if User /= <<>>, Password /= <<>> -> {<<5, 1, 2>>, 2}; true -> {<<5, 1, 0>>, 0} end, ok = gen_tcp:send(Socket, Greeting), case gen_tcp:recv(Socket, 2, 10000) of {ok, <<5, 2>>} -> UserLen = byte_size(User), PassLen = byte_size(Password), AuthReq = <<1, UserLen, User/binary, PassLen, Password/binary>>, ok = gen_tcp:send(Socket, AuthReq), case gen_tcp:recv(Socket, 2, 10000) of {ok, <<1,0>>} -> ok end; {ok, <<5, 0>>} -> ok; {ok, <<5, 16#FF>>} -> {error, unacceptable}; {error, Reason} -> {error, Reason} end.
You cant send the User/Pass along with the auth request that will break some socks5 servers state machines.
The text was updated successfully, but these errors were encountered:
Fixed in version 4.2.3
Sorry, something went wrong.
No branches or pull requests
Example shows to use socks5_pass but you need to use socks5_password as key.
Also you cannot concat a binary like this:
You need to specifiy User/binary and Password/binary or its a bad arg error.
Infact the whole auth is broken, it needs to be by spec:
You cant send the User/Pass along with the auth request that will break some socks5 servers state machines.
The text was updated successfully, but these errors were encountered: