test2055 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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: Tue, 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: Tue, 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. <features>
  47. proxy
  48. </features>
  49. <command>
  50. http://www.example.com.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT --preproxy socks5://%HOSTIP:%SOCKSPORT
  51. </command>
  52. </client>
  53. #
  54. # Verify data after the test has been "shot"
  55. <verify>
  56. <proxy>
  57. CONNECT connect.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  58. Host: connect.example.com.%TESTNUMBER:%HTTPPORT
  59. User-Agent: curl/%VERSION
  60. Proxy-Connection: Keep-Alive
  61. </proxy>
  62. <protocol>
  63. GET /%TESTNUMBER HTTP/1.1
  64. Host: www.example.com.%TESTNUMBER
  65. User-Agent: curl/%VERSION
  66. Accept: */*
  67. </protocol>
  68. </verify>
  69. </testcase>