diff --git a/dns/server.go b/dns/server.go index c2bd08c8..7af83f96 100644 --- a/dns/server.go +++ b/dns/server.go @@ -4,6 +4,7 @@ import ( "net" "github.com/Dreamacro/clash/common/sockopt" + "github.com/Dreamacro/clash/log" D "github.com/miekg/dns" ) @@ -62,7 +63,7 @@ func ReCreateServer(addr string, resolver *Resolver) error { err = sockopt.UDPReuseaddr(p) if err != nil { - return err + log.Warnln("Failed to Reuse UDP Address: %s", err) } address = addr diff --git a/proxy/socks/udp.go b/proxy/socks/udp.go index 90ccad1b..38bc1131 100644 --- a/proxy/socks/udp.go +++ b/proxy/socks/udp.go @@ -8,6 +8,7 @@ import ( "github.com/Dreamacro/clash/common/sockopt" "github.com/Dreamacro/clash/component/socks5" C "github.com/Dreamacro/clash/constant" + "github.com/Dreamacro/clash/log" "github.com/Dreamacro/clash/tunnel" ) @@ -25,7 +26,7 @@ func NewSocksUDPProxy(addr string) (*SockUDPListener, error) { err = sockopt.UDPReuseaddr(l.(*net.UDPConn)) if err != nil { - return nil, err + log.Warnln("Failed to Reuse UDP Address: %s", err) } sl := &SockUDPListener{l, addr, false}