Communicating with an HTTP Proxy via a .NET TcpClient

前端 未结 3 2012
-上瘾入骨i
-上瘾入骨i 2020-12-24 09:39

How can I communicate through an HTTP proxy with TcpClient in C#, kind of like WebProxy when using HttpWebResponse?

3条回答
  •  情话喂你
    2020-12-24 10:35

    If you go down to low-level socket programming, I'm pretty sure you'll need to write your own proxy client. If you're only dealing with the HTTP protocol, you're probably better off using HTTP-specific classes. If you need to do it with sockets, the HTTP spec describes the behavior of proxies reasonably well, so you could write your own client.

提交回复
热议问题