Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add proxy support #87

Closed
wants to merge 7 commits into from
Closed

Conversation

antonioua
Copy link

Add proxy support for http client

@antonioua antonioua force-pushed the add-proxy-support branch 2 times, most recently from b6e9357 to 0d521b1 Compare March 5, 2022 20:55
@vans163
Copy link

vans163 commented Mar 7, 2022

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

@antonioua
Copy link
Author

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

@pasha-i
Copy link

pasha-i commented Mar 7, 2022

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

@antonioua
Copy link
Author

antonioua commented Mar 7, 2022

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
Copy link

pasha-i commented Mar 7, 2022

saw another PR 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
Copy link

vans163 commented Mar 7, 2022

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/

bombardier.go Outdated
@@ -441,6 +441,8 @@ func (b *bombardier) disableOutput() {
}

func main() {
proxyServer = os.Getenv("BOMBARDIER_PROXY")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably come from a command line argument

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Dockerfile Outdated Show resolved Hide resolved
@antonioua
Copy link
Author

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

@codesenberg codesenberg linked an issue Apr 27, 2023 that may be closed by this pull request
@antonioua antonioua closed this Nov 11, 2023
@Radical-Egg Radical-Egg mentioned this pull request Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use proxys ?
4 participants