️ Improve

This commit is contained in:
2024-08-05 15:01:05 +08:00
parent 5afb06bdce
commit 89bb0d03e0
6 changed files with 52 additions and 106 deletions

View File

@@ -78,10 +78,6 @@ func ParseVless(proxy string) (model.Outbound, error) {
ALPN: alpn,
ServerName: sni,
Insecure: insecureBool,
UTLS: &model.OutboundUTLSOptions{
Enabled: enableUTLS,
Fingerprint: fp,
},
},
}
}
@@ -93,10 +89,6 @@ func ParseVless(proxy string) (model.Outbound, error) {
ALPN: alpn,
ServerName: sni,
Insecure: insecureBool,
UTLS: &model.OutboundUTLSOptions{
Enabled: enableUTLS,
Fingerprint: fp,
},
Reality: &model.OutboundRealityOptions{
Enabled: true,
PublicKey: pbk,
@@ -141,7 +133,7 @@ func ParseVless(proxy string) (model.Outbound, error) {
hosts, err := url.QueryUnescape(host)
if err != nil {
return model.Outbound{}, &ParseError{
Type: ErrCannotParseParams,
Type: ErrInvalidStruct,
Raw: proxy,
Message: err.Error(),
}
@@ -153,5 +145,13 @@ func ParseVless(proxy string) (model.Outbound, error) {
},
}
}
if enableUTLS {
result.VLESSOptions.OutboundTLSOptionsContainer.TLS.UTLS = &model.OutboundUTLSOptions{
Enabled: enableUTLS,
Fingerprint: fp,
}
}
return result, nil
}