Sockopt: Fix Windows UDP interface bind; Allow customSockopt work for UDP (#4504)
Some checks are pending
Build docker image / build-image (push) Waiting to run
Build and Release for Windows 7 / build (win7-32, 386, windows) (push) Waiting to run
Build and Release for Windows 7 / build (win7-64, amd64, windows) (push) Waiting to run
Build and Release / build (loong64, linux) (push) Waiting to run
Build and Release / build (mips, linux) (push) Waiting to run
Build and Release / build (mips64, linux) (push) Waiting to run
Build and Release / build (mips64le, linux) (push) Waiting to run
Build and Release / build (mipsle, linux) (push) Waiting to run
Build and Release / build (ppc64, linux) (push) Waiting to run
Build and Release / build (ppc64le, linux) (push) Waiting to run
Build and Release / build (riscv64, linux) (push) Waiting to run
Build and Release / build (s390x, linux) (push) Waiting to run
Build and Release / build (amd64, openbsd, ) (push) Waiting to run
Build and Release / build (amd64, windows, ) (push) Waiting to run
Build and Release / build (arm, 5, linux) (push) Waiting to run
Build and Release / build (arm, 6, linux) (push) Waiting to run
Build and Release / build (arm, 7, freebsd) (push) Waiting to run
Build and Release / build (arm, 7, linux) (push) Waiting to run
Build and Release / build (arm, 7, openbsd) (push) Waiting to run
Build and Release / build (arm, 7, windows) (push) Waiting to run
Build and Release / build (arm64, android) (push) Waiting to run
Build and Release / build (arm64, darwin) (push) Waiting to run
Build and Release / build (arm64, freebsd) (push) Waiting to run
Build and Release / build (arm64, linux) (push) Waiting to run
Build and Release / build (arm64, openbsd) (push) Waiting to run
Build and Release / build (arm64, windows) (push) Waiting to run
Build and Release / build (386, freebsd, ) (push) Waiting to run
Build and Release / build (386, linux, ) (push) Waiting to run
Build and Release / build (386, openbsd, ) (push) Waiting to run
Build and Release / build (386, windows, ) (push) Waiting to run
Build and Release / build (amd64, darwin, ) (push) Waiting to run
Build and Release / build (amd64, freebsd, ) (push) Waiting to run
Build and Release / build (amd64, linux, ) (push) Waiting to run
Test / test (macos-latest) (push) Waiting to run
Test / test (ubuntu-latest) (push) Waiting to run
Test / test (windows-latest) (push) Waiting to run

This commit is contained in:
风扇滑翔翼
2025-03-21 18:48:46 +08:00
committed by GitHub
parent 1067171e6a
commit b585b26f29
6 changed files with 169 additions and 137 deletions

View File

@@ -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)
}