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

Let specify the listening interface and / or ip #22

Closed
skrew opened this issue Dec 6, 2021 · 3 comments
Closed

Let specify the listening interface and / or ip #22

skrew opened this issue Dec 6, 2021 · 3 comments

Comments

@skrew
Copy link

skrew commented Dec 6, 2021

Hi,

I have a server with multiple IPV4, i would like to launch the proxy on all available ips / interfaces instead of 0.0.0.0, so i can use more than 7-8 bots (more than this number will make the ip banned by cloudflare)

EG: i can use a specific ip with curl like curl --interface vint0 ifconfig.me

Edit: i have tested by changing the code:

panic(fasthttp.ListenAndServe(fmt.Sprintf(":%d", port), router.HandleRequest))
with
panic(fasthttp.ListenAndServe(fmt.Sprintf("x.x.x.x:%d", port), router.HandleRequest))

but it doesn't works, the ip used is still my "default" ip (i can see that with the cloudflare ban which display the ip used)
I don't know if you can use something like SO_BINDTODEVICE with your go libs ?

Edit2: Found that, idk if it can help you: valyala/fasthttp#759

@skrew skrew changed the title Let specify the listening interface Let specify the listening interface and / or ip Dec 6, 2021
@mikekonan
Copy link
Owner

I will add it in the next release.
For now, you can use docker binding.

@mikekonan
Copy link
Owner

Just read this again, so there are two HTTP clients that proxy using. One is from kucoin SDK(used for candles) and the other is fasthttp(used for proxying transparently other requests). The first one does not allow to setting a Localaddr

@mikekonan
Copy link
Owner

mikekonan commented Dec 13, 2021

Will cover that after will replacing crappy kucoin-sdk with the pure WebSockets client.

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

No branches or pull requests

2 participants