Add udp over tcp support for shadowsocks-2022

This commit is contained in:
世界 2022-06-01 11:12:43 +08:00
parent 6f93ef7736
commit c3505632fd
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
14 changed files with 119 additions and 33 deletions

View file

@ -136,6 +136,7 @@ type ShadowsocksServerTarget struct {
Email string `json:"email"`
Level byte `json:"level"`
IVCheck bool `json:"ivCheck"`
UoT bool `json:"uot"`
}
type ShadowsocksClientConfig struct {
@ -165,6 +166,7 @@ func (v *ShadowsocksClientConfig) Build() (proto.Message, error) {
config.Port = uint32(server.Port)
config.Method = server.Cipher
config.Key = server.Password
config.UdpOverTcp = server.UoT
return config, nil
}
}

View file

@ -1,4 +1,5 @@
//go:build !go1.18
package conf
import (
@ -98,6 +99,7 @@ type ShadowsocksServerTarget struct {
Email string `json:"email"`
Level byte `json:"level"`
IVCheck bool `json:"ivCheck"`
UoT bool `json:"uot"`
}
type ShadowsocksClientConfig struct {