HTTP Proxy server in C#

前端 未结 2 400
鱼传尺愫
鱼传尺愫 2021-01-05 11:00

My company is experimenting with writing a proxy server using the .NET Fx 3.5 and C#. From our research I have read that HttpListener is not a good candidate for a proxy se

2条回答
  •  甜味超标
    2021-01-05 11:13

    HttpListener is in .NET to provide a major building block for a simple HTTP server. Where simple includes not supporting high operation rates.

    Typically HTTP proxies need to be very low overhead to support many concurrent connections as well as providing the proxy's function (which depends on the type of proxy).

    Proxies are detailed in RFC 2616 §8.1.3) and that immediately provides one item that (if I understand HttpListener correctly) is not possible:

    The proxy server MUST signal persistent connections separately with its clients and the origin servers (or other proxy servers) that it connects to. Each persistent connection applies to only one transport link.

提交回复
热议问题