feat: IPv6 outbound rotation via curl --interface
- Add IPv6SourcePool for round-robin IP rotation - fetchViaCurl: Bun.spawn + curl -6 --interface for source binding - Auto-fallback to regular fetch when IPv6 connection fails - Response decompression via --compressed flag - Docker + GHCR build/deploy workflows - 8 routable IPv6 addresses on VPS
This commit is contained in:
@@ -473,6 +473,7 @@ export async function handleAnthropicMessages(
|
||||
proxyPool?: ProxyPool,
|
||||
sessionPool?: SessionProxyPool,
|
||||
sessionId?: string,
|
||||
ipv6Source?: string,
|
||||
): Promise<Response> {
|
||||
// -- Input validation -------------------------------------------------------
|
||||
const validationError = validateAnthropicRequest(body);
|
||||
@@ -506,8 +507,8 @@ export async function handleAnthropicMessages(
|
||||
// -- Execute with session-aware or standard retry --------------------------
|
||||
const result: FetchWithRetryResult =
|
||||
sessionPool && sessionId
|
||||
? await fetchWithSessionRetry(url, init, sessionPool, sessionId, `anthropic:${req.model}`)
|
||||
: await fetchWithRetry(url, init, proxyPool, `anthropic:${req.model}`);
|
||||
? await fetchWithSessionRetry(url, init, sessionPool, sessionId, `anthropic:${req.model}`, undefined, ipv6Source)
|
||||
: await fetchWithRetry(url, init, proxyPool, `anthropic:${req.model}`, ipv6Source);
|
||||
|
||||
if (result.errorClassification) {
|
||||
if (sessionPool && sessionId) {
|
||||
|
||||
Reference in New Issue
Block a user