mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 09:25:41 +08:00
README: change checkhost -> checkwebsite
This commit is contained in:
parent
a06d56cce0
commit
b3b06cbfa5
@ -180,8 +180,10 @@ forward=http://1.1.1.1:8080,socks5://2.2.2.2:1080
|
|||||||
# multiple upstream proxies forwad strategy
|
# multiple upstream proxies forwad strategy
|
||||||
strategy=rr
|
strategy=rr
|
||||||
|
|
||||||
# check address (to check whether a host is reachable via forward proxy)
|
# Used to connect via forwarders, if the host is unreachable, the forwarder
|
||||||
checkhost=www.apple.com:8443
|
# will be set to disabled.
|
||||||
|
# MUST be a HTTP website server address, format: HOST[:PORT]. HTTPS NOT SUPPORTED.
|
||||||
|
checkwebsite=www.apple.com
|
||||||
|
|
||||||
# check duration
|
# check duration
|
||||||
checkduration=30
|
checkduration=30
|
||||||
|
2
proxy.go
2
proxy.go
@ -148,7 +148,7 @@ func check(p Proxy, webhost string, duration int) {
|
|||||||
p.SetEnable(true)
|
p.SetEnable(true)
|
||||||
retry = 2
|
retry = 2
|
||||||
dialTime := time.Since(startTime)
|
dialTime := time.Since(startTime)
|
||||||
logf("proxy-check: %s -> %s, set to ENABLED. connect time: %s", p.Addr(), webhost, dialTime.String())
|
logf("proxy-check %s -> %s, set to ENABLED. connect time: %s", p.Addr(), webhost, dialTime.String())
|
||||||
} else {
|
} else {
|
||||||
p.SetEnable(false)
|
p.SetEnable(false)
|
||||||
logf("proxy-check %s -> %s, set to DISABLED. server response: %s", p.Addr(), webhost, buf)
|
logf("proxy-check %s -> %s, set to DISABLED. server response: %s", p.Addr(), webhost, buf)
|
||||||
|
Loading…
Reference in New Issue
Block a user