Skip to content

feat: add proxy fallback for links that return 403#554

Open
shrwnsan wants to merge 1 commit intotcort:masterfrom
shrwnsan:feature/proxy-fallback
Open

feat: add proxy fallback for links that return 403#554
shrwnsan wants to merge 1 commit intotcort:masterfrom
shrwnsan:feature/proxy-fallback

Conversation

@shrwnsan
Copy link

When a link returns 403 (or other configurable status codes), retry the check through a chain of proxy services to validate accessibility.

Features:

  • Default proxy chain: r.jina.ai → corsproxy.io → allorigins
  • Configurable via fallbackProxies option
  • Configurable status codes via fallbackForCodes option (default: [403])
  • Shows which proxy was used when validation succeeds

This solves the issue where legitimate URLs (like claude.ai, perplexity.ai) block automated access but work fine for human users.

Related issues: #285, #201

Amp-Thread-ID: https://ampcode.com/threads/T-019c0cc3-3007-77c9-bbae-4a912d68fd96

When a link returns 403 (or other configurable status codes), retry
the check through a chain of proxy services to validate accessibility.

Features:
- Default proxy chain: r.jina.ai → corsproxy.io → allorigins
- Configurable via `fallbackProxies` option
- Configurable status codes via `fallbackForCodes` option (default: [403])
- Shows which proxy was used when validation succeeds

This solves the issue where legitimate URLs (like claude.ai, perplexity.ai)
block automated access but work fine for human users.

Related issues: tcort#285, tcort#201

Co-authored-by: GLM <zai-org@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019c0cc3-3007-77c9-bbae-4a912d68fd96
Co-authored-by: Amp <amp@ampcode.com>
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.

1 participant