fix: fix wireguard outbound not work with ipv6 server
This commit is contained in:
parent
8fa6bd1743
commit
1333f1fd47
1 changed files with 1 additions and 2 deletions
|
@ -91,8 +91,7 @@ func NewWireGuard(option WireGuardOption) (*WireGuard, error) {
|
|||
reserved[1] = uint8(option.Reserved[1])
|
||||
reserved[2] = uint8(option.Reserved[2])
|
||||
}
|
||||
peerAddr := M.ParseSocksaddr(option.Server)
|
||||
peerAddr.Port = uint16(option.Port)
|
||||
peerAddr := M.ParseSocksaddrHostPort(option.Server, uint16(option.Port))
|
||||
outbound.bind = wireguard.NewClientBind(context.Background(), outbound.dialer, peerAddr, reserved)
|
||||
localPrefixes := make([]netip.Prefix, 0, 2)
|
||||
if len(option.Ip) > 0 {
|
||||
|
|
Loading…
Reference in a new issue