codesenberg / bombardier

Fast cross-platform HTTP benchmarking tool written in Go
MIT License
5.91k stars 313 forks source link

add proxy support #87

Closed antonioua closed 10 months ago

antonioua commented 2 years ago

Add proxy support for http client

vans163 commented 2 years ago

Does this support username+password? Also this is HTTP proxy only?

antonioua commented 2 years ago

this proxy is for http client only, doesn't support username/pass but I can try to add it @vans163 .

pasha-i commented 2 years ago

@antonioua can we use SOCKS5 proxy as well? not exactly sure if used http client would work with them

antonioua commented 2 years ago

yep, tested socks5 and http - both works.

docker network create tor
docker run --rm -tid --name mytor --network tor -p 9050:9050 -p 8118:8118 -e LOCATION=US dperson/torproxy
docker run -ti --rm --network tor -e BOMBARDIER_PROXY="socks5://mytor:9050" xdesigns/bombardier:0.0.1 -c 1000 -d 10s -l -m GET https://httpbin.org/get
pasha-i commented 2 years ago

saw another PR https://github.com/codesenberg/bombardier/compare/master...mariotrucco:78-add-proxy-support for proxy support, that one assumes it can only be a http proxy, but otherwise looks reasonable as well

vans163 commented 2 years ago

this proxy is for http client only, doesn't support username/pass but I can try to add it @vans163 .

Yea I think its important to have user/pass auth for both http and socks5 proxy as most paid proxies use that. Free/open/tor proxies dont but those are very few.

Note: HTTP Auth can be done like http://username:password@myproxy.com:9050/

antonioua commented 2 years ago

added proxy http/socks5 support for both http and fasthttp clients