mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-12-27 02:45:41 +08:00
wireguard: Fix set reserved
This commit is contained in:
parent
1e787cb607
commit
8c3a98faa2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user