-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
61 lines (54 loc) · 2.16 KB
/
Copy pathconfig.example.yaml
File metadata and controls
61 lines (54 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# PolyProxy example configuration.
# Copy to the per-user config path (printed by `polyproxy -h`) and edit.
#
# Linux : ~/.config/PolyProxy/config.yaml
# macOS : ~/Library/Application Support/PolyProxy/config.yaml
# Windows : %APPDATA%\PolyProxy\config.yaml
#
# Strategy cheat sheet:
# random — uniform random among healthy upstreams
# round-robin — cyclical
# hash — FNV hash of the destination host → sticky per-host
# name — always first healthy (use "direct" if you want a passthrough)
server:
http_listen: "127.0.0.1:7890" # local HTTP proxy (CONNECT + plain forward)
socks5_listen: "127.0.0.1:7891" # local SOCKS5 proxy
api_listen: "127.0.0.1:9090" # web dashboard + REST API
api_enable: true
pool:
strategy: random
health_check: true # periodic TCP-dial every upstream, auto-mark dead ones unhealthy
proxies:
# 0. The "direct" pseudo-proxy — dials the destination itself.
- { name: direct, type: direct }
# 1. HTTP upstream with basic auth
- name: "us-http-1"
type: http
server: "1.2.3.4"
port: 8080
username: "user"
password: "pass"
# 2. HTTP upstream without auth
- name: "us-http-2"
type: http
server: "5.6.7.8"
port: 3128
# 3. SOCKS5 upstream
- name: "jp-socks-1"
type: socks5
server: "9.10.11.12"
port: 1080
# username / password are forwarded to the SOCKS5 server if provided
# Free proxy crawling & validation (optional)
freeproxy:
enabled: true
# Test URLs tried in order; proxy is valid if any returns 2xx-3xx.
# Use China-friendly endpoints — scraped free proxies are usually
# hosted in China and can't reliably reach US test services like httpbin.org.
test_urls:
- "http://myip.ipip.net" # ~130ms, returns just the IP
- "http://www.baidu.com" # ~190ms, always 200
- "http://cip.cc" # ~4s, reliable fallback
crawl_timeout: 30 # seconds for fetching from proxy sources (international sources are slow)
timeout: 8 # seconds for TCP probe + each test URL attempt
concurrency: 50 # max parallel validations