mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-13 11:59:35 +03:00
Sockopt: Allow customSockopt
work for Windows & Darwin (#4576)
* Sockopt: Add custom sockopt on Windows & Darwin * fix windows udp by the way * use resolved addr https://github.com/XTLS/Xray-core/pull/4504#issuecomment-2769153797
This commit is contained in:
@ -691,6 +691,7 @@ func (p TransportProtocol) Build() (string, error) {
|
||||
}
|
||||
|
||||
type CustomSockoptConfig struct {
|
||||
Syetem string `json:"system"`
|
||||
Network string `json:"network"`
|
||||
Level string `json:"level"`
|
||||
Opt string `json:"opt"`
|
||||
@ -778,6 +779,7 @@ func (c *SocketConfig) Build() (*internet.SocketConfig, error) {
|
||||
|
||||
for _, copt := range c.CustomSockopt {
|
||||
customSockopt := &internet.CustomSockopt{
|
||||
System: copt.Syetem,
|
||||
Network: copt.Network,
|
||||
Level: copt.Level,
|
||||
Opt: copt.Opt,
|
||||
|
Reference in New Issue
Block a user