mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
Sockopt: Fix Windows UDP interface
bind; Allow customSockopt
work for UDP (#4504)
This commit is contained in:
parent
1067171e6a
commit
b585b26f29
6 changed files with 169 additions and 137 deletions
|
@ -691,10 +691,11 @@ func (p TransportProtocol) Build() (string, error) {
|
|||
}
|
||||
|
||||
type CustomSockoptConfig struct {
|
||||
Level string `json:"level"`
|
||||
Opt string `json:"opt"`
|
||||
Value string `json:"value"`
|
||||
Type string `json:"type"`
|
||||
Network string `json:"network"`
|
||||
Level string `json:"level"`
|
||||
Opt string `json:"opt"`
|
||||
Value string `json:"value"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
type SocketConfig struct {
|
||||
|
@ -777,10 +778,11 @@ func (c *SocketConfig) Build() (*internet.SocketConfig, error) {
|
|||
|
||||
for _, copt := range c.CustomSockopt {
|
||||
customSockopt := &internet.CustomSockopt{
|
||||
Level: copt.Level,
|
||||
Opt: copt.Opt,
|
||||
Value: copt.Value,
|
||||
Type: copt.Type,
|
||||
Network: copt.Network,
|
||||
Level: copt.Level,
|
||||
Opt: copt.Opt,
|
||||
Value: copt.Value,
|
||||
Type: copt.Type,
|
||||
}
|
||||
customSockopts = append(customSockopts, customSockopt)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue