Using HTTP proxies as SOCKS in java
Is there any way to use an HTTP proxy as a SOCKS proxy?
i want to use it as a socket to connect with an endpoint and send packets开发者_StackOverflow中文版 of information
Not easily. Some workaround may be possible though, based on what you actually want to achieve.
You can use some HTTP proxies to tunnel TCP connections. This is necessary for SSL encrypted HTTPS traffic which is just passed through by the router without being able to look into the stream.
However, most proxies will limit this to port 443 and some other well known alternative HTTPS ports, so it's not a general solution you can rely on.
But it's not a SOCKS proxy at all, it uses the HTTP protocol with the CONNECT method to do that. UDP is not possible, nor is listening for incoming connections.
Socks is a protocol. HTTP can be tunneled over SOCKS. HTTP is not SOCKS. The question doesn't really make sense. Answer is definitely no.
精彩评论