38 lines
1.4 KiB
YAML
38 lines
1.4 KiB
YAML
# pool.maxSize 限当前未提取库存;fetch.maxTotal 限计费周期累计获取数。
|
||
version: 1
|
||
security: {requireProtectionOnPublicListen: true}
|
||
distribution:
|
||
enabled: true
|
||
listen: 127.0.0.1:8081
|
||
auth: {mode: none}
|
||
clientIdentification: {mode: sourceIP}
|
||
extraction: {fulfillment: partial, maxCountPerRequest: 20, minRemainingTTL: 30s, maxHealthCheckAge: 15s, reserveForGateway: 0}
|
||
routing:
|
||
- name: billed-extract
|
||
enabled: true
|
||
purpose: extract
|
||
match: {hostRegex: '.*'}
|
||
upstreams: [provider-metered]
|
||
strategy: {type: random}
|
||
onUnavailable: {action: reject}
|
||
upstreams:
|
||
provider-metered:
|
||
enabled: true
|
||
exposure: [extract]
|
||
provider: {billingMode: fetch, protocols: [http]}
|
||
api: {url: https://provider-metered.example/proxies, method: GET, auth: {type: none}, template: '{{.}}'}
|
||
proxyAuth: {type: response}
|
||
pool: {maxSize: 100}
|
||
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: 1000
|
||
retry: {initial: 500ms, max: 30s, jitter: 20}
|
||
check: {interval: 15s, jitter: 20, maxInFlight: 100, timeout: 2s, maxAttempts: 2, maxConsecutiveFailures: 3}
|