mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-10 14:18:40 +00:00
Sockopt: Add custom sockopt on Windows & Darwin
This commit is contained in:
parent
ab5d7cf3d2
commit
e70488287b
6 changed files with 302 additions and 117 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue