You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

HttpRequestObject.cs 1.4 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System.Collections.Generic;
  2. namespace Shadowsocks.Interop.V2Ray.Transport.Header.Http
  3. {
  4. public class HttpRequestObject
  5. {
  6. public string Version { get; set; }
  7. public string Method { get; set; }
  8. public List<string> Path { get; set; }
  9. public Dictionary<string, List<string>> Headers { get; set; }
  10. public HttpRequestObject()
  11. {
  12. Version = "1.1";
  13. Method = "GET";
  14. Path = new()
  15. {
  16. "/",
  17. };
  18. Headers = new()
  19. {
  20. ["Host"] = new()
  21. {
  22. "www.baidu.com",
  23. "www.bing.com",
  24. },
  25. ["User-Agent"] = new()
  26. {
  27. "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36",
  28. "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/53.0.2785.109 Mobile/14A456 Safari/601.1.46",
  29. },
  30. ["Accept-Encoding"] = new()
  31. {
  32. "gzip, deflate",
  33. },
  34. ["Connection"] = new()
  35. {
  36. "keep-alive",
  37. },
  38. ["Pragma"] = new()
  39. {
  40. "no-cache",
  41. },
  42. };
  43. }
  44. }
  45. }