mirror of https://github.com/Dreamacro/clash.git
Fix: cannot listen socks5 port on wsl (#748)
This commit is contained in:
parent
9f1d85ab6e
commit
99b34e8d8b
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue