mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-06-17 01:59:49 +00:00
feat: add test for sockopts config fields
This commit is contained in:
parent
e6da1f348c
commit
6b5486fc09
@ -46,6 +46,11 @@ func TestClientConfig(t *testing.T) {
|
|||||||
MaxIdleTimeout: 10 * time.Second,
|
MaxIdleTimeout: 10 * time.Second,
|
||||||
KeepAlivePeriod: 4 * time.Second,
|
KeepAlivePeriod: 4 * time.Second,
|
||||||
DisablePathMTUDiscovery: true,
|
DisablePathMTUDiscovery: true,
|
||||||
|
Sockopts: clientConfigQUICSockopts{
|
||||||
|
BindInterface: stringRef("eth0"),
|
||||||
|
FirewallMark: uint32Ref(1234),
|
||||||
|
FdControlUnixSocket: stringRef("test.sock"),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Bandwidth: clientConfigBandwidth{
|
Bandwidth: clientConfigBandwidth{
|
||||||
Up: "200 mbps",
|
Up: "200 mbps",
|
||||||
@ -189,3 +194,11 @@ func TestClientConfigURI(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func stringRef(s string) *string {
|
||||||
|
return &s
|
||||||
|
}
|
||||||
|
|
||||||
|
func uint32Ref(i uint32) *uint32 {
|
||||||
|
return &i
|
||||||
|
}
|
||||||
|
@ -26,6 +26,10 @@ quic:
|
|||||||
maxIdleTimeout: 10s
|
maxIdleTimeout: 10s
|
||||||
keepAlivePeriod: 4s
|
keepAlivePeriod: 4s
|
||||||
disablePathMTUDiscovery: true
|
disablePathMTUDiscovery: true
|
||||||
|
sockopts:
|
||||||
|
bindInterface: eth0
|
||||||
|
fwmark: 1234
|
||||||
|
fdControlUnixSocket: test.sock
|
||||||
|
|
||||||
bandwidth:
|
bandwidth:
|
||||||
up: 200 mbps
|
up: 200 mbps
|
||||||
|
Loading…
x
Reference in New Issue
Block a user