diff --git a/ProxySU/MainWindow.xaml.cs b/ProxySU/MainWindow.xaml.cs
index ad82071..d8e25d6 100644
--- a/ProxySU/MainWindow.xaml.cs
+++ b/ProxySU/MainWindow.xaml.cs
@@ -81,6 +81,7 @@ namespace ProxySU
public static string proxyType = "V2Ray"; //代理类型标识: V2Ray\TrojanGo\Trojan\NaiveProxy
public static readonly string pwdir = AppDomain.CurrentDomain.BaseDirectory; //执行文件所在目录
+ public static bool mKCPvlessIsSet = false; //mKCP是否使用VLESS协议
static bool testDomain = false; //设置标识--域名是否需要检测解析,初始化为不需要
static string ipv4 = String.Empty; //保存获取的ipv4地址
static string ipv6 = String.Empty; //保存获取的ipv6地址
@@ -1475,7 +1476,15 @@ namespace ProxySU
//else if (String.Equals(ReceiveConfigurationParameters[0], "MkcpNone")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2SRTP")||String.Equals(ReceiveConfigurationParameters[0], "mKCPuTP")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2WechatVideo")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2DTLS")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2WireGuard"))
else if (ReceiveConfigurationParameters[0].Contains("mKCP") == true)
{
- inboundsConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\server\05_inbounds\mkcp_server_config.json";
+ if(mKCPvlessIsSet == true)
+ {
+ inboundsConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\server\05_inbounds\vless_mkcp_server_config.json";
+ }
+ else
+ {
+ inboundsConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\server\05_inbounds\mkcp_server_config.json";
+ }
+
}
// else if (String.Equals(ReceiveConfigurationParameters[0], "QuicNone") || String.Equals(ReceiveConfigurationParameters[0], "QuicSRTP") || String.Equals(ReceiveConfigurationParameters[0], "Quic2uTP") || String.Equals(ReceiveConfigurationParameters[0], "QuicWechatVideo") || String.Equals(ReceiveConfigurationParameters[0], "QuicDTLS") || String.Equals(ReceiveConfigurationParameters[0], "QuicWireGuard"))
@@ -1817,7 +1826,15 @@ namespace ProxySU
//else if (String.Equals(ReceiveConfigurationParameters[0], "MkcpNone")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2SRTP")||String.Equals(ReceiveConfigurationParameters[0], "mKCPuTP")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2WechatVideo")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2DTLS")|| String.Equals(ReceiveConfigurationParameters[0], "mKCP2WireGuard"))
else if (ReceiveConfigurationParameters[0].Contains("mKCP") == true)
{
- outboundsConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\client\06_outbounds\mkcp_client_config.json";
+ if (mKCPvlessIsSet == true)
+ {
+ outboundsConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\client\06_outbounds\vless_mkcp_client_config.json";
+ }
+ else
+ {
+ outboundsConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\client\06_outbounds\mkcp_client_config.json";
+ }
+
}
// else if (String.Equals(ReceiveConfigurationParameters[0], "QuicNone") || String.Equals(ReceiveConfigurationParameters[0], "QuicSRTP") || String.Equals(ReceiveConfigurationParameters[0], "Quic2uTP") || String.Equals(ReceiveConfigurationParameters[0], "QuicWechatVideo") || String.Equals(ReceiveConfigurationParameters[0], "QuicDTLS") || String.Equals(ReceiveConfigurationParameters[0], "QuicWireGuard"))
else if (ReceiveConfigurationParameters[0].Contains("Quic") == true)
@@ -6902,59 +6919,63 @@ namespace ProxySU
#region 测试用代码
private void Button_Click(object sender, RoutedEventArgs e)
{
+ proxyType = "V2Ray";
+ ResultClientInformation resultClientInformation = new ResultClientInformation();
+ resultClientInformation.ShowDialog();
+ return;
//string pwdir = AppDomain.CurrentDomain.BaseDirectory;
//MessageBox.Show(pwdir);
- ConnectionInfo connectionInfo = GenerateConnectionInfo();
- if (connectionInfo == null)
- {
- //****** "远程主机连接信息有误,请检查!" ******
- MessageBox.Show(Application.Current.FindResource("MessageBoxShow_ErrorHostConnection").ToString());
- return;
- }
- using (var client = new SshClient(connectionInfo))
- {
- client.Connect();
- if (client.IsConnected == true)
- {
- //******"主机登录成功"******
- SetUpProgressBarProcessing(3);
- currentStatus = Application.Current.FindResource("DisplayInstallInfo_LoginSuccessful").ToString();
- MainWindowsShowInfo(currentStatus);
+ //ConnectionInfo connectionInfo = GenerateConnectionInfo();
+ //if (connectionInfo == null)
+ //{
+ // //****** "远程主机连接信息有误,请检查!" ******
+ // MessageBox.Show(Application.Current.FindResource("MessageBoxShow_ErrorHostConnection").ToString());
+ // return;
+ //}
+ //using (var client = new SshClient(connectionInfo))
+ //{
+ // client.Connect();
+ // if (client.IsConnected == true)
+ // {
+ // //******"主机登录成功"******
+ // SetUpProgressBarProcessing(3);
+ // currentStatus = Application.Current.FindResource("DisplayInstallInfo_LoginSuccessful").ToString();
+ // MainWindowsShowInfo(currentStatus);
- }
- SetUpNat64(client, true);
- //FilterFastestIP(client);
- //string cmdErr = client.RunCommand(@"aaa ee").Error;
- //MessageBox.Show(cmdErr);
- //SshCommand cmdResult = client.RunCommand(@"pwd");
- //string result = cmdResult.Result;
- //MessageBox.Show("result:" + result);
- //string error = cmdResult.Error;
- //MessageBox.Show("err:" + error);
+ // }
+ // SetUpNat64(client, true);
+ //FilterFastestIP(client);
+ //string cmdErr = client.RunCommand(@"aaa ee").Error;
+ //MessageBox.Show(cmdErr);
+ //SshCommand cmdResult = client.RunCommand(@"pwd");
+ //string result = cmdResult.Result;
+ //MessageBox.Show("result:" + result);
+ //string error = cmdResult.Error;
+ //MessageBox.Show("err:" + error);
- //int cmdExitStatus = cmdResult.ExitStatus;
- //MessageBox.Show("cmdExitStatus:" + cmdExitStatus.ToString());
+ //int cmdExitStatus = cmdResult.ExitStatus;
+ //MessageBox.Show("cmdExitStatus:" + cmdExitStatus.ToString());
- //SshCommand cmdResultCat = client.RunCommand(@"cat tt.t");
- //string resultCat = cmdResultCat.Result;
- //MessageBox.Show("resultCat:" + resultCat);
- //string errorCat = cmdResultCat.Error;
- //MessageBox.Show("errCat:" + errorCat);
+ //SshCommand cmdResultCat = client.RunCommand(@"cat tt.t");
+ //string resultCat = cmdResultCat.Result;
+ //MessageBox.Show("resultCat:" + resultCat);
+ //string errorCat = cmdResultCat.Error;
+ //MessageBox.Show("errCat:" + errorCat);
- //cmdExitStatus = cmdResultCat.ExitStatus;
- //MessageBox.Show("cmdExitStatus:" + cmdExitStatus.ToString());
+ //cmdExitStatus = cmdResultCat.ExitStatus;
+ //MessageBox.Show("cmdExitStatus:" + cmdExitStatus.ToString());
- //SoftInstalledSuccessOrFail(client, "v2ray", @"/usr/local/bin/v2ray");
- //CaddyInstall(client);
- //if (client.IsConnected == true)
- //{
- // MessageBox.Show("Connected");
- //}
- //if (client.IsConnected == false)
- //{
- // MessageBox.Show("disConnected");
- //}
- }
+ //SoftInstalledSuccessOrFail(client, "v2ray", @"/usr/local/bin/v2ray");
+ //CaddyInstall(client);
+ //if (client.IsConnected == true)
+ //{
+ // MessageBox.Show("Connected");
+ //}
+ //if (client.IsConnected == false)
+ //{
+ // MessageBox.Show("disConnected");
+ //}
+ // }
}
private string CaddyInstallTest(SshClient client)
diff --git a/ProxySU/ResultClientInformation.xaml b/ProxySU/ResultClientInformation.xaml
index f42a63a..239c808 100644
--- a/ProxySU/ResultClientInformation.xaml
+++ b/ProxySU/ResultClientInformation.xaml
@@ -13,7 +13,7 @@
-
+
@@ -93,7 +93,7 @@
-
+
diff --git a/ProxySU/ResultClientInformation.xaml.cs b/ProxySU/ResultClientInformation.xaml.cs
index a719054..35c5da7 100644
--- a/ProxySU/ResultClientInformation.xaml.cs
+++ b/ProxySU/ResultClientInformation.xaml.cs
@@ -232,6 +232,13 @@ namespace ProxySU
}
else if (MainWindow.ReceiveConfigurationParameters[0].Contains("mKCP") == true)
{
+ if(MainWindow.mKCPvlessIsSet == true)
+ {
+ TextBlockVmessOrVless.Text = Application.Current.FindResource("TabItemHeaderV2RayVlessProtocol").ToString();
+ TextBoxEncryption.Text = "none";
+ HideAlterId();
+ HideGroupBoxClientQRandURL();
+ }
if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCPNone") == true)
{
TextBoxCamouflageType.Text = "none";
@@ -967,7 +974,8 @@ namespace ProxySU
if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "VlessXtlsTcp") == false
&& String.Equals(MainWindow.ReceiveConfigurationParameters[0], "VlessTcpTlsWeb") == false
&& String.Equals(MainWindow.ReceiveConfigurationParameters[0], "VlessWebSocketTlsWeb") == false
- && String.Equals(MainWindow.ReceiveConfigurationParameters[0], "VlessHttp2Web") == false)
+ && String.Equals(MainWindow.ReceiveConfigurationParameters[0], "VlessHttp2Web") == false
+ && MainWindow.mKCPvlessIsSet == false)
{
using (StreamWriter sw = new StreamWriter($"{configSavePath}\\url.txt"))
{
diff --git a/ProxySU/V2RayTemplateWindow.xaml b/ProxySU/V2RayTemplateWindow.xaml
index b00ed7b..d91612d 100644
--- a/ProxySU/V2RayTemplateWindow.xaml
+++ b/ProxySU/V2RayTemplateWindow.xaml
@@ -258,7 +258,15 @@
-
+
+
+
+
+
+
+
+
+
diff --git a/ProxySU/V2RayTemplateWindow.xaml.cs b/ProxySU/V2RayTemplateWindow.xaml.cs
index 270d507..2313de9 100644
--- a/ProxySU/V2RayTemplateWindow.xaml.cs
+++ b/ProxySU/V2RayTemplateWindow.xaml.cs
@@ -48,6 +48,7 @@ namespace ProxySU
//隐藏QUIC密钥
FirstQuicHideEncryption();
+ RadioButtonVMESSmKCP.IsChecked = true;
}
//取消不在当前活动选项卡中的其他所有选项卡中的所有RadioBuuton的选中状态
//代码参考网址:https://blog.csdn.net/weixin_42583999/article/details/103468857
@@ -557,6 +558,15 @@ namespace ProxySU
//传递uuid
MainWindow.ReceiveConfigurationParameters[2] = TextBoxNewUUID.Text.ToString();
+ if (RadioButtonVLESSmKCP.IsChecked == true)
+ {
+ MainWindow.mKCPvlessIsSet = true;
+ }
+ else
+ {
+ MainWindow.mKCPvlessIsSet = false;
+ }
+
if (domainNotEmpty)
{
this.Close();
diff --git a/ProxySU/bin/Beta/Beta.zip b/ProxySU/bin/Beta/Beta.zip
index dc3f876..9cef0cf 100644
Binary files a/ProxySU/bin/Beta/Beta.zip and b/ProxySU/bin/Beta/Beta.zip differ
diff --git a/TemplateConfg/v2ray/client/06_outbounds/vless_mkcp_client_config.json b/TemplateConfg/v2ray/client/06_outbounds/vless_mkcp_client_config.json
new file mode 100644
index 0000000..ec37bdc
--- /dev/null
+++ b/TemplateConfg/v2ray/client/06_outbounds/vless_mkcp_client_config.json
@@ -0,0 +1,33 @@
+{
+ "outbounds": [
+ {
+ "protocol": "vless",
+ "settings": {
+ "vnext": [
+ {
+ "address": null,
+ "port": null,
+ "users": [
+ {
+ "id": null,
+ "encryption": "none"
+ }
+ ]
+ }
+ ]
+ },
+ "streamSettings": {
+ "network": "kcp",
+ "kcpSettings": {
+ "uplinkCapacity": 100,
+ "downlinkCapacity": 100,
+ "congestion": true,
+ "header": {
+ "type": null
+ },
+ "seed": null
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/TemplateConfg/v2ray/server/05_inbounds/vless_mkcp_server_config.json b/TemplateConfg/v2ray/server/05_inbounds/vless_mkcp_server_config.json
new file mode 100644
index 0000000..4c7f4c2
--- /dev/null
+++ b/TemplateConfg/v2ray/server/05_inbounds/vless_mkcp_server_config.json
@@ -0,0 +1,28 @@
+{
+ "inbounds": [
+ {
+ "port": null,
+ "protocol": "vless",
+ "settings": {
+ "clients": [
+ {
+ "id": null
+ }
+ ],
+ "decryption": "none"
+ },
+ "streamSettings": {
+ "network": "mkcp",
+ "kcpSettings": {
+ "uplinkCapacity": 100,
+ "downlinkCapacity": 100,
+ "congestion": true,
+ "header": {
+ "type": null
+ },
+ "seed": null
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file