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 login/password fails after commit moving syntax check to startup #81

Closed
radosd opened this issue Apr 8, 2016 · 4 comments
Closed

Comments

@radosd
Copy link

radosd commented Apr 8, 2016

Hi,

latest commit 003765b "Move socks4 & socks5 login/password config syntax check to startup" broke my socks5 login/password connection.

previous output:

1460099005.884096 info redsocks.c:1157 redsocks_accept_client(...) [#####:59832->#####:22]: accepted
1460099006.083723 debug redsocks.c:365 redsocks_start_relay(...) [#####:59832->#####:22]: data relaying started
1460099007.258124 info redsocks.c:689 redsocks_drop_client(...) [#####:59832->#####:22]: connection closed

output after that commit:

1460098626.772322 info redsocks.c:1157 redsocks_accept_client(...) [#####:59746->#####:22]: accepted
1460098626.846419 notice socks5.c:288 socks5_read_reply(...) [#####:59746->#####:22]: Socks5 server status: connection not allowed by ruleset (2)
1460098626.846512 info redsocks.c:703 redsocks_drop_client(...) [#####:59746->#####:22]: dropping client (R/W), relay (R/W)

my config:

base {
    daemon = on;
    redirector = iptables;

    log_debug = on;
    log_info = on;

    log = "file:/var/log/redsocks.log";
}
redsocks {
        local_ip = 127.0.0.1;
        local_port = 2085;
        ip = #####;
        port = 1080;
        type = socks5;
        login = #####;
        password = #####;
}
@darkk
Copy link
Owner

darkk commented Apr 8, 2016

That's strange, I can't reproduce the issue. Does redsocks start like that:

$ ./redsocks -c foobar.conf 
1460110305.884014 warning socks5.c:87 socks5_instance_init(...) Socks5 needs either both login and password or none of them
1460110305.884116 notice main.c:164 main(...) redsocks started

or like that:

$ ./redsocks -c foobar.conf 
1460110184.323101 notice main.c:164 main(...) redsocks started

?

Please, tell me exact version returned by redsocks -v.

@radosd
Copy link
Author

radosd commented Apr 8, 2016

it starts without error:

1460116917.549437 notice main.c:168 main(...) redsocks goes down
1460116972.663233 notice main.c:164 main(...) redsocks started
1460116992.905464 info redsocks.c:1168 redsocks_accept_client(...) [#####:35362->#####:22]: accepted
1460116992.980588 notice socks5.c:288 socks5_read_reply(...) [#####:35362->#####:22]: Socks5 server status: connection not allowed by ruleset (2)
1460116992.980679 info redsocks.c:714 redsocks_drop_client(...) [#####:35362->#####:22]: dropping client (R/W), relay (R/W)

I can maybe try to reproduce using different socks server..

last working version (found via bisect):

redsocks.git/release-0.4-43-g3c7f635
Built with libevent-2.1.5-beta
Runs  with libevent-2.1.5-beta

non-working version:

redsocks.git/release-0.4-45-g4521797
Built with libevent-2.1.5-beta
Runs  with libevent-2.1.5-beta

@darkk
Copy link
Owner

darkk commented Apr 8, 2016

Can you capture network packets between redsocks and the proxy using tcpdump or wireshark and send .pcap file with non-mangled configuration file to my e-mail?

Also, another pcap with old redsocks version may be helpfull too.

@darkk darkk closed this as completed in f94a981 Apr 8, 2016
@darkk
Copy link
Owner

darkk commented Apr 8, 2016

Nailed the typo! Thank you! I was afraid that it's some sort of memory corruption, that's why I asked for pcap to verify that all bytes are ok.

I should add positive test-case :)

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