Skip to content

fix: route robots.txt through proxy and apply MITM TLS per proxy URL - #3940

Open
Ayush7614 wants to merge 2 commits into
apify:masterfrom
Ayush7614:fix/proxy-aware-robots-and-mitm
Open

fix: route robots.txt through proxy and apply MITM TLS per proxy URL#3940
Ayush7614 wants to merge 2 commits into
apify:masterfrom
Ayush7614:fix/proxy-aware-robots-and-mitm

Conversation

@Ayush7614

@Ayush7614 Ayush7614 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • respectRobotsTxtFile fetched robots.txt without the crawler proxy, leaking the real IP and missing geo-specific robots rules.
  • MITM TLS disabling was configuration-wide, so mixed MITM and normal proxies shared one incorrect setting.
  • Fetch robots.txt via ProxyConfiguration, add manInTheMiddleProxyUrls / isProxyManInTheMiddle, and gate rejectUnauthorized / ignoreHTTPSErrors on the selected proxy URL.

Test plan

  • yarn test test/core/proxy_configuration.test.ts
  • yarn test test/core/crawlers/basic_crawler.test.ts -t "fetches robots.txt through"

respectRobotsTxtFile fetched robots.txt without the crawler proxy, leaking the real IP and missing geo-specific rules. Also MITM TLS disabling was configuration-wide, so mixed MITM and normal proxies shared one incorrect setting. Fetch robots via ProxyConfiguration and gate rejectUnauthorized / ignoreHTTPSErrors on the selected proxy URL.
@Ayush7614
Ayush7614 force-pushed the fix/proxy-aware-robots-and-mitm branch from fde58d3 to 827a6e1 Compare July 30, 2026 14:52
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.

2 participants