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: Thu, 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: Thu, 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 55 <command> 56http://www.example.com.2055/2055 --connect-to ::connect.example.com.2055:%HTTPPORT -x %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT 57</command> 58</client> 59 60# 61# Verify data after the test has been "shot" 62<verify> 63<strip> 64^User-Agent:.* 65</strip> 66<proxy> 67CONNECT connect.example.com.2055:%HTTPPORT HTTP/1.1 68Host: connect.example.com.2055:%HTTPPORT 69Proxy-Connection: Keep-Alive 70 71</proxy> 72<protocol> 73GET /2055 HTTP/1.1 74Host: www.example.com.2055 75Accept: */* 76 77</protocol> 78 79</verify> 80</testcase> 81