Skip to content

Commit

Permalink
add: allow_insecure flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Sep 28, 2024
1 parent dd8fc3f commit 84f7ecb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ray2sing/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,19 @@ func getTLSOptions(decoded map[string]string) T.OutboundTLSOptionsContainer {
if fp == "" {
fp = "chrome"
}

insecure, err := getOneOf(decoded, "insecure", "allowinsecure")
if err != nil {
insecure = "false"
}
tlsOptions := &option.OutboundTLSOptions{
Enabled: true,
ServerName: serverName,
Insecure: decoded["insecure"] == "true",
Insecure: insecure == "true" || insecure == "1",
DisableSNI: serverName == "",
ECH: ECHOpts,
TLSTricks: getTricksOptions(decoded),
}
if fp != "" &&!tlsOptions.DisableSNI{
if fp != "" && !tlsOptions.DisableSNI {
tlsOptions.UTLS = &option.OutboundUTLSOptions{
Enabled: true,
Fingerprint: fp,
Expand Down

0 comments on commit 84f7ecb

Please sign in to comment.