Update proxy-security documentation

This commit is contained in:
ntohidi
2025-11-13 09:23:44 +01:00
parent 8116b15b63
commit d0fb53540d

View File

@@ -258,7 +258,7 @@ run_config = CrawlerRunConfig(proxy_config="socks5://proxy.example.com:1080")
## Migration from Deprecated `proxy` Parameter ## Migration from Deprecated `proxy` Parameter
!!! warning "Deprecation Notice" - "Deprecation Notice"
The legacy `proxy` argument on `BrowserConfig` is deprecated. Configure proxies through `CrawlerRunConfig.proxy_config` so each request fully describes its network settings. The legacy `proxy` argument on `BrowserConfig` is deprecated. Configure proxies through `CrawlerRunConfig.proxy_config` so each request fully describes its network settings.
```python ```python
@@ -285,20 +285,20 @@ def safe_proxy_repr(proxy: ProxyConfig):
### Common Issues ### Common Issues
???+ question "Proxy connection failed" - "Proxy connection failed"
- Verify the proxy server is reachable from your network. - Verify the proxy server is reachable from your network.
- Double-check authentication credentials. - Double-check authentication credentials.
- Ensure the protocol matches (`http`, `https`, or `socks5`). - Ensure the protocol matches (`http`, `https`, or `socks5`).
???+ question "SSL certificate errors" - "SSL certificate errors"
- Some proxies break SSL inspection; switch proxies if you see repeated failures. - Some proxies break SSL inspection; switch proxies if you see repeated failures.
- Consider temporarily disabling certificate fetching to isolate the issue. - Consider temporarily disabling certificate fetching to isolate the issue.
???+ question "Environment variables not loading" - "Environment variables not loading"
- Confirm `PROXIES` (or your custom env var) is set before running the script. - Confirm `PROXIES` (or your custom env var) is set before running the script.
- Check formatting: `ip:port:user:pass,ip:port:user:pass`. - Check formatting: `ip:port:user:pass,ip:port:user:pass`.
???+ question "Proxy rotation not working" - "Proxy rotation not working"
- Ensure `ProxyConfig.from_env()` actually loaded entries (`len(proxies) > 0`). - Ensure `ProxyConfig.from_env()` actually loaded entries (`len(proxies) > 0`).
- Attach `proxy_rotation_strategy` to `CrawlerRunConfig`. - Attach `proxy_rotation_strategy` to `CrawlerRunConfig`.
- Validate the proxy definitions you pass into the strategy. - Validate the proxy definitions you pass into the strategy.