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
feat: add proxy rotation (settable per store) #1026
Conversation
@Doridian with the great contribution! Thanks for help. I'll take a look at this tonight and get back. |
quick question about this. I know format is socks5://username:password@ip, but what if there is no username/password for said socks5 proxies? Also since default port is 1080, is that what it's guessing as it's port or will a format of socks5://ip:port work as well? Thanks for the contribution! |
Correct. That format should work. Default port is 1080 indeed.
…On Mon, Nov 30, 2020, at 19:34, Muji Sayed wrote:
quick question about this. I know format is ***@***.***, but what if there is no username/password for said socks5 proxies? Also since default port is 1080, is that what it's guessing as it's port or will a format of socks5://ip:port work as well?
Thanks for the contribution!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1026 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAE2E4OK5ESLOR2YL2FTQNTSSRP5RANCNFSM4UHDFMTQ>.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing. Thank you so much @Doridian. This really needed some clean up. I appreciate the time spent on the refactoring as well!
return false; | ||
} | ||
|
||
const typ = request.resourceType(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this because type
is a reserved word? Haha 😝
Indeed it is.
On Tue, Dec 1, 2020, at 16:11, Jef LeCompte wrote:
***@***.**** approved this pull request.
Amazing. Thank you so much @Doridian <https://github.com/Doridian>. This really needed some clean up. I appreciate the time spent on the refactoring as well!
In src/store/lookup.ts <#1026 (comment)>:
> + store.currentProxyIndex = 0;
+ }
+
+ logger.info(
+ `ℹ [${store.name}] Next proxy index: ${store.currentProxyIndex} / Count: ${store.proxyList.length}`
+ );
+
+ return store.proxyList[store.currentProxyIndex];
+}
+
+async function handleLowBandwidth(request: Request) {
+ if (!config.browser.lowBandwidth) {
+ return false;
+ }
+
+ const typ = request.resourceType();
…
Is this because `type` is a reserved word? Haha 😝
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1026 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAE2E4PDSXMPZP2BBCLZ3L3SSWA3PANCNFSM4UHDFMTQ>.
|
@Doridian which socks5 proxies do you use? Looking for suggestions |
Description
Adds ability to add multiple proxies per store, rotated once per fetch.
Proxies are read from a file
STORENAME.proxies
in the format likesocks5://username:password@ip
one per line.Adds some require architectural changes for that to ensure adblocker doesn't explode (puppeteer only supports one request listener per instance, so we have to write our own chain there)
Testing
New dependencies