From 54c784556e3579c24de9cc79e435e8bbaa4f6c81 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 8 Apr 2019 19:43:48 +0200 Subject: test: make tests and test scripts use socksd for SOCKS Make all SOCKS tests use socksd instead of ssh. --- tests/data/Makefile.inc | 2 +- tests/data/test702 | 4 +++ tests/data/test703 | 4 +++ tests/data/test711 | 3 +-- tests/data/test716 | 44 +++++++++++++++++++++++++++++++++ tests/data/test717 | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 tests/data/test716 create mode 100644 tests/data/test717 (limited to 'tests/data') diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index a8c211191..35eaccef9 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -86,7 +86,7 @@ test643 test644 test645 test646 test647 test648 test649 test650 test651 \ test652 test653 test654 test655 test656 test658 test659 \ \ test700 test701 test702 test703 test704 test705 test706 test707 test708 \ -test709 test710 test711 test712 test713 test714 test715 \ +test709 test710 test711 test712 test713 test714 test715 test716 test717 \ \ test800 test801 test802 test803 test804 test805 test806 test807 test808 \ test809 test810 test811 test812 test813 test814 test815 test816 test817 \ diff --git a/tests/data/test702 b/tests/data/test702 index 36af71328..9fc954a02 100644 --- a/tests/data/test702 +++ b/tests/data/test702 @@ -12,6 +12,10 @@ FAILURE +# 91 is socks4 failure + +response 91 + # Client-side diff --git a/tests/data/test703 b/tests/data/test703 index 4aa89b46a..3c0fb314d 100644 --- a/tests/data/test703 +++ b/tests/data/test703 @@ -12,6 +12,10 @@ FAILURE +# 1 is socks5 failure + +response 1 + # Client-side diff --git a/tests/data/test711 b/tests/data/test711 index 6e9a2a262..3efbb7977 100644 --- a/tests/data/test711 +++ b/tests/data/test711 @@ -16,7 +16,6 @@ all_proxy silly content -backendport passthru @@ -28,7 +27,7 @@ ftp socks5 -all_proxy=socks5://%HOSTIP:%SOCKSPORT +all_proxy=socks5://%HOSTIP:%SOCKSPORT FTP fetch with all_proxy set to socks5 diff --git a/tests/data/test716 b/tests/data/test716 new file mode 100644 index 000000000..db61dcb39 --- /dev/null +++ b/tests/data/test716 @@ -0,0 +1,44 @@ + + + +HTTP +SOCKS5 +all_proxy + + +# +# Server-side + +# method 2 is SOCKS5 asking for user+password + +method 2 + + + +# +# Client-side + + +socks5 + + +http + + +SOCKS5 proxy with too long user name + + +# it should never connect to the target server + +http://hohoho.example.com:99/716 -x socks5://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:b@%HOSTIP:%SOCKSPORT + + + +# +# Verify data after the test has been "shot" + + +43 + + + diff --git a/tests/data/test717 b/tests/data/test717 new file mode 100644 index 000000000..35392443e --- /dev/null +++ b/tests/data/test717 @@ -0,0 +1,65 @@ + + + +HTTP +SOCKS5 +all_proxy + + +# +# Server-side + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT +ETag: "21025-dc7-39462498" +Accept-Ranges: bytes +Content-Length: 6 +Connection: close +Content-Type: text/html +Funny-head: yesyes + +-foo- + +# method 2 is SOCKS5 asking for user+password + +method 2 +user uz3r +password p4ssworm +backendport %HTTPPORT + + + +# +# Client-side + + +socks5 +http + + +SOCKS5 proxy auth + + +# target a port that won't work without the SOCKS magic + +http://%HOSTIP:1/717 -x socks5://uz3r:p4ssworm@%HOSTIP:%SOCKSPORT + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /717 HTTP/1.1 +Host: %HOSTIP:1 +Accept: */* + + + + -- cgit v1.2.3