JoeDog / siege

Siege is an http load tester and benchmarking utility
GNU General Public License v3.0
5.9k stars 386 forks source link

Add basic Socks5 proxy support #206

Open akiuni opened 2 years ago

akiuni commented 2 years ago

This PR aims at allowing usage of siege behind a basic SOCKS5 proxy. If approved, GSSAPI authentication should be added in order to be compliant with rfc1928.

Note that I've used existing proxy-* directives to avoid too many modifications, but it is possible to create dedicated ones for socks5, depending on the maintener willing.

Here is an example of usage behind tor (in default mode, which is socks5 proxy) : build and run tor:

git clone https://github.com/torproject/tor
cd tor
./autogen.sh
./configure --disable-asciidoc
make
./src/app/tor

build siege as usual (wish openssl support) and activate socks5 in the siegerc file (9050 is the default socks5 port):

proxy-host = localhost
proxy-port = 9050
proxy-socks5 = true

Run siege as usual

JoeDog commented 11 months ago

Sorry, I'm so late to this party. I just noticed this pull request.

As implemented, this creates a dependency on tor. Every distributor would have to include tor. The siege topdir/src is missing socks5.c and socks5.h which aren't included. I assume they're the socks5.c and socks5.h distributed with ror