test2055 1.2 KB

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