test: make tests and test scripts use socksd for SOCKS

Make all SOCKS tests use socksd instead of ssh.
This commit is contained in:
Daniel Stenberg 2019-04-08 19:43:48 +02:00
parent 04fd67555c
commit 54c784556e
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 149 additions and 142 deletions

View file

@ -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 \

View file

@ -12,6 +12,10 @@ FAILURE
<reply>
<data>
</data>
# 91 is socks4 failure
<servercmd>
response 91
</servercmd>
</reply>
# Client-side

View file

@ -12,6 +12,10 @@ FAILURE
<reply>
<data>
</data>
# 1 is socks5 failure
<servercmd>
response 1
</servercmd>
</reply>
# Client-side

View file

@ -16,7 +16,6 @@ all_proxy
silly content
</data>
<servercmd>
backendport passthru
</servercmd>
</reply>
@ -28,7 +27,7 @@ ftp
socks5
</server>
<setenv>
all_proxy=socks5://%HOSTIP:%SOCKSPORT
all_proxy=socks5://%HOSTIP:%SOCKSPORT
</setenv>
<name>
FTP fetch with all_proxy set to socks5

44
tests/data/test716 Normal file
View file

@ -0,0 +1,44 @@
<testcase>
<info>
<keywords>
HTTP
SOCKS5
all_proxy
</keywords>
</info>
#
# Server-side
<reply>
# method 2 is SOCKS5 asking for user+password
<servercmd>
method 2
</servercmd>
</reply>
#
# Client-side
<client>
<server>
socks5
</server>
<features>
http
</features>
<name>
SOCKS5 proxy with too long user name
</name>
# it should never connect to the target server
<command>
http://hohoho.example.com:99/716 -x socks5://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:b@%HOSTIP:%SOCKSPORT
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<errorcode>
43
</errorcode>
</verify>
</testcase>

65
tests/data/test717 Normal file
View file

@ -0,0 +1,65 @@
<testcase>
<info>
<keywords>
HTTP
SOCKS5
all_proxy
</keywords>
</info>
#
# Server-side
<reply>
<data>
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-
</data>
# method 2 is SOCKS5 asking for user+password
<servercmd>
method 2
user uz3r
password p4ssworm
backendport %HTTPPORT
</servercmd>
</reply>
#
# Client-side
<client>
<server>
socks5
http
</server>
<name>
SOCKS5 proxy auth
</name>
# target a port that won't work without the SOCKS magic
<command>
http://%HOSTIP:1/717 -x socks5://uz3r:p4ssworm@%HOSTIP:%SOCKSPORT
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /717 HTTP/1.1
Host: %HOSTIP:1
Accept: */*
</protocol>
</verify>
</testcase>