Sockopt: Add custom sockopt on Windows & Darwin

This commit is contained in:
风扇滑翔翼 2025-04-01 16:35:36 +00:00 committed by GitHub
parent ab5d7cf3d2
commit e70488287b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 302 additions and 117 deletions

View file

@ -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,