36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
# 数量不足时返回 409,事务不改变任何 Proxy 状态。
|
||
version: 1
|
||
security: {requireProtectionOnPublicListen: true}
|
||
distribution:
|
||
enabled: true
|
||
listen: 127.0.0.1:8081
|
||
auth: {mode: none}
|
||
clientIdentification: {mode: sourceIP}
|
||
extraction:
|
||
fulfillment: allOrNothing
|
||
maxCountPerRequest: 100
|
||
minRemainingTTL: 30s
|
||
maxHealthCheckAge: 15s
|
||
reserveForGateway: 0
|
||
routing:
|
||
- name: extract
|
||
enabled: true
|
||
purpose: extract
|
||
match: {hostRegex: '.*'}
|
||
upstreams: [provider-a]
|
||
strategy: {type: random}
|
||
onUnavailable: {action: reject}
|
||
upstreams:
|
||
provider-a:
|
||
enabled: true
|
||
exposure: [extract]
|
||
provider: {billingMode: fetch, protocols: [http]}
|
||
api: {url: https://provider-a.example/proxies, method: GET, auth: {type: none}, template: '{{.}}'}
|
||
proxyAuth: {type: response}
|
||
pool: {maxSize: 500}
|
||
capacity: {maxConcurrencyPerProxy: 1}
|
||
refill: {reconcileInterval: 1s, minimumAvailableSlots: 25, targetAvailableSlots: 50}
|
||
lifecycle: {ttl: 2m, allocationSafetyMargin: 15s}
|
||
fetch: {estimatedIPsPerCall: 10, requestInterval: 1s, timeout: 3s, maxAttempts: 3, maxInFlight: 1, maxTotal: 50000}
|
||
check: {interval: 15s, jitter: 20, maxInFlight: 100, timeout: 2s, maxAttempts: 2, maxConsecutiveFailures: 3}
|