mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 03:19:36 +03:00
Add reserved to WireGuard config
Fixes https://github.com/XTLS/Xray-core/issues/1730
This commit is contained in:
@ -31,6 +31,7 @@ type netBindClient struct {
|
||||
dialer internet.Dialer
|
||||
dns dns.Client
|
||||
dnsOption dns.IPOption
|
||||
reserved []byte
|
||||
|
||||
readQueue chan *netReadInfo
|
||||
}
|
||||
@ -157,6 +158,10 @@ func (bind *netBindClient) Send(buff []byte, endpoint conn.Endpoint) error {
|
||||
}
|
||||
}
|
||||
|
||||
if len(buff) > 3 && len(bind.reserved) == 3 {
|
||||
copy(buff[1:], bind.reserved)
|
||||
}
|
||||
|
||||
_, err = nend.conn.Write(buff)
|
||||
|
||||
return err
|
||||
|
Reference in New Issue
Block a user