feat:多跳(B->D->C->A)功能
This commit is contained in:
@@ -25,6 +25,7 @@ type clientOptions struct {
|
||||
udpLinuxTimestamping bool
|
||||
bindIP string
|
||||
bindDevice string
|
||||
kcpDialAddress string
|
||||
}
|
||||
|
||||
// Option 用于配置 Client 的可选行为,例如时延日志。
|
||||
@@ -73,6 +74,13 @@ func WithBindDevice(device string) Option {
|
||||
}
|
||||
}
|
||||
|
||||
// WithKCPDialAddress 指定 KCP 实际拨号使用的 UDP 地址,可用于通过 relay 连接逻辑上的 server。
|
||||
func WithKCPDialAddress(addr string) Option {
|
||||
return func(options *clientOptions) {
|
||||
options.kcpDialAddress = addr
|
||||
}
|
||||
}
|
||||
|
||||
// WithUDPLinuxTimestamping controls whether UDP clients enable Linux timestamping.
|
||||
func WithUDPLinuxTimestamping(enabled bool) Option {
|
||||
return func(options *clientOptions) {
|
||||
|
||||
Reference in New Issue
Block a user