iperf icon indicating copy to clipboard operation
iperf copied to clipboard

Bandwidth performance tool for chisel tunnel based on socks5

Open ivanvaccarics opened this issue 5 years ago • 10 comments

Hi, I developed a tunnel system based on chisel which exposes on client-side, a SOCKS5 proxy to allow users to perform requests. Moreover, I'm interested to test the bandwidth performance of the tunnel system. There is a way to do this performance test by using iperf through a socks5? Thanks a lot

ivanvaccarics avatar Dec 16 '20 08:12 ivanvaccarics

As long as your proxy presents a TCP port to bind to, it should be possible to run iperf3 through it. You would tell the iperf3 client to connect to the proxy (use the -c and -p options to point to the SOCKS proxy host and port). I think this would work for the most common iperf3 use case of doing TCP tests from the client to server. I'm not sure how UDP or reverse-mode tests would work (it doesn't feel to me like either of this would work well, but I don't really have any first-hand experience with this sort of thing).

bmah888 avatar Dec 17 '20 18:12 bmah888

dear @bmah888 thanks a lot for your response, I'm, trying to test the iperf3 tool with your suggestions. Another question, there is a way to run iperf3 always on socks5 also if the socks5 requires username and password to accept the request? In a few words, the socks5 requires credentials.

ivanvaccarics avatar Dec 17 '20 19:12 ivanvaccarics

It needs credentials? Yikes that's hard. So there must be some other API other than the standard socket API then?

(What I mean is that there are more parameters/credentials needed than what the normal socket API needs to be able to transfer data, then a program like iperf3 would need to have some explicit SOCKS support. It doesn't currently. My knowledge in this area is really hazy though.)

bmah888 avatar Dec 17 '20 20:12 bmah888

Another option is to run iperf3 client with proxychains, which proxies traffics via socks5 tunnel to the remote iperf3 server.

BigSully avatar Sep 08 '21 12:09 BigSully

Added socks5 client in my fork, only TCP protocol is implemented. https://github.com/mister-goo/iperf/commit/532d483b37a070f15cf96dc0370ed7aa63bc26b1

mister-goo avatar Jun 04 '22 03:06 mister-goo

I have one more question: Is it possible to use iperf3 through socks5? Does it support options such as --socks5? Thanks a lot

rezapoorzare avatar Nov 14 '23 10:11 rezapoorzare

Is it possible to use iperf3 through socks5? Does it support options such as --socks5?

Did you try using socks5 per @bmah888 suggested approach is this comment? Also, you may try using socks5 proxy with @mister-goo patch from this comment (note that it assumes port 1000 is used for the proxy).

davidBar-On avatar Dec 09 '23 11:12 davidBar-On

Dear David, Thanks a lot, I learned a lot from the different comments.

rezapoorzare1 avatar Dec 09 '23 12:12 rezapoorzare1

Submitted a PR #1676 with TCP support for SOCKS5 Proxy, based on @mister-goo code.

davidBar-On avatar Mar 26 '24 08:03 davidBar-On

Submitted a PR #1676 with TCP support for SOCKS5 Proxy, based on @mister-goo code.

Thanks a lot.

rezapoorzare1 avatar Apr 02 '24 09:04 rezapoorzare1