mirror of
https://github.com/netchx/netch.git
synced 2026-05-11 23:45:06 +08:00
Revert "feat: V2Ray TLS AllowInsecure Setting"
This reverts commit 591f8e5a5c.
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using Netch.Forms;
|
using Netch.Forms;
|
||||||
|
|
||||||
namespace Netch.Servers.VLESS.VLESSForm
|
namespace Netch.Servers.VLESS.VLESSForm
|
||||||
@@ -39,19 +38,9 @@ namespace Netch.Servers.VLESS.VLESSForm
|
|||||||
s => true,
|
s => true,
|
||||||
s => server.Path = s,
|
s => server.Path = s,
|
||||||
server.Path);
|
server.Path);
|
||||||
CreateComboBox("TLSSecure", "TLS Secure",
|
CreateCheckBox("TLSSecure", "TLS Secure",
|
||||||
new List<string> {"", "true", "false"},
|
b => server.TLSSecure = b,
|
||||||
s =>
|
server.TLSSecure);
|
||||||
{
|
|
||||||
server.TLSSecure = s switch
|
|
||||||
{
|
|
||||||
"" => null,
|
|
||||||
"true" => true,
|
|
||||||
"false" => false,
|
|
||||||
_ => null
|
|
||||||
};
|
|
||||||
},
|
|
||||||
server.TLSSecure?.ToString() ?? string.Empty);
|
|
||||||
CreateCheckBox("UseMux", "Use Mux",
|
CreateCheckBox("UseMux", "Use Mux",
|
||||||
b => server.UseMux = b,
|
b => server.UseMux = b,
|
||||||
server.UseMux);
|
server.UseMux);
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using Netch.Forms;
|
||||||
using Netch.Forms;
|
|
||||||
|
|
||||||
namespace Netch.Servers.VMess.Form
|
namespace Netch.Servers.VMess.Form
|
||||||
{
|
{
|
||||||
@@ -48,22 +47,12 @@ namespace Netch.Servers.VMess.Form
|
|||||||
s => true,
|
s => true,
|
||||||
s => server.QUICSecret = s,
|
s => server.QUICSecret = s,
|
||||||
server.QUICSecret);
|
server.QUICSecret);
|
||||||
CreateComboBox("TLSSecure", "TLS Secure",
|
|
||||||
new List<string> {"", "true", "false"},
|
|
||||||
s =>
|
|
||||||
{
|
|
||||||
server.TLSSecure = s switch
|
|
||||||
{
|
|
||||||
"" => null,
|
|
||||||
"true" => true,
|
|
||||||
"false" => false,
|
|
||||||
_ => null
|
|
||||||
};
|
|
||||||
},
|
|
||||||
server.TLSSecure?.ToString() ?? string.Empty);
|
|
||||||
CreateCheckBox("UseMux", "Use Mux",
|
CreateCheckBox("UseMux", "Use Mux",
|
||||||
s => server.UseMux = s,
|
s => server.UseMux = s,
|
||||||
server.UseMux);
|
server.UseMux);
|
||||||
|
CreateCheckBox("TLSSecure", "TLS Secure",
|
||||||
|
s => server.TLSSecure = s,
|
||||||
|
server.TLSSecure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -238,7 +238,7 @@ namespace Netch.Servers.VMess.Utils
|
|||||||
{
|
{
|
||||||
streamSettings.network = server.TransferProtocol;
|
streamSettings.network = server.TransferProtocol;
|
||||||
var host = server.Host;
|
var host = server.Host;
|
||||||
if (server.TLSSecure ?? Global.Settings.V2RayConfig.AllowInsecure)
|
if (server.TLSSecure)
|
||||||
{
|
{
|
||||||
streamSettings.security = "tls";
|
streamSettings.security = "tls";
|
||||||
|
|
||||||
@@ -318,7 +318,7 @@ namespace Netch.Servers.VMess.Utils
|
|||||||
type = server.FakeType
|
type = server.FakeType
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (server.TLSSecure ?? Global.Settings.V2RayConfig.AllowInsecure)
|
if (server.TLSSecure)
|
||||||
{
|
{
|
||||||
streamSettings.tlsSettings.serverName = server.Hostname;
|
streamSettings.tlsSettings.serverName = server.Hostname;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace Netch.Servers.VMess
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// TLS 底层传输安全
|
/// TLS 底层传输安全
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? TLSSecure { get; set; }
|
public bool TLSSecure { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Mux 多路复用
|
/// Mux 多路复用
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace Netch.Servers.VMess
|
|||||||
type = server.FakeType,
|
type = server.FakeType,
|
||||||
host = server.Host,
|
host = server.Host,
|
||||||
path = server.Path,
|
path = server.Path,
|
||||||
tls = server.TLSSecure ?? Global.Settings.V2RayConfig.AllowInsecure ? "tls" : ""
|
tls = server.TLSSecure ? "tls" : ""
|
||||||
});
|
});
|
||||||
return "vmess://" + ShareLink.URLSafeBase64Encode(vmessJson);
|
return "vmess://" + ShareLink.URLSafeBase64Encode(vmessJson);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user