diff --git a/ProxySU/MainWindow.xaml b/ProxySU/MainWindow.xaml
index d77ea5f..289188f 100644
--- a/ProxySU/MainWindow.xaml
+++ b/ProxySU/MainWindow.xaml
@@ -121,12 +121,12 @@
-
-
+
-
-
+
+ -->
-
+
diff --git a/ProxySU/MainWindow.xaml.cs b/ProxySU/MainWindow.xaml.cs
index e5e32a3..1bc6d80 100644
--- a/ProxySU/MainWindow.xaml.cs
+++ b/ProxySU/MainWindow.xaml.cs
@@ -216,8 +216,8 @@ namespace ProxySU
}
else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned"))
{
- serverConfig = "TemplateConfg\\WebSocket_TLS_selfSigned_server_config.json";
- clientConfig = "TemplateConfg\\WebSocket_TLS_selfSigned_client_config.json";
+ serverConfig = "TemplateConfg\\WebSocketTLS_selfSigned_server_config.json";
+ clientConfig = "TemplateConfg\\WebSocketTLS_selfSigned_client_config.json";
}
else if (String.Equals(ReceiveConfigurationParameters[0], "WebSocketTLS2Web"))
{
@@ -231,13 +231,13 @@ namespace ProxySU
}
else if (String.Equals(ReceiveConfigurationParameters[0], "http2Web"))
{
- serverConfig = "TemplateConfg\\http2Web_server_config.json";
- clientConfig = "TemplateConfg\\http2Web_client_config.json";
+ serverConfig = "TemplateConfg\\Http2Web_server_config.json";
+ clientConfig = "TemplateConfg\\Http2Web_client_config.json";
}
else if (String.Equals(ReceiveConfigurationParameters[0], "http2selfSigned"))
{
- serverConfig = "TemplateConfg\\http2selfSigned_server_config.json";
- clientConfig = "TemplateConfg\\http2selfSigned_client_config.json";
+ serverConfig = "TemplateConfg\\Http2selfSigned_server_config.json";
+ clientConfig = "TemplateConfg\\Http2selfSigned_client_config.json";
}
//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"))
@@ -571,7 +571,7 @@ namespace ProxySU
}
else
{
- currentStatus = "域名未能正确解析到当前VPS的IP上!";
+ currentStatus = "域名未能正确解析到当前VPS的IP上!安装失败!";
textBlockName.Dispatcher.BeginInvoke(updateAction, textBlockName, progressBar, currentStatus);
Thread.Sleep(1000);
MessageBox.Show("域名未能正确解析到当前VPS的IP上,请检查!若解析设置正确,请等待生效后再重试安装。如果域名使用了CDN,请先关闭!");
@@ -579,7 +579,7 @@ namespace ProxySU
}
}
- if (serverConfig.Contains("TLS") == true || serverConfig.Contains("http2") == true) {
+ if (serverConfig.Contains("TLS") == true || serverConfig.Contains("http2") == true || serverConfig.Contains("Http2") == true) {
//检测是否安装lsof
if (string.IsNullOrEmpty(client.RunCommand("command -v lsof").Result) == true)
{
@@ -667,28 +667,34 @@ namespace ProxySU
JObject serverJson = (JObject)JToken.ReadFrom(new JsonTextReader(reader));
//设置uuid
serverJson["inbounds"][0]["settings"]["clients"][0]["id"] = ReceiveConfigurationParameters[2];
- //除WebSocketTLSWeb模式外设置监听端口
- if (serverConfig.Contains("WebSocketTLSWeb") == false && serverConfig.Contains("http2Web") == false)
+ //除WebSocketTLSWeb/http2Web模式外设置监听端口
+ if (serverConfig.Contains("WebSocketTLSWeb") == false && serverConfig.Contains("Http2Web") == false)
{
serverJson["inbounds"][0]["port"] = int.Parse(ReceiveConfigurationParameters[1]);
}
- //TLS自签证书模式下
- if (serverConfig.Contains("selfSigned") == true)
+ //TLS自签证书/http2Web模式下,使用v2ctl 生成自签证书
+ if (serverConfig.Contains("selfSigned") == true|| serverConfig.Contains("Http2Web") == true)
{
string selfSignedCa = client.RunCommand("/usr/bin/v2ray/v2ctl cert --ca").Result;
JObject selfSignedCaJObject = JObject.Parse(selfSignedCa);
serverJson["inbounds"][0]["streamSettings"]["tlsSettings"]["certificates"][0] = selfSignedCaJObject;
}
- //如果是WebSocketTLSWeb模式,则设置路径
+ //如果是WebSocketTLSWeb/WebSocketTLS/WebSocketTLS(自签证书)模式,则设置路径
if (serverConfig.Contains("WebSocket") == true)
{
serverJson["inbounds"][0]["streamSettings"]["wsSettings"]["path"] = ReceiveConfigurationParameters[3];
}
//如果是Http2模式下,设置路径
- if (serverConfig.Contains("http2") == true)
+ if (serverConfig.Contains("http2") == true|| serverConfig.Contains("Http2") == true)
{
serverJson["inbounds"][0]["streamSettings"]["httpSettings"]["path"] = ReceiveConfigurationParameters[3];
}
+ //如果是Http2Web模式下,设置host
+ if (serverConfig.Contains("Http2Web") == true)
+ {
+ serverJson["inbounds"][0]["streamSettings"]["httpSettings"]["path"] = ReceiveConfigurationParameters[3];
+ serverJson["inbounds"][0]["streamSettings"]["httpSettings"]["host"][0] = ReceiveConfigurationParameters[4];
+ }
//mkcp模式下,设置伪装类型
if (serverConfig.Contains("mkcp") == true)
{
@@ -744,7 +750,7 @@ namespace ProxySU
}
//如果是WebSocket + TLS + Web模式,需要安装Caddy
- if (serverConfig.Contains("WebSocketTLSWeb")==true || serverConfig.Contains("http2Web") == true)
+ if (serverConfig.Contains("WebSocketTLSWeb")==true || serverConfig.Contains("Http2Web") == true)
{
currentStatus = "使用WebSocket+TLS+Web/HTTP2+TLS+Web模式,正在安装Caddy......";
textBlockName.Dispatcher.BeginInvoke(updateAction, textBlockName, progressBar, currentStatus);
@@ -763,9 +769,9 @@ namespace ProxySU
{
serverConfig = "TemplateConfg\\WebSocketTLSWeb_server_config.caddyfile";
}
- if (serverConfig.Contains("http2Web") == true)
+ if (serverConfig.Contains("Http2Web") == true)
{
- serverConfig = "TemplateConfg\\http2Web_server_config.caddyfile";
+ serverConfig = "TemplateConfg\\Http2Web_server_config.caddyfile";
}
upLoadPath = "/etc/caddy/Caddyfile";
UploadConfig(connectionInfo, serverConfig, upLoadPath);
@@ -804,7 +810,7 @@ namespace ProxySU
if (serverConfig.Contains("http2") == true|| serverConfig.Contains("WebSocket_TLS") ==true|| serverConfig.Contains("tcp_TLS") == true)
{
- currentStatus = "使用Http2/WebSocket +TLS/tcp+TLS模式,正在安装acme.sh......";
+ currentStatus = "使用Http2/WebSocket+TLS/tcp+TLS模式,正在安装acme.sh......";
textBlockName.Dispatcher.BeginInvoke(updateAction, textBlockName, progressBar, currentStatus);
Thread.Sleep(1000);
@@ -871,10 +877,14 @@ namespace ProxySU
{
clientJson["outbounds"][0]["streamSettings"]["wsSettings"]["path"] = ReceiveConfigurationParameters[3];
}
- if (clientConfig.Contains("http2") == true)
+ if (clientConfig.Contains("http2") == true|| clientConfig.Contains("Http2") == true)
{
clientJson["outbounds"][0]["streamSettings"]["httpSettings"]["path"] = ReceiveConfigurationParameters[3];
}
+ if (clientConfig.Contains("Http2Web") == true)
+ {
+ clientJson["outbounds"][0]["streamSettings"]["httpSettings"]["host"][0] = ReceiveConfigurationParameters[4];
+ }
if (clientConfig.Contains("mkcp")==true)
{
clientJson["outbounds"][0]["streamSettings"]["kcpSettings"]["header"]["type"] = ReceiveConfigurationParameters[5];
diff --git a/ProxySU/ResultClientInformation.xaml b/ProxySU/ResultClientInformation.xaml
index 7b1abe8..20d53b7 100644
--- a/ProxySU/ResultClientInformation.xaml
+++ b/ProxySU/ResultClientInformation.xaml
@@ -33,41 +33,46 @@
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -77,7 +82,7 @@
-
+
diff --git a/ProxySU/ResultClientInformation.xaml.cs b/ProxySU/ResultClientInformation.xaml.cs
index 698d73d..3c77d92 100644
--- a/ProxySU/ResultClientInformation.xaml.cs
+++ b/ProxySU/ResultClientInformation.xaml.cs
@@ -41,6 +41,8 @@ namespace ProxySU
TextBoxPath.Text = MainWindow.ReceiveConfigurationParameters[3];
//主机地址
TextBoxHostAddress.Text = MainWindow.ReceiveConfigurationParameters[4];
+ //TLS的Host
+ TextBoxHost.Text = "";
//加密方式,一般都为auto
TextBoxEncryption.Text = "auto";
//伪装类型
@@ -52,16 +54,32 @@ namespace ProxySU
{
TextBoxTransmission.Text = "ws";
TextBoxCamouflageType.Text = "none";
- ShowPathAndTLS();
- HideQuicKey();
TextBoxTLS.Text = "tls";
+ ShowPath();
+ HideQuicKey();
+ }
+ else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "TCP"))
+ {
+ TextBoxTransmission.Text = "tcp";
+ TextBoxCamouflageType.Text = "none";
+ TextBoxTLS.Text = "none";
+ HidePath();
+ HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "TCPhttp"))
{
TextBoxTransmission.Text = "tcp";
TextBoxCamouflageType.Text = "http";
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
+ HideQuicKey();
+ }
+ else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "tcpTLS"))
+ {
+ TextBoxTransmission.Text = "tcp";
+ TextBoxCamouflageType.Text = "none";
+ TextBoxTLS.Text = "tls";
+ HidePath();
HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "tcpTLSselfSigned"))
@@ -69,34 +87,56 @@ namespace ProxySU
TextBoxTransmission.Text = "tcp";
TextBoxCamouflageType.Text = "none";
TextBoxTLS.Text = "tls";
- HidePathAndTLS();
+ HidePath();
HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "webSocket"))
{
TextBoxTransmission.Text = "ws";
TextBoxCamouflageType.Text = "none";
- //TextBoxPath.Text = "/";
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "WebSocketTLS"))
{
TextBoxTransmission.Text = "ws";
TextBoxCamouflageType.Text = "none";
- //TextBoxPath.Text = "/";
TextBoxTLS.Text = "tls";
- HidePathAndTLS();
+ ShowPath();
HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "WebSocketTLSselfSigned"))
{
TextBoxTransmission.Text = "ws";
TextBoxCamouflageType.Text = "none";
- //TextBoxPath.Text = "/";
TextBoxTLS.Text = "tls";
- HidePathAndTLS();
+ ShowPath();
+ HideQuicKey();
+ }
+ else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "Http2"))
+ {
+ TextBoxTransmission.Text = "h2";
+ TextBoxCamouflageType.Text = "none";
+ TextBoxTLS.Text = "tls";
+ ShowPath();
+ HideQuicKey();
+ }
+ else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "http2Web"))
+ {
+ TextBoxTransmission.Text = "h2";
+ TextBoxCamouflageType.Text = "none";
+ TextBoxHost.Text = MainWindow.ReceiveConfigurationParameters[4];
+ TextBoxTLS.Text = "tls";
+ ShowPath();
+ HideQuicKey();
+ }
+ else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "http2selfSigned"))
+ {
+ TextBoxTransmission.Text = "h2";
+ TextBoxCamouflageType.Text = "none";
+ TextBoxTLS.Text = "tls";
+ ShowPath();
HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCPNone"))
@@ -104,7 +144,7 @@ namespace ProxySU
TextBoxTransmission.Text = "kcp";
TextBoxCamouflageType.Text = "none";
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCP2SRTP"))
@@ -112,7 +152,7 @@ namespace ProxySU
TextBoxTransmission.Text = "kcp";
TextBoxCamouflageType.Text = "srtp";
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCPuTP"))
@@ -120,7 +160,7 @@ namespace ProxySU
TextBoxTransmission.Text = "kcp";
TextBoxCamouflageType.Text = "utp";
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCP2WechatVideo"))
@@ -128,7 +168,7 @@ namespace ProxySU
TextBoxTransmission.Text = "kcp";
TextBoxCamouflageType.Text = "wechat-video";
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCP2DTLS"))
@@ -136,7 +176,7 @@ namespace ProxySU
TextBoxTransmission.Text = "kcp";
TextBoxCamouflageType.Text = "dtls";
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCP2WireGuard"))
@@ -144,7 +184,7 @@ namespace ProxySU
TextBoxTransmission.Text = "kcp";
TextBoxCamouflageType.Text = "wireguard";
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
HideQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "QuicNone"))
@@ -153,7 +193,7 @@ namespace ProxySU
TextBoxCamouflageType.Text = "none";
TextBoxQuicKey.Text = MainWindow.ReceiveConfigurationParameters[6];
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
ShowQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "QuicSRTP"))
@@ -162,7 +202,7 @@ namespace ProxySU
TextBoxCamouflageType.Text = "srtp";
TextBoxQuicKey.Text = MainWindow.ReceiveConfigurationParameters[6];
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
ShowQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "Quic2uTP"))
@@ -171,7 +211,7 @@ namespace ProxySU
TextBoxCamouflageType.Text = "utp";
TextBoxQuicKey.Text = MainWindow.ReceiveConfigurationParameters[6];
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
ShowQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "QuicWechatVideo"))
@@ -180,7 +220,7 @@ namespace ProxySU
TextBoxCamouflageType.Text = "wechat-video";
TextBoxQuicKey.Text = MainWindow.ReceiveConfigurationParameters[6];
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
ShowQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "QuicDTLS"))
@@ -189,7 +229,7 @@ namespace ProxySU
TextBoxCamouflageType.Text = "dtls";
TextBoxQuicKey.Text = MainWindow.ReceiveConfigurationParameters[6];
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
ShowQuicKey();
}
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "QuicWireGuard"))
@@ -198,76 +238,50 @@ namespace ProxySU
TextBoxCamouflageType.Text = "wireguard";
TextBoxQuicKey.Text = MainWindow.ReceiveConfigurationParameters[6];
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
ShowQuicKey();
}
- else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "Http2"))
- {
- TextBoxTransmission.Text = "h2";
- TextBoxCamouflageType.Text = "none";
- ShowPathAndTLS();
- HideQuicKey();
- TextBoxTLS.Text = "tls";
- }
- //else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "TLS"))
- //{
- // TextBoxTransmission.Text = "tcp";
- // TextBoxCamouflageType.Text = "none";
- // TextBoxTLS.Text = "tls";
- // HidePathAndTLS();
- // HideQuicKey();
- //}
+
else
{
TextBoxTransmission.Text = "tcp";
TextBoxCamouflageType.Text = "none";
TextBoxTLS.Text = "none";
- HidePathAndTLS();
+ HidePath();
HideQuicKey();
}
CheckDir("config");
- //if (!Directory.Exists("config"))//如果不存在就创建file文件夹
- //{
- // Directory.CreateDirectory("config");//创建该文件夹
- //}
+
GenerateV2rayShareQRcodeAndBase64Url();
}
- private void HidePathAndTLS()
+ private void HidePath()
{
TextBlockPath.Visibility = Visibility.Collapsed;
TextBoxPath.Visibility = Visibility.Collapsed;
TextBlockPathExplain.Visibility = Visibility.Collapsed;
- //TextBlocTLSonOrNo.Visibility = Visibility.Collapsed;
- //TextBoxTLS.Visibility = Visibility.Collapsed;
- //TextBlocTLSonOrNoExplain.Visibility = Visibility.Collapsed;
+
}
- private void ShowPathAndTLS()
+ private void ShowPath()
{
TextBlockPath.Visibility = Visibility.Visible;
TextBoxPath.Visibility = Visibility.Visible;
TextBlockPathExplain.Visibility = Visibility.Visible;
- //TextBlocTLSonOrNo.Visibility = Visibility.Visible;
- //TextBoxTLS.Visibility = Visibility.Visible;
- //TextBlocTLSonOrNoExplain.Visibility = Visibility.Visible;
+
}
private void HideQuicKey()
{
TextBlockQuicKey.Visibility = Visibility.Collapsed;
TextBoxQuicKey.Visibility = Visibility.Collapsed;
TextBlockQuicKeyExplain.Visibility = Visibility.Collapsed;
- //TextBlocTLSonOrNo.Visibility = Visibility.Collapsed;
- //TextBoxTLS.Visibility = Visibility.Collapsed;
- //TextBlocTLSonOrNoExplain.Visibility = Visibility.Collapsed;
+
}
private void ShowQuicKey()
{
TextBlockQuicKey.Visibility = Visibility.Visible;
TextBoxQuicKey.Visibility = Visibility.Visible;
TextBlockQuicKeyExplain.Visibility = Visibility.Visible;
- //TextBlocTLSonOrNo.Visibility = Visibility.Visible;
- //TextBoxTLS.Visibility = Visibility.Visible;
- //TextBlocTLSonOrNoExplain.Visibility = Visibility.Visible;
+
}
//生成v2rayN客户端导入文件
private void GenerateV2rayShareQRcodeAndBase64Url()
@@ -296,6 +310,7 @@ namespace ProxySU
v2rayNjsonObject["aid"] = TextBoxUUIDextra.Text; //设置额外ID
v2rayNjsonObject["net"] = TextBoxTransmission.Text; //设置传输模式
v2rayNjsonObject["type"] = TextBoxCamouflageType.Text; //设置伪装类型
+
if (TextBoxTransmission.Text.Contains("quic")==true)
{
v2rayNjsonObject["path"] = TextBoxQuicKey.Text;//设置quic密钥
@@ -304,9 +319,9 @@ namespace ProxySU
else
{
v2rayNjsonObject["path"] = TextBoxPath.Text; //设置路径
- v2rayNjsonObject["host"] = "";
+ v2rayNjsonObject["host"] = TextBoxHost.Text;//设置TLS的Host
}
-
+
v2rayNjsonObject["tls"] = TextBoxTLS.Text; //设置是否启用TLS
v2rayNjsonObject["ps"] = v2rayNjsonObject["add"]; //设置备注
//MessageBox.Show(v2rayNjsonObject["v"].ToString());
@@ -364,6 +379,7 @@ namespace ProxySU
sw.WriteLine($"传输协议:{TextBoxTransmission.Text}");
sw.WriteLine($"伪装类型:{TextBoxCamouflageType.Text}");
sw.WriteLine($"是否使用TLS:{TextBoxTLS.Text}");
+ sw.WriteLine($"host:{TextBoxHostAddress.Text}");
sw.WriteLine($"路径(Path):{TextBoxPath.Text}");
sw.WriteLine($"QUIC密钥:{TextBoxQuicKey.Text}");
}
diff --git a/ProxySU/TemplateConfiguration.xaml b/ProxySU/TemplateConfiguration.xaml
index 3f97281..a9a2e3c 100644
--- a/ProxySU/TemplateConfiguration.xaml
+++ b/ProxySU/TemplateConfiguration.xaml
@@ -119,7 +119,7 @@
-
+
diff --git a/ProxySU/TemplateConfiguration.xaml.cs b/ProxySU/TemplateConfiguration.xaml.cs
index f84dbcb..3aecfc5 100644
--- a/ProxySU/TemplateConfiguration.xaml.cs
+++ b/ProxySU/TemplateConfiguration.xaml.cs
@@ -200,8 +200,8 @@ namespace ProxySU
}
}
}
- //WebSocket+TLS(自签证书)模式被选中
- else if (RadioButtonWebSocketTLSselfSigned.IsChecked == true)
+ //http2(自签证书)模式被选中
+ else if (RadioButtonHTTP2selfSigned.IsChecked == true)
{
//传递模板类型
MainWindow.ReceiveConfigurationParameters[0] = "http2selfSigned";
@@ -348,92 +348,6 @@ namespace ProxySU
//清除其他选项卡中的选项
UncheckLayouts((TabItem)TabControlTemplate.SelectedItem);
}
- private void RadioButtonWebSocketTLS2Web_Checked(object sender, RoutedEventArgs e)
- {
- //TextBlockServerListenPort.Visibility = Visibility.Visible;
- //TextBoxServerListenPort.Visibility = Visibility.Visible;
- //ButtonServerListenPort.Visibility = Visibility.Visible;
- TextBoxServerListenPort.Text = "443";
- //显示Path
- TextBlockPath.Visibility = Visibility.Visible;
- TextBoxPath.Visibility = Visibility.Visible;
- TextBoxPath.Text = "/ray";
- ButtonPath.Visibility = Visibility.Visible;
- //显示域名
- TextBlockDomain.Visibility = Visibility.Visible;
- TextBoxDomain.Visibility = Visibility.Visible;
- //ButtonDomain.Visibility = Visibility.Visible;
- //隐藏QUIC密钥
- TextBlockQuicUUID.Visibility = Visibility.Collapsed;
- TextBoxQuicUUID.Visibility = Visibility.Collapsed;
- ButtonQuicUUID.Visibility = Visibility.Collapsed;
- //显示伪装网站
- TextBlockMaskSites.Visibility = Visibility.Visible;
- TextBoxMaskSites.Visibility = Visibility.Visible;
-
- Guid uuid = Guid.NewGuid();
- TextBoxNewUUID.Text = uuid.ToString();
- //清除其他选项卡中的选项
- UncheckLayouts((TabItem)TabControlTemplate.SelectedItem);
- }
- private void RadioButtonWebSocketTLSselfSigned_Checked(object sender, RoutedEventArgs e)
- {
- //TextBlockServerListenPort.Visibility = Visibility.Visible;
- //TextBoxServerListenPort.Visibility = Visibility.Visible;
- //ButtonServerListenPort.Visibility = Visibility.Visible;
- TextBoxServerListenPort.Text = "443";
- //显示Path
- TextBlockPath.Visibility = Visibility.Visible;
- TextBoxPath.Visibility = Visibility.Visible;
- TextBoxPath.Text = "/ray";
- ButtonPath.Visibility = Visibility.Visible;
- //显示域名
- TextBlockDomain.Visibility = Visibility.Collapsed;
- TextBoxDomain.Visibility = Visibility.Collapsed;
- //TextBoxDomain.Tag = "可为空";
- //ButtonDomain.Visibility = Visibility.Visible;
- //隐藏QUIC密钥
- TextBlockQuicUUID.Visibility = Visibility.Collapsed;
- TextBoxQuicUUID.Visibility = Visibility.Collapsed;
- ButtonQuicUUID.Visibility = Visibility.Collapsed;
- //隐藏伪装网站
- TextBlockMaskSites.Visibility = Visibility.Collapsed;
- TextBoxMaskSites.Visibility = Visibility.Collapsed;
-
- Guid uuid = Guid.NewGuid();
- TextBoxNewUUID.Text = uuid.ToString();
- //清除其他选项卡中的选项
- UncheckLayouts((TabItem)TabControlTemplate.SelectedItem);
- }
-
- private void RadioButtonHTTP2_Checked(object sender, RoutedEventArgs e)
- {
- //TextBlockServerListenPort.Visibility = Visibility.Visible;
- //TextBoxServerListenPort.Visibility = Visibility.Visible;
- //ButtonServerListenPort.Visibility = Visibility.Visible;
- TextBoxServerListenPort.Text = "443";
- //显示Path
- TextBlockPath.Visibility = Visibility.Collapsed;
- TextBoxPath.Visibility = Visibility.Collapsed;
- //TextBoxPath.Text = "/ray";
- ButtonPath.Visibility = Visibility.Collapsed;
- //显示域名
- TextBlockDomain.Visibility = Visibility.Visible;
- TextBoxDomain.Visibility = Visibility.Visible;
- //ButtonDomain.Visibility = Visibility.Visible;
- //隐藏QUIC密钥
- TextBlockQuicUUID.Visibility = Visibility.Collapsed;
- TextBoxQuicUUID.Visibility = Visibility.Collapsed;
- ButtonQuicUUID.Visibility = Visibility.Collapsed;
- //隐藏伪装网站
- TextBlockMaskSites.Visibility = Visibility.Collapsed;
- TextBoxMaskSites.Visibility = Visibility.Collapsed;
-
- Guid uuid = Guid.NewGuid();
- TextBoxNewUUID.Text = uuid.ToString();
- //清除其他选项卡中的选项
- UncheckLayouts((TabItem)TabControlTemplate.SelectedItem);
- }
private void RadioButtonTCPhttp_Checked(object sender, RoutedEventArgs e)
{
//TextBlockServerListenPort.Visibility = Visibility.Visible;
@@ -462,36 +376,6 @@ namespace ProxySU
//清除其他选项卡中的选项
UncheckLayouts((TabItem)TabControlTemplate.SelectedItem);
}
- private void RadioButtonQuicNone_Checked(object sender, RoutedEventArgs e)
- {
- //显示QUIC密钥
- TextBlockQuicUUID.Visibility = Visibility.Visible;
- TextBoxQuicUUID.Visibility = Visibility.Visible;
- ButtonQuicUUID.Visibility = Visibility.Visible;
- //隐藏Path
- TextBlockPath.Visibility = Visibility.Collapsed;
- TextBoxPath.Visibility = Visibility.Collapsed;
- ButtonPath.Visibility = Visibility.Collapsed;
- //隐藏域名
- TextBlockDomain.Visibility = Visibility.Collapsed;
- TextBoxDomain.Visibility = Visibility.Collapsed;
- ButtonDomain.Visibility = Visibility.Collapsed;
- //隐藏伪装网站
- TextBlockMaskSites.Visibility = Visibility.Collapsed;
- TextBoxMaskSites.Visibility = Visibility.Collapsed;
-
- Guid uuid = Guid.NewGuid();
- TextBoxNewUUID.Text = uuid.ToString();
-
- uuid = Guid.NewGuid();
- TextBoxQuicUUID.Text = uuid.ToString();
-
- Random random = new Random();
- int randomServerPort = random.Next(10000, 50000);
- TextBoxServerListenPort.Text = randomServerPort.ToString();
- //清除其他选项卡中的选项
- UncheckLayouts((TabItem)TabControlTemplate.SelectedItem);
- }
private void RadioButtonTCP2TLS_Checked(object sender, RoutedEventArgs e)
{
TextBoxServerListenPort.Text = "443";
@@ -542,6 +426,121 @@ namespace ProxySU
//清除其他选项卡中的选项
UncheckLayouts((TabItem)TabControlTemplate.SelectedItem);
}
+ private void RadioButtonWebSocketTLS2Web_Checked(object sender, RoutedEventArgs e)
+ {
+ //TextBlockServerListenPort.Visibility = Visibility.Visible;
+ //TextBoxServerListenPort.Visibility = Visibility.Visible;
+ //ButtonServerListenPort.Visibility = Visibility.Visible;
+ TextBoxServerListenPort.Text = "443";
+ //显示Path
+ TextBlockPath.Visibility = Visibility.Visible;
+ TextBoxPath.Visibility = Visibility.Visible;
+ TextBoxPath.Text = "/ray";
+ ButtonPath.Visibility = Visibility.Visible;
+ //显示域名
+ TextBlockDomain.Visibility = Visibility.Visible;
+ TextBoxDomain.Visibility = Visibility.Visible;
+ //ButtonDomain.Visibility = Visibility.Visible;
+ //隐藏QUIC密钥
+ TextBlockQuicUUID.Visibility = Visibility.Collapsed;
+ TextBoxQuicUUID.Visibility = Visibility.Collapsed;
+ ButtonQuicUUID.Visibility = Visibility.Collapsed;
+ //显示伪装网站
+ TextBlockMaskSites.Visibility = Visibility.Visible;
+ TextBoxMaskSites.Visibility = Visibility.Visible;
+
+ Guid uuid = Guid.NewGuid();
+ TextBoxNewUUID.Text = uuid.ToString();
+ //清除其他选项卡中的选项
+ UncheckLayouts((TabItem)TabControlTemplate.SelectedItem);
+ }
+ private void RadioButtonWebSocketTLSselfSigned_Checked(object sender, RoutedEventArgs e)
+ {
+ //TextBlockServerListenPort.Visibility = Visibility.Visible;
+ //TextBoxServerListenPort.Visibility = Visibility.Visible;
+ //ButtonServerListenPort.Visibility = Visibility.Visible;
+ TextBoxServerListenPort.Text = "443";
+ //显示Path
+ TextBlockPath.Visibility = Visibility.Visible;
+ TextBoxPath.Visibility = Visibility.Visible;
+ TextBoxPath.Text = "/ray";
+ ButtonPath.Visibility = Visibility.Visible;
+ //隐藏域名
+ TextBlockDomain.Visibility = Visibility.Collapsed;
+ TextBoxDomain.Visibility = Visibility.Collapsed;
+ //TextBoxDomain.Tag = "可为空";
+ //ButtonDomain.Visibility = Visibility.Visible;
+ //隐藏QUIC密钥
+ TextBlockQuicUUID.Visibility = Visibility.Collapsed;
+ TextBoxQuicUUID.Visibility = Visibility.Collapsed;
+ ButtonQuicUUID.Visibility = Visibility.Collapsed;
+ //隐藏伪装网站
+ TextBlockMaskSites.Visibility = Visibility.Collapsed;
+ TextBoxMaskSites.Visibility = Visibility.Collapsed;
+
+ Guid uuid = Guid.NewGuid();
+ TextBoxNewUUID.Text = uuid.ToString();
+ //清除其他选项卡中的选项
+ UncheckLayouts((TabItem)TabControlTemplate.SelectedItem);
+ }
+ private void RadioButtonHTTP2_Checked(object sender, RoutedEventArgs e)
+ {
+ //TextBlockServerListenPort.Visibility = Visibility.Visible;
+ //TextBoxServerListenPort.Visibility = Visibility.Visible;
+ //ButtonServerListenPort.Visibility = Visibility.Visible;
+ TextBoxServerListenPort.Text = "443";
+ //显示Path
+ TextBlockPath.Visibility = Visibility.Visible;
+ TextBoxPath.Visibility = Visibility.Visible;
+ TextBoxPath.Text = "/ray";
+ ButtonPath.Visibility = Visibility.Visible;
+ //显示域名
+ TextBlockDomain.Visibility = Visibility.Visible;
+ TextBoxDomain.Visibility = Visibility.Visible;
+ //ButtonDomain.Visibility = Visibility.Visible;
+ //隐藏QUIC密钥
+ TextBlockQuicUUID.Visibility = Visibility.Collapsed;
+ TextBoxQuicUUID.Visibility = Visibility.Collapsed;
+ ButtonQuicUUID.Visibility = Visibility.Collapsed;
+ //隐藏伪装网站
+ TextBlockMaskSites.Visibility = Visibility.Collapsed;
+ TextBoxMaskSites.Visibility = Visibility.Collapsed;
+
+ Guid uuid = Guid.NewGuid();
+ TextBoxNewUUID.Text = uuid.ToString();
+ //清除其他选项卡中的选项
+ UncheckLayouts((TabItem)TabControlTemplate.SelectedItem);
+ }
+ private void RadioButtonQuicNone_Checked(object sender, RoutedEventArgs e)
+ {
+ //显示QUIC密钥
+ TextBlockQuicUUID.Visibility = Visibility.Visible;
+ TextBoxQuicUUID.Visibility = Visibility.Visible;
+ ButtonQuicUUID.Visibility = Visibility.Visible;
+ //隐藏Path
+ TextBlockPath.Visibility = Visibility.Collapsed;
+ TextBoxPath.Visibility = Visibility.Collapsed;
+ ButtonPath.Visibility = Visibility.Collapsed;
+ //隐藏域名
+ TextBlockDomain.Visibility = Visibility.Collapsed;
+ TextBoxDomain.Visibility = Visibility.Collapsed;
+ ButtonDomain.Visibility = Visibility.Collapsed;
+ //隐藏伪装网站
+ TextBlockMaskSites.Visibility = Visibility.Collapsed;
+ TextBoxMaskSites.Visibility = Visibility.Collapsed;
+
+ Guid uuid = Guid.NewGuid();
+ TextBoxNewUUID.Text = uuid.ToString();
+
+ uuid = Guid.NewGuid();
+ TextBoxQuicUUID.Text = uuid.ToString();
+
+ Random random = new Random();
+ int randomServerPort = random.Next(10000, 50000);
+ TextBoxServerListenPort.Text = randomServerPort.ToString();
+ //清除其他选项卡中的选项
+ UncheckLayouts((TabItem)TabControlTemplate.SelectedItem);
+ }
#endregion
//产生随机的uuid
diff --git a/ProxySU/bin/Release/ProxySU.exe b/ProxySU/bin/Release/ProxySU.exe
index f18b754..73d70d3 100644
Binary files a/ProxySU/bin/Release/ProxySU.exe and b/ProxySU/bin/Release/ProxySU.exe differ
diff --git a/ProxySU/bin/Release/Release.zip b/ProxySU/bin/Release/Release.zip
index 0781301..74d4c79 100644
Binary files a/ProxySU/bin/Release/Release.zip and b/ProxySU/bin/Release/Release.zip differ
diff --git a/ProxySU/bin/Release/TemplateConfg/WebSocket_TLS_selfSigned_client_config.json b/ProxySU/bin/Release/TemplateConfg/WebSocketTLS_selfSigned_client_config.json
similarity index 100%
rename from ProxySU/bin/Release/TemplateConfg/WebSocket_TLS_selfSigned_client_config.json
rename to ProxySU/bin/Release/TemplateConfg/WebSocketTLS_selfSigned_client_config.json
index 7f2d477..28d0957 100644
--- a/ProxySU/bin/Release/TemplateConfg/WebSocket_TLS_selfSigned_client_config.json
+++ b/ProxySU/bin/Release/TemplateConfg/WebSocketTLS_selfSigned_client_config.json
@@ -39,10 +39,10 @@
},
"streamSettings": {
"network": "ws",
- "security": "tls",
"wsSettings": {
"path": null
},
+ "security": "tls",
"tlsSettings": {
"allowInsecure": true
}
diff --git a/ProxySU/bin/Release/TemplateConfg/WebSocket_TLS_selfSigned_server_config.json b/ProxySU/bin/Release/TemplateConfg/WebSocketTLS_selfSigned_server_config.json
similarity index 100%
rename from ProxySU/bin/Release/TemplateConfg/WebSocket_TLS_selfSigned_server_config.json
rename to ProxySU/bin/Release/TemplateConfg/WebSocketTLS_selfSigned_server_config.json
diff --git a/ProxySU/bin/Release/TemplateConfg/WebSocket_TLS_client_config.json b/ProxySU/bin/Release/TemplateConfg/WebSocket_TLS_client_config.json
index bc33578..e5f2c6f 100644
--- a/ProxySU/bin/Release/TemplateConfg/WebSocket_TLS_client_config.json
+++ b/ProxySU/bin/Release/TemplateConfg/WebSocket_TLS_client_config.json
@@ -38,8 +38,8 @@
]
},
"streamSettings": {
- "network": "ws",
"security": "tls",
+ "network": "ws",
"wsSettings": {
"path": null
}
diff --git a/ProxySU/bin/Release/TemplateConfg/http2Web_client_config.json b/ProxySU/bin/Release/TemplateConfg/http2Web_client_config.json
index ab763bb..69e2d6e 100644
--- a/ProxySU/bin/Release/TemplateConfg/http2Web_client_config.json
+++ b/ProxySU/bin/Release/TemplateConfg/http2Web_client_config.json
@@ -41,7 +41,10 @@
"network": "h2",
"security": "tls",
"httpSettings": {
- "path": null
+ "path": null,
+ "host": [
+ ""
+ ]
}
}
}
diff --git a/ProxySU/bin/Release/TemplateConfg/http2Web_server_config.caddyfile b/ProxySU/bin/Release/TemplateConfg/http2Web_server_config.caddyfile
index 7490061..92e675a 100644
--- a/ProxySU/bin/Release/TemplateConfg/http2Web_server_config.caddyfile
+++ b/ProxySU/bin/Release/TemplateConfg/http2Web_server_config.caddyfile
@@ -3,7 +3,7 @@
errors stderr
root /var/www
tls off
- ##sites##
+ ##sites##
proxy ##path## https://localhost:10000 {
insecure_skip_verify
header_upstream Host {host}
diff --git a/ProxySU/bin/Release/TemplateConfg/http2Web_server_config.json b/ProxySU/bin/Release/TemplateConfg/http2Web_server_config.json
index 4efed3d..df87596 100644
--- a/ProxySU/bin/Release/TemplateConfg/http2Web_server_config.json
+++ b/ProxySU/bin/Release/TemplateConfg/http2Web_server_config.json
@@ -16,7 +16,10 @@
"network": "h2",
"security": "tls",
"httpSettings": {
- "path": null
+ "path": null,
+ "host": [
+ ""
+ ]
},
"tlsSettings": {
"certificates": [
diff --git a/ProxySU/bin/Release/TemplateConfg/http2selfSigned_client_config.json b/ProxySU/bin/Release/TemplateConfg/http2selfSigned_client_config.json
index ca23c19..a56ac4f 100644
--- a/ProxySU/bin/Release/TemplateConfg/http2selfSigned_client_config.json
+++ b/ProxySU/bin/Release/TemplateConfg/http2selfSigned_client_config.json
@@ -39,13 +39,13 @@
},
"streamSettings": {
"network": "h2",
- "security": "tls",
"httpSettings": {
"path": null
},
+ "security": "tls",
"tlsSettings": {
"allowInsecure": true
- }
+ }
}
}
]
diff --git a/ProxySU/bin/Release/TemplateConfg/mkcp_client_config.json b/ProxySU/bin/Release/TemplateConfg/mkcp_client_config.json
index 1d05f3d..b3f6a50 100644
--- a/ProxySU/bin/Release/TemplateConfg/mkcp_client_config.json
+++ b/ProxySU/bin/Release/TemplateConfg/mkcp_client_config.json
@@ -40,13 +40,9 @@
"streamSettings": {
"network": "kcp",
"kcpSettings": {
- "mtu": 1350,
- "tti": 50,
- "uplinkCapacity": 5,
+ "uplinkCapacity": 100,
"downlinkCapacity": 100,
"congestion": true,
- "readBufferSize": 2,
- "writeBufferSize": 2,
"header": {
"type": null
}
diff --git a/ProxySU/bin/Release/TemplateConfg/tcp_server_config.json b/ProxySU/bin/Release/TemplateConfg/tcp_server_config.json
index 1b49271..d37266d 100644
--- a/ProxySU/bin/Release/TemplateConfg/tcp_server_config.json
+++ b/ProxySU/bin/Release/TemplateConfg/tcp_server_config.json
@@ -1,23 +1,22 @@
{
- "inbounds": [
-
- {
- "port": null,
- "protocol": "vmess",
- "settings": {
- "clients": [
- {
- "id": null,
- "alterId": 64
- }
- ]
- }
- }
- ],
- "outbounds": [
- {
- "protocol": "freedom",
- "settings": {}
- }
- ]
+ "inbounds": [
+ {
+ "port": null,
+ "protocol": "vmess",
+ "settings": {
+ "clients": [
+ {
+ "id": null,
+ "alterId": 64
+ }
+ ]
+ }
+ }
+ ],
+ "outbounds": [
+ {
+ "protocol": "freedom",
+ "settings": {}
+ }
+ ]
}
\ No newline at end of file