xref: /curl/tests/data/test2055 (revision 3fd80c7b)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP CONNECT
7HTTP proxy
8proxytunnel
9CURLOPT_CONNECT_TO
10SOCKS5
11</keywords>
12</info>
13
14#
15# Server-side
16<reply>
17<connect>
18HTTP/1.1 200 Connection established
19
20</connect>
21
22<data>
23HTTP/1.1 200 OK
24Date: Tue, 09 Nov 2010 14:49:00 GMT
25Content-Length: 3
26Content-Type: text/plain
27
28OK
29</data>
30
31<datacheck>
32HTTP/1.1 200 Connection established
33
34HTTP/1.1 200 OK
35Date: Tue, 09 Nov 2010 14:49:00 GMT
36Content-Length: 3
37Content-Type: text/plain
38
39OK
40</datacheck>
41</reply>
42
43#
44# Client-side
45<client>
46<server>
47http
48http-proxy
49socks5
50</server>
51<name>
52Connect to specific host via SOCKS proxy and HTTP proxy (switch to tunnel mode automatically)
53</name>
54<features>
55proxy
56</features>
57<command>
58http://www.example.com.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT
59</command>
60</client>
61
62#
63# Verify data after the test has been "shot"
64<verify>
65<proxy>
66CONNECT connect.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
67Host: connect.example.com.%TESTNUMBER:%HTTPPORT
68User-Agent: curl/%VERSION
69Proxy-Connection: Keep-Alive
70
71</proxy>
72<protocol>
73GET /%TESTNUMBER HTTP/1.1
74Host: www.example.com.%TESTNUMBER
75User-Agent: curl/%VERSION
76Accept: */*
77
78</protocol>
79
80</verify>
81</testcase>
82