简体   繁体   中英

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 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM