mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +08:00
fix: fix wireguard outbound not work with ipv6 server
This commit is contained in:
parent
8fa6bd1743
commit
1333f1fd47
|
@ -91,8 +91,7 @@ func NewWireGuard(option WireGuardOption) (*WireGuard, error) {
|
||||||
reserved[1] = uint8(option.Reserved[1])
|
reserved[1] = uint8(option.Reserved[1])
|
||||||
reserved[2] = uint8(option.Reserved[2])
|
reserved[2] = uint8(option.Reserved[2])
|
||||||
}
|
}
|
||||||
peerAddr := M.ParseSocksaddr(option.Server)
|
peerAddr := M.ParseSocksaddrHostPort(option.Server, uint16(option.Port))
|
||||||
peerAddr.Port = uint16(option.Port)
|
|
||||||
outbound.bind = wireguard.NewClientBind(context.Background(), outbound.dialer, peerAddr, reserved)
|
outbound.bind = wireguard.NewClientBind(context.Background(), outbound.dialer, peerAddr, reserved)
|
||||||
localPrefixes := make([]netip.Prefix, 0, 2)
|
localPrefixes := make([]netip.Prefix, 0, 2)
|
||||||
if len(option.Ip) > 0 {
|
if len(option.Ip) > 0 {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user