Add uTLS client

This commit is contained in:
世界
2022-09-10 10:27:00 +08:00
parent 3ad4370fa5
commit 2f437a0382
15 changed files with 331 additions and 44 deletions

View File

@@ -23,6 +23,8 @@ func NewDialerFromOptions(router adapter.Router, dialer N.Dialer, serverAddress
func NewClient(router adapter.Router, serverAddress string, options option.OutboundTLSOptions) (Config, error) {
if options.ECH != nil && options.ECH.Enabled {
return newECHClient(router, serverAddress, options)
} else if options.UTLS != nil && options.UTLS.Enabled {
return newUTLSClient(router, serverAddress, options)
} else {
return newStdClient(serverAddress, options)
}