microsocks
microsocks copied to clipboard
Why SOCKS5 only?
Hi,
I'm testing with CURL and it only supports SOCKS5 protocol, and not SOCKS4. So curl --socks5
works, but curl --socks4
doesn't.
Please, can you provide dual protocol support? Thank you!
I'm testing with CURL and it only supports SOCKS5 protocol, and not SOCKS4
so microsocks and curl are perfectly compatible...
Please, can you provide dual protocol support?
why ?
I'm testing with CURL and it only supports SOCKS5 protocol, and not SOCKS4
so microsocks and curl are perfectly compatible...
With --socks5
yes; but when you try with SOCKS4, then NO!
Please, can you provide dual protocol support?
why ?
Because I want to use it as an upstream proxy using the SOCKS4 protocol.
With --socks5 yes; but when you try with SOCKS4, then NO!
as expected...
Because I want to use it as an upstream proxy using the SOCKS4 protocol.
what advantage do you expect from using SOCKS4 ?
With --socks5 yes; but when you try with SOCKS4, then NO!
as expected...
That's the reason to request for supporting SOCKS4.
Because I want to use it as an upstream proxy using the SOCKS4 protocol.
what advantage do you expect from using SOCKS4 ?
Advantage? Nothing in fact. But not all socks clients support the SOCKS5 protocol. A lot supports only SOCKS4. So to use this tool another SOCKS5->SOCKS4 translator is required.
So, please consider to support both versions. Regards.
A lot supports only SOCKS4
do you have some actual examples of programs supporting only socks4 ?
do you have some actual examples of programs supporting only socks4 ?
Any Java application based on the HTTP client library from jetty (https://www.eclipse.org/jetty/) will not be able to use a socks5-only proxy since it only supports socks4 and socks4a.
https://github.com/eclipse/jetty.project/blob/jetty-10.0.x/jetty-client/src/main/java/org/eclipse/jetty/client/Socks4Proxy.java#L109
And not only all Java apps but all based on SSH fordwarding. In fact you can found more clients supporting only Socks4 than clients supporting Socks5 version.
i made a socks4 server implementation in python, you can use it instead: https://github.com/rofl0r/pysocks4
socat
only supports socks4 FWIW
socat
only supports socks4 FWIW
And a lot of other tools only supports socks4. That's the reason to request to "upgrade" microsoks with v4 support. That seems to be easy as v4 is subset of v5 with only small differences.
the difference is not that small, even the number of packets for handshake differs (here, socks4a is more efficient in that it requires less traffic, which is why tor defaults to it). i estimate that supporting socks4a in addition to socks5 would require adding about 20% more code and it would make everything more convoluted. it would make more sense to fork microsocks for this purpose and make it socks4a only. but then, pysocks4 seems good enough for me, apart from not being written in C.
And a lot of other tools only supports socks4.
you keep repeating that, but so far only socat and an exotic java library called jetty have been mentioned. you gotta provide more examples to convince me there's really "a lot" of them.
I'll add into this, socks4 support can be added as a module or as a extra feature that isn't even built by default, it doesn't have to actually complicate the code in main.c itself. Plus, jetty is not at all exotic. It's a massive (and widely used) java network library.
microsocks is not GNU software, it doesn't try to be everything at once - there are other socks proxy implementations for that. it's a minimal, yet fully usable and performant implementation of one thing. in my opinion it's also a good example for a multithreaded TCP server app to be used for teaching. adding all sorts of features to it would make it hard to read and modify.