mirror of
https://github.com/karust/openserp.git
synced 2026-08-15 21:15:56 +08:00
Add `RequestTimeout` config that bounds wall-clock time of any request that does not manage its own deadline budget. It is derived from the engine timeout and retry budget via RequestTimeoutForRetries.
103 lines
3.3 KiB
YAML
103 lines
3.3 KiB
YAML
server:
|
|
host: 0.0.0.0 # API host to bind
|
|
port: 7000 # API port to bind
|
|
debug: false # Enable debug logs and force browser UI mode
|
|
verbose: true # Enable info-level request logs
|
|
raw_requests: false # true = raw HTTP mode, false = browser mode
|
|
insecure: true # Allow insecure TLS connections
|
|
|
|
app:
|
|
log_format: "text" # json|text
|
|
timeout: 15 # Browser/search timeout in seconds, per attempt; the request deadline is derived from this x retries
|
|
browser_path: "" # Custom browser binary path (chrome/chromium/edge..)
|
|
profiles: "" # Overriding built-in browser profiles
|
|
head: false # Headful mode
|
|
leakless: false # Force browser process cleanup after request
|
|
leave_head: false # Keep tabs open after request
|
|
max_processes: 6 # Concurrent Chrome processes
|
|
idle_ttl: 5m # close a Chrome that has not served traffic for this long
|
|
|
|
mega_timeout: 90s # max total wait for /mega/* requests; slow engines return partial results
|
|
block_trackers: true
|
|
block_resources: "image,font,css,media"
|
|
|
|
extract:
|
|
enabled: true
|
|
default_mode: auto # auto|fast|rendered
|
|
timeout: 20s
|
|
max_bytes: 2000000
|
|
max_concurrent: 2
|
|
|
|
proxies:
|
|
allow_request_proxy_url: false
|
|
# Force a single proxy for all engines.
|
|
# Same behavior as passing --proxy on the CLI.
|
|
#global: http://127.0.0.1:8080
|
|
|
|
# Advanced mode: define tagged proxy pools and opt engines in with `proxy: <tag>`.
|
|
#entries:
|
|
# - url: http://127.0.0.1:8080
|
|
# tags: [default, us]
|
|
# - url: socks5h://127.0.0.1:1080
|
|
# tags: [eu]
|
|
health:
|
|
failure_threshold: 2 # Disable proxy after this many consecutive failures
|
|
lanes:
|
|
enabled: true # Reuse browser profile/cookies per engine + proxy session ID
|
|
max_lanes: 100 # LRU cap for sticky lanes kept in worker memory
|
|
drop_cookies_on_challenge: true # Clear lane cookies on captcha/challenge only
|
|
|
|
cache:
|
|
ttl_seconds: 120 # Dedicated endpoint cache TTL in seconds (0 disables cache)
|
|
max_size: 1000 # Maximum cached dedicated responses before oldest-entry eviction
|
|
|
|
resilience:
|
|
max_retries: 1 # Retry attempts per engine request (0 disables retries)
|
|
allow_endpoint_fallback: false # Keep dedicated endpoints engine-pure by default
|
|
|
|
# circuit_breaker:
|
|
# failures: 5 # Consecutive failures required to open circuit
|
|
# recovery_seconds: 60 # Wait time before moving open circuit to half-open
|
|
# successes: 2 # Consecutive half-open successes required to close circuit
|
|
|
|
cors:
|
|
enabled: true
|
|
allow_origins: "*"
|
|
allow_methods: "GET, POST, OPTIONS"
|
|
allow_headers: "Origin, Content-Type, Accept, Authorization, X-Use-Proxy, X-Proxy-URL, X-Proxy-Country, X-Proxy-Class, X-Proxy-Provider, X-Proxy-Session-ID, X-Request-ID, X-Tenant"
|
|
max_age: 86400
|
|
|
|
# 2captcha:
|
|
# apikey: "123123123123123"
|
|
|
|
captcha:
|
|
solver_enabled: false # Global captcha solver gate (requires 2captcha.apikey)
|
|
|
|
google:
|
|
rate_requests: 60 # Allowed average requests per minute
|
|
rate_burst: 3 # Burst requests before limiter applies
|
|
#captcha: true # Engine-level solver flag (also requires captcha.solver_enabled=true)
|
|
|
|
yandex:
|
|
rate_requests: 60
|
|
rate_burst: 3
|
|
|
|
baidu:
|
|
rate_requests: 60
|
|
rate_burst: 3
|
|
# No proxy tag means direct traffic
|
|
|
|
bing:
|
|
rate_requests: 60
|
|
rate_burst: 3
|
|
# No proxy tag means direct traffic
|
|
|
|
duckduckgo:
|
|
rate_requests: 60
|
|
rate_burst: 3
|
|
|
|
ecosia:
|
|
rate_requests: 60
|
|
rate_burst: 3
|
|
# No proxy tag means direct traffic
|