mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
tls,trojan: optimize the default port handling
This commit is contained in:
1 parent
93728c6378
commit
2d16870803
6 files changed
+17
-19
No files matched your search
+3
-3
@@ -189,13 +189,13 @@ func (p *FwdrGroup) Check() {
|
||||
|
||||
u, err := url.Parse(p.config.Check)
|
||||
if err != nil {
|
||||
log.F("[group] parse check config error: %s", err)
|
||||
log.F("[group] parse check config error: %s, disable health checking", err)
|
||||
return
|
||||
}
|
||||
|
||||
addr := u.Host
|
||||
if strings.IndexByte(addr, ':') == -1 {
|
||||
addr += ":80"
|
||||
if _, p, _ := net.SplitHostPort(addr); p == "" {
|
||||
addr = net.JoinHostPort(addr, "80")
|
||||
}
|
||||
|
||||
timeout := time.Duration(p.config.CheckTimeout) * time.Second
|
||||
|
||||
Reference in new issue
Block a user