diff --git a/app/Protocols/General.php b/app/Protocols/General.php index 0a3f2a5..8e320ad 100644 --- a/app/Protocols/General.php +++ b/app/Protocols/General.php @@ -74,6 +74,8 @@ class General $tlsSettings = $server['tlsSettings']; if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName'])) $config['sni'] = $tlsSettings['serverName']; + if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure'])) + $config['allowInsecure'] = $tlsSettings['allowInsecure']; } } if ((string)$server['network'] === 'tcp') { @@ -122,6 +124,8 @@ class General if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name'])) $config['sni'] = $tlsSettings['server_name']; $config['security'] = "tls"; + if (isset($tlsSettings['allow_insecure']) && !empty($tlsSettings['allow_insecure'])) + $config['allowInsecure'] = $tlsSettings['allow_insecure']; } break; case 2: //reality diff --git a/app/Protocols/Passwall.php b/app/Protocols/Passwall.php index 2799a61..bdd367e 100644 --- a/app/Protocols/Passwall.php +++ b/app/Protocols/Passwall.php @@ -72,6 +72,8 @@ class Passwall $tlsSettings = $server['tlsSettings']; if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName'])) $config['sni'] = $tlsSettings['serverName']; + if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure'])) + $config['allowInsecure'] = $tlsSettings['allowInsecure']; } } if ((string)$server['network'] === 'tcp') { @@ -120,6 +122,8 @@ class Passwall if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name'])) $config['sni'] = $tlsSettings['server_name']; $config['security'] = "tls"; + if (isset($tlsSettings['allow_insecure']) && !empty($tlsSettings['allow_insecure'])) + $config['allowInsecure'] = $tlsSettings['allow_insecure']; } break; case 2: //reality diff --git a/app/Protocols/SSRPlus.php b/app/Protocols/SSRPlus.php index e2e25b6..7645945 100644 --- a/app/Protocols/SSRPlus.php +++ b/app/Protocols/SSRPlus.php @@ -72,6 +72,8 @@ class SSRPlus $tlsSettings = $server['tlsSettings']; if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName'])) $config['sni'] = $tlsSettings['serverName']; + if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure'])) + $config['allowInsecure'] = $tlsSettings['allowInsecure']; } } if ((string)$server['network'] === 'ws') { @@ -108,6 +110,8 @@ class SSRPlus if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name'])) $config['sni'] = $tlsSettings['server_name']; $config['security'] = "tls"; + if (isset($tlsSettings['allow_insecure']) && !empty($tlsSettings['allow_insecure'])) + $config['allowInsecure'] = $tlsSettings['allow_insecure']; } break; case 2: //reality diff --git a/app/Protocols/SagerNet.php b/app/Protocols/SagerNet.php index 65f5fdd..09b19f3 100644 --- a/app/Protocols/SagerNet.php +++ b/app/Protocols/SagerNet.php @@ -70,6 +70,8 @@ class SagerNet $tlsSettings = $server['tlsSettings']; if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName'])) $config['sni'] = urlencode($tlsSettings['serverName']); + if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure'])) + $config['allowInsecure'] = $tlsSettings['allowInsecure']; } } if ((string)$server['network'] === 'tcp') { diff --git a/app/Protocols/Shadowrocket.php b/app/Protocols/Shadowrocket.php index 345783e..ece9a00 100644 --- a/app/Protocols/Shadowrocket.php +++ b/app/Protocols/Shadowrocket.php @@ -150,8 +150,8 @@ class Shadowrocket $config['tls'] = 1; if ($server['tls_settings']) { $tlsSettings = $server['tls_settings']; - if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure'])) - $config['allowInsecure'] = (int)$tlsSettings['allowInsecure']; + if (isset($tlsSettings['allow_insecure']) && !empty($tlsSettings['allow_insecure'])) + $config['allowInsecure'] = (int)$tlsSettings['allow_insecure']; if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name'])) $config['peer'] = $tlsSettings['server_name']; } diff --git a/app/Protocols/Stash.php b/app/Protocols/Stash.php index 7e004c7..3631e4f 100644 --- a/app/Protocols/Stash.php +++ b/app/Protocols/Stash.php @@ -189,6 +189,8 @@ class Stash case 1: if ($server['tls_settings']) { $tlsSettings = $server['tls_settings']; + if (isset($tlsSettings['allow_insecure']) && !empty($tlsSettings['allow_insecure'])) + $array['skip-cert-verify'] = ($tlsSettings['allow_insecure'] ? true : false); if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name'])) $array['servername'] = $tlsSettings['server_name']; } diff --git a/app/Protocols/V2rayN.php b/app/Protocols/V2rayN.php index 9d2ae6c..281fcf8 100644 --- a/app/Protocols/V2rayN.php +++ b/app/Protocols/V2rayN.php @@ -75,6 +75,8 @@ class V2rayN $tlsSettings = $server['tlsSettings']; if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName'])) $config['sni'] = $tlsSettings['serverName']; + if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure'])) + $config['allowInsecure'] = $tlsSettings['allowInsecure']; } } if ((string)$server['network'] === 'tcp') { @@ -123,6 +125,8 @@ class V2rayN if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name'])) $config['sni'] = $tlsSettings['server_name']; $config['security'] = "tls"; + if (isset($tlsSettings['allow_insecure']) && !empty($tlsSettings['allow_insecure'])) + $config['allowInsecure'] = $tlsSettings['allow_insecure']; } break; case 2: //reality diff --git a/app/Protocols/V2rayNG.php b/app/Protocols/V2rayNG.php index 7d16c95..bb8e795 100644 --- a/app/Protocols/V2rayNG.php +++ b/app/Protocols/V2rayNG.php @@ -76,6 +76,8 @@ class V2rayNG $tlsSettings = $server['tlsSettings']; if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName'])) $config['sni'] = $tlsSettings['serverName']; + if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure'])) + $config['allowInsecure'] = $tlsSettings['allowInsecure']; } } if ((string)$server['network'] === 'tcp') { @@ -124,6 +126,8 @@ class V2rayNG if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name'])) $config['sni'] = $tlsSettings['server_name']; $config['security'] = "tls"; + if (isset($tlsSettings['allow_insecure']) && !empty($tlsSettings['allow_insecure'])) + $config['allowInsecure'] = $tlsSettings['allow_insecure']; } break; case 2: //reality