문제

I am developing a proxy using Apache HTTP Components 4.

When a browser wants to open an SSL connection through my proxy it sends a request with the HTTP CONNECT method.

How can I implement the CONNECT method using HTTP Components? How can I turn the HTTP connection (which is already handled by the HTTP components library) into a raw TCP connection that is proxied through my program?

도움이 되었습니까?

해결책

Once a connection tunnel has been negotiated (CONNECT handshake has been successfully executed) and outgoing connection successfully established, your proxy should bypass the entire HTTP layer and start reading whatever stuff comes from the raw socket of the incoming connection and copying it to the raw socket of the outgoing connection, as well as reading whatever stuff comes form the socket of the outgoing connection and copying it to the socket of the incoming connection.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top