ProxyBroker icon indicating copy to clipboard operation
ProxyBroker copied to clipboard

rotation doesn't work

Open ralyodio opened this issue 4 years ago • 9 comments

$ proxybroker serve --host 127.0.0.1 --port 8888 --types HTTP HTTPS --lvl High

This seems to only ever use one proxy.

ralyodio avatar Sep 18 '19 02:09 ralyodio

Totally yes, and seems reusing them even if relaunch it. The only way i saw to get another is to change --strict or --types or whatever other parameter.

I'm not using this since years, but as far as i remember, it rotated proxies in the past. Right now i don't know is there's any method or workaround to make them rotate. Nevermind.

erm3nda avatar Dec 20 '19 02:12 erm3nda

@constverum Is this project not more maintained?

dannyeuu avatar Jan 14 '20 20:01 dannyeuu

same here it seems use a proxy actually it works well when you use broker.serve inside the code, but the cli does not work well

0xc0d avatar Mar 12 '20 04:03 0xc0d

confirmed - broker.serve rotating fine

d-bo avatar Mar 30 '20 19:03 d-bo

@0xc0d @d-bo do you mean using broker.serve() inside code like this? https://github.com/constverum/ProxyBroker/blob/master/examples/proxy_server.py

I tried tracing the codes and found that it seems like rotating but, if you try to send requests one after one's response, you can see that it's reusing the previous one. Actually it's just keep getting one more new proxy every time it got a new client request when all pre-allocated proxies are in use, or reuse existing ones if there're any pre-allocated proxies available.

The demo looks like it's rotating is just because those requests are sending in parallel which caused an empty proxy queue. The proxy queue is always empty means it tries to fetch one more proxy every time.

Even you set limit = 100, but you always have only 1 concurrent connection, you'll be using the same proxy all the times. If you only have max N concurrent connection, you'll have only N proxies rotating.

bluet avatar Apr 27 '20 22:04 bluet

related lines of codes: https://github.com/constverum/ProxyBroker/blob/master/proxybroker/server.py#L37-L69 or https://github.com/constverum/ProxyBroker/blob/27f3766c9e8a48053669211893f5f681256d9f37/proxybroker/server.py#L37-L69

bluet avatar Apr 27 '20 22:04 bluet

@bluet yes, You are right. I didn't try to fix the problem, because after all, I found out that public proxies are not quite well for my purpose. I tried rotating Tor server. It works. And yes, it's fast enough for me.

0xc0d avatar Apr 27 '20 23:04 0xc0d

@0xc0d would you mind sharing how you rotate Tor server? :-D

bluet avatar Apr 28 '20 00:04 bluet

@bluet sure!!

Tor Rotating Proxy

0xc0d avatar Apr 28 '20 08:04 0xc0d