mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
dns: log error when adding an invalid record
This commit is contained in:
1 parent
813c5fef94
commit
cb698713ee
8 files changed
+34
-35
No files matched your search
+7
-6
@@ -58,12 +58,13 @@ func NewTLS(s string, d proxy.Dialer, p proxy.Proxy) (*TLS, error) {
|
||||
alpn: query["alpn"],
|
||||
}
|
||||
|
||||
if _, port, _ := net.SplitHostPort(t.addr); port == "" {
|
||||
t.addr = net.JoinHostPort(t.addr, "443")
|
||||
}
|
||||
|
||||
if t.serverName == "" {
|
||||
t.serverName = t.addr[:strings.LastIndex(t.addr, ":")]
|
||||
if t.addr != "" {
|
||||
if _, port, _ := net.SplitHostPort(t.addr); port == "" {
|
||||
t.addr = net.JoinHostPort(t.addr, "443")
|
||||
}
|
||||
if t.serverName == "" {
|
||||
t.serverName = t.addr[:strings.LastIndex(t.addr, ":")]
|
||||
}
|
||||
}
|
||||
|
||||
return t, nil
|
||||
|
||||
Reference in new issue
Block a user