Feature: SOCKS5/HTTP Proxy Support for IP Selection #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add proxy support to ar-crawl allowing users to specify outbound IP addresses via SOCKS5 or HTTP proxies. This enables IP rotation, geo-targeting, and avoiding rate limits when crawling.
Motivation
Proposed Implementation
1. CLI Flags
Add new flags to
crawlandcrawl-sitecommands:New flags:
--proxy <url>socks5://host:portorhttp://host:port)--proxy-user <user>--proxy-pass <pass>--proxy-bypass <domains>--proxy-list <file>--proxy-rotation <mode>per-request,sticky, orround-robin2. Config File Support
Add
proxysection to config JSON:3. Environment Variables
4. Priority Order
Technical Implementation
Playwright Service (
playwright-service/server.js)Playwright natively supports SOCKS5. Modify to accept proxy in request options:
Update
/fetchendpoint to accept proxy config:Direct HTTP Service (
crawl-service-adaptor.rkt)Two options:
Option A: Use Racket's built-in HTTP proxy support
current-proxy-serversparameterOption B: Switch to http-easy + socks5 packages
raco pkg install http-easy socks5make-socks5-proxyCLI Parameters (
cli.rkt)Add near existing parameters (~line 29):
Add to
parse-crawl-args(~line 1070):Proxy Pool Manager
For
--proxy-listsupport, implement rotation logic:Files to Modify
src/cli.rkt- Add CLI flags and parameterssrc/config-manager.rkt- Parse proxy config sectionsrc/crawl-service-adaptor.rkt- Add proxy support to direct HTTPsrc/production-crawler.rkt- Pass proxy config to servicesplaywright-service/server.js- Accept proxy in fetch optionsconfig/production.json- Add proxy config templateDependencies
http-easy,socks5packages (for SOCKS5 in direct service)Install Racket packages:
Testing
References
Labels
enhancement,networking