diff --git a/outbound/wireguard.go b/outbound/wireguard.go index 3ae3f63b..62876849 100644 --- a/outbound/wireguard.go +++ b/outbound/wireguard.go @@ -152,6 +152,13 @@ func (w *WireGuard) start() error { } bind = wireguard.NewClientBind(w.ctx, w, w.listener, isConnect, connectAddr, reserved) } + if w.useStdNetBind || len(w.peers) > 1 { + for _, peer := range w.peers { + if peer.Reserved != [3]uint8{} { + bind.SetReservedForEndpoint(peer.Endpoint, peer.Reserved) + } + } + } err = w.tunDevice.Start() if err != nil { return err