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

feat: add proxy rotation (settable per store) #1026

Merged
merged 5 commits into from Dec 2, 2020
Merged

feat: add proxy rotation (settable per store) #1026

merged 5 commits into from Dec 2, 2020

Conversation

Doridian
Copy link
Collaborator

Description

Adds ability to add multiple proxies per store, rotated once per fetch.
Proxies are read from a file STORENAME.proxies in the format like socks5://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

@Doridian Doridian requested a review from jef as a code owner November 30, 2020 05:58
@Doridian Doridian changed the title Add proxy rotation (settable per store) feat: Add proxy rotation (settable per store) Nov 30, 2020
@jef
Copy link
Owner

jef commented Nov 30, 2020

@Doridian with the great contribution! Thanks for help. I'll take a look at this tonight and get back.

@MujiSayed
Copy link

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!

@Doridian
Copy link
Collaborator Author

Doridian commented Dec 1, 2020 via email

Copy link
Owner

@jef jef left a 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();
Copy link
Owner

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 😝

@Doridian
Copy link
Collaborator Author

Doridian commented Dec 2, 2020 via email

@jef jef changed the title feat: Add proxy rotation (settable per store) feat: add proxy rotation (settable per store) Dec 2, 2020
@jef jef merged commit 490d44e into jef:main Dec 2, 2020
@JasonMore
Copy link

@Doridian which socks5 proxies do you use? Looking for suggestions

@gigi2006
Copy link

gigi2006 commented Dec 8, 2020

@Doridian @jef
would also be very interested which proxys you recommend...

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.

None yet

5 participants