From ccb747106e47a107a116d220606a80bfc9439b9a Mon Sep 17 00:00:00 2001 From: klzgrad Date: Mon, 19 Apr 2021 22:41:24 +0800 Subject: [PATCH] Test SOCKS proxy authentication --- tests/basic.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/basic.sh b/tests/basic.sh index b3dd95ec3b..7eec9a40a8 100755 --- a/tests/basic.sh +++ b/tests/basic.sh @@ -62,6 +62,18 @@ test_naive 'Trivial - listen no host' socks5h://127.0.0.1:60301 \ test_naive 'Trivial - listen no port' socks5h://127.0.0.1:1080 \ '--log --listen=socks://127.0.0.1' +test_naive 'Trivial - auth' socks5h://user:pass@127.0.0.1:1080 \ + '--log --listen=socks://user:pass@127.0.0.1' + +test_naive 'Trivial - auth with special chars' socks5h://user:^@127.0.0.1:1080 \ + '--log --listen=socks://user:^@127.0.0.1' + +test_naive 'Trivial - auth with special chars' socks5h://^:^@127.0.0.1:1080 \ + '--log --listen=socks://^:^@127.0.0.1' + +test_naive 'Trivial - auth with empty pass' socks5h://user:@127.0.0.1:1080 \ + '--log --listen=socks://user:@127.0.0.1' + test_naive 'SOCKS-SOCKS' socks5h://127.0.0.1:60401 \ '--log --listen=socks://:60401 --proxy=socks://127.0.0.1:60402' \ '--log --listen=socks://:60402'