mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-22 13:16:09 +03:00
排查bug2
This commit is contained in:
parent
2390a2b12e
commit
67f31e39ff
@ -121,12 +121,12 @@
|
||||
<RowDefinition></RowDefinition>
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<Button x:Name="ButtonGuideConfiguration" Visibility="Visible" Content="启用向导" Grid.Column="0" Grid.Row="0" Click="ButtonGuideConfiguration_Click"></Button>
|
||||
<TextBlock Text="通过向导生成配置文件" Visibility="Visible" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Center"></TextBlock>
|
||||
<!--<Button x:Name="ButtonGuideConfiguration" Visibility="Visible" Content="启用向导" Grid.Column="0" Grid.Row="0" Click="ButtonGuideConfiguration_Click"></Button>
|
||||
<TextBlock Text="通过向导生成配置文件" Visibility="Visible" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Center"></TextBlock>-->
|
||||
<Button x:Name="ButtonTemplateConfiguration" Content="模板库" Grid.Column="1" Grid.Row="0" Click="ButtonTemplateConfiguration_Click"></Button>
|
||||
<TextBlock Text="模板库" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Center"></TextBlock>
|
||||
<Button x:Name="ButtonAdvancedConfiguration" Visibility="Visible" Content="配置编辑器" Grid.Column="2" Grid.Row="0" Click="ButtonAdvancedConfiguration_Click"></Button>
|
||||
<TextBlock Text="配置文件高级生成器
(有经验用户可以使用)" Visibility="Visible" Grid.Column="2" Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Center"></TextBlock>
|
||||
<!--<Button x:Name="ButtonAdvancedConfiguration" Visibility="Visible" Content="配置编辑器" Grid.Column="2" Grid.Row="0" Click="ButtonAdvancedConfiguration_Click"></Button>
|
||||
<TextBlock Text="配置文件高级生成器
(有经验用户可以使用)" Visibility="Visible" Grid.Column="2" Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Center"></TextBlock>-->
|
||||
<!--<RadioButton x:Name="RadioButtonGuideConfiguration" Content="向导生成配置" Grid.Column="0" Grid.Row="0"></RadioButton>
|
||||
<RadioButton x:Name="RadioButtonTemplateConfiguration" Content="模板配置" Grid.Column="0" Grid.Row="1"></RadioButton>
|
||||
<RadioButton x:Name="RadioButtonAdvancedConfiguration" Content="高级配置" Grid.Column="0" Grid.Row="2"></RadioButton>
|
||||
@ -151,7 +151,7 @@
|
||||
<Button x:Name="ButtonClearOccupiedPorts" Content="释放80/443端口" Grid.Column="1" Grid.Row="0" Margin="5" Click="ButtonClearOccupiedPorts_Click"></Button>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="测试面板" Visibility="Visible" Width="150" Height="30">
|
||||
<!--<TabItem Header="测试面板" Visibility="Visible" Width="150" Height="30">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
@ -167,15 +167,15 @@
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<!--<Button Content="更改SELinux模式" Grid.Column="0" Grid.Row="0" Margin="10" Click="Button_Click"></Button>-->
|
||||
--><!--<Button Content="更改SELinux模式" Grid.Column="0" Grid.Row="0" Margin="10" Click="Button_Click"></Button>-->
|
||||
<!--<Button x:Name="testresultClientInform" Content="测试结果窗口" Grid.Column="0" Grid.Row="1" Margin="5" Click="TestresultClientInform_Click"></Button>
|
||||
<Button x:Name="testPortOccupy" Content="测试端口占用" Grid.Column="0" Grid.Row="2" Margin="5" Click="TestPortOccupy_Click"></Button>
|
||||
<Button x:Name="testInstalledV2ray" Content="测试是否安装V2ray" Grid.Column="1" Grid.Row="0" Margin="5" Click="TestInstalledV2ray_Click"></Button>
|
||||
<Button x:Name="testsshCmd" Content="测试ssh命令" Grid.Column="1" Grid.Row="1" Margin="5" Click="TestsshCmd_Click"></Button>-->
|
||||
<!--<Button Content="测试数组赋值" Grid.Column="2" Grid.Row="0" Margin="5" Click="Button_Click"></Button>-->
|
||||
<!--<Button Content="测试数组赋值" Grid.Column="2" Grid.Row="0" Margin="5" Click="Button_Click"></Button>--><!--
|
||||
<Button Content="test" Click="Button_Click_1"></Button>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabItem>-->
|
||||
</TabControl>
|
||||
|
||||
|
||||
|
@ -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];
|
||||
|
@ -33,41 +33,46 @@
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="地址(address)" Grid.Column="0" Grid.Row="0" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxHostAddress" IsReadOnly="True" Grid.Column="1" Grid.Row="0" Margin="8"></TextBox>
|
||||
<TextBlock Text="地址(address)" Grid.Column="0" Grid.Row="0" Margin="1"></TextBlock>
|
||||
<TextBox x:Name="TextBoxHostAddress" IsReadOnly="True" Grid.Column="1" Grid.Row="0" Margin="2"></TextBox>
|
||||
<TextBlock Text="说明" Grid.Column="2" Grid.Row="0"></TextBlock>
|
||||
<TextBlock Text="端口(port)" Grid.Column="0" Grid.Row="1" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxPort" IsReadOnly="True" Grid.Column="1" Grid.Row="1" Margin="8"></TextBox>
|
||||
<TextBlock Text="端口(port)" Grid.Column="0" Grid.Row="1" Margin="1"></TextBlock>
|
||||
<TextBox x:Name="TextBoxPort" IsReadOnly="True" Grid.Column="1" Grid.Row="1" Margin="2"></TextBox>
|
||||
<TextBlock Text="说明" Grid.Column="2" Grid.Row="1"></TextBlock>
|
||||
<TextBlock Text="用户ID(uuid)" Grid.Column="0" Grid.Row="2" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxUUID" IsReadOnly="True" Grid.Column="1" Grid.Row="2" Margin="8"></TextBox>
|
||||
<TextBlock Text="用户ID(uuid)" Grid.Column="0" Grid.Row="2" Margin="1"></TextBlock>
|
||||
<TextBox x:Name="TextBoxUUID" IsReadOnly="True" Grid.Column="1" Grid.Row="2" Margin="2"></TextBox>
|
||||
<TextBlock Text="说明" Grid.Column="2" Grid.Row="2"></TextBlock>
|
||||
<TextBlock Text="额外ID" Grid.Column="0" Grid.Row="3" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxUUIDextra" IsReadOnly="False" Grid.Column="1" Grid.Row="3" Margin="8"></TextBox>
|
||||
<TextBlock Text="额外ID" Grid.Column="0" Grid.Row="3" Margin="1"></TextBlock>
|
||||
<TextBox x:Name="TextBoxUUIDextra" IsReadOnly="False" Grid.Column="1" Grid.Row="3" Margin="2"></TextBox>
|
||||
<TextBlock Text="默认16,可以填不超过64的值,客户端没有此选项可不填" TextWrapping="Wrap" Grid.Column="2" Grid.Row="3"></TextBlock>
|
||||
<TextBlock Text="加密方式" Grid.Column="0" Grid.Row="4" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxEncryption" IsReadOnly="True" Grid.Column="1" Grid.Row="4" Margin="8"></TextBox>
|
||||
<TextBlock Text="加密方式" Grid.Column="0" Grid.Row="4" Margin="1"></TextBlock>
|
||||
<TextBox x:Name="TextBoxEncryption" IsReadOnly="True" Grid.Column="1" Grid.Row="4" Margin="2"></TextBox>
|
||||
<TextBlock Text="默认auto" Grid.Column="2" Grid.Row="4"></TextBlock>
|
||||
<TextBlock Text="传输协议" Grid.Column="0" Grid.Row="5" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxTransmission" IsReadOnly="True" Grid.Column="1" Grid.Row="5" Margin="8"></TextBox>
|
||||
<TextBlock Text="传输协议" Grid.Column="0" Grid.Row="5" Margin="1"></TextBlock>
|
||||
<TextBox x:Name="TextBoxTransmission" IsReadOnly="True" Grid.Column="1" Grid.Row="5" Margin="2"></TextBox>
|
||||
<TextBlock Text="说明" Grid.Column="2" Grid.Row="5"></TextBlock>
|
||||
<TextBlock Text="伪装类型" Grid.Column="0" Grid.Row="6" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxCamouflageType" IsReadOnly="True" Grid.Column="1" Grid.Row="6" Margin="8"></TextBox>
|
||||
<TextBlock Text="伪装类型" Grid.Column="0" Grid.Row="6" Margin="1"></TextBlock>
|
||||
<TextBox x:Name="TextBoxCamouflageType" IsReadOnly="True" Grid.Column="1" Grid.Row="6" Margin="2"></TextBox>
|
||||
<TextBlock Text="说明" Grid.Column="2" Grid.Row="6"></TextBlock>
|
||||
<TextBlock x:Name="TextBlocTLSonOrNo" Text="是否使用TLS" Grid.Column="0" Grid.Row="7" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxTLS" IsReadOnly="True" Grid.Column="1" Grid.Row="7" Margin="8"></TextBox>
|
||||
<TextBlock x:Name="TextBlocTLSonOrNo" Text="是否使用TLS" Grid.Column="0" Grid.Row="7" Margin="1"></TextBlock>
|
||||
<TextBox x:Name="TextBoxTLS" IsReadOnly="True" Grid.Column="1" Grid.Row="7" Margin="2"></TextBox>
|
||||
<TextBlock x:Name="TextBlocTLSonOrNoExplain" Text="说明" Grid.Column="2" Grid.Row="7"></TextBlock>
|
||||
<TextBlock x:Name="TextBlockPath" Text="路径(Path)" Grid.Column="0" Grid.Row="8" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxPath" IsReadOnly="True" Grid.Column="1" Grid.Row="8" Margin="8"></TextBox>
|
||||
<TextBlock x:Name="TextBlockPathExplain" Text="说明" Grid.Column="2" Grid.Row="8"></TextBlock>
|
||||
<TextBlock x:Name="TextBlockQuicKey" Text="QUIC密钥" Grid.Column="0" Grid.Row="9" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxQuicKey" IsReadOnly="True" Grid.Column="1" Grid.Row="9" Margin="8"></TextBox>
|
||||
<TextBlock x:Name="TextBlockQuicKeyExplain" Text="说明" Grid.Column="2" Grid.Row="9"></TextBlock>
|
||||
<TextBlock x:Name="TextBlockHost" Text="Host" Grid.Column="0" Grid.Row="8" Margin="1"></TextBlock>
|
||||
<TextBox x:Name="TextBoxHost" IsReadOnly="True" Grid.Column="1" Grid.Row="8" Margin="2"></TextBox>
|
||||
<TextBlock x:Name="TextBlockHostExplain" Text="说明" Grid.Column="2" Grid.Row="8"></TextBlock>
|
||||
|
||||
<TextBlock Text="以上参数可以手动输入客户端,用于V2ray官方客户端的配置文件已经存放入config目录下,点击确定可打开" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="2" TextWrapping="Wrap"></TextBlock>
|
||||
<Button x:Name="ButtonOpenSaveDir" Content="确定" Grid.Column="2" Grid.Row="10" Grid.RowSpan="1" Margin="5" Click="ButtonOpenSaveDir_Click"></Button>
|
||||
<Grid Grid.Column="0" Grid.Row="11" Grid.ColumnSpan="2" Grid.RowSpan="7">
|
||||
<TextBlock x:Name="TextBlockPath" Text="路径(Path)" Grid.Column="0" Grid.Row="9" Margin="1"></TextBlock>
|
||||
<TextBox x:Name="TextBoxPath" IsReadOnly="True" Grid.Column="1" Grid.Row="9" Margin="2"></TextBox>
|
||||
<TextBlock x:Name="TextBlockPathExplain" Text="说明" Grid.Column="2" Grid.Row="9"></TextBlock>
|
||||
<TextBlock x:Name="TextBlockQuicKey" Text="QUIC密钥" Grid.Column="0" Grid.Row="10" Margin="1"></TextBlock>
|
||||
<TextBox x:Name="TextBoxQuicKey" IsReadOnly="True" Grid.Column="1" Grid.Row="10" Margin="2"></TextBox>
|
||||
<TextBlock x:Name="TextBlockQuicKeyExplain" Text="说明" Grid.Column="2" Grid.Row="10"></TextBlock>
|
||||
|
||||
<TextBlock Text="以上参数可以手动输入客户端,用于V2ray官方客户端的配置文件已经存放入config目录下,点击确定可打开" Grid.Column="0" Grid.Row="11" Grid.ColumnSpan="2" TextWrapping="Wrap"></TextBlock>
|
||||
<Button x:Name="ButtonOpenSaveDir" Content="确定" Grid.Column="2" Grid.Row="11" Grid.RowSpan="1" Margin="5" Click="ButtonOpenSaveDir_Click"></Button>
|
||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="2" Grid.RowSpan="7">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="85"></ColumnDefinition>
|
||||
@ -77,7 +82,7 @@
|
||||
<Image x:Name="ImageShareQRcode" Grid.Column="1"></Image>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<TextBox x:Name="TextBoxvVmessUrl" TextWrapping="Wrap" Grid.Column="2" Grid.Row="11" Grid.RowSpan="7"></TextBox>
|
||||
<TextBox x:Name="TextBoxvVmessUrl" TextWrapping="Wrap" Grid.Column="2" Grid.Row="12" Grid.RowSpan="7"></TextBox>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
@ -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,7 +319,7 @@ namespace ProxySU
|
||||
else
|
||||
{
|
||||
v2rayNjsonObject["path"] = TextBoxPath.Text; //设置路径
|
||||
v2rayNjsonObject["host"] = "";
|
||||
v2rayNjsonObject["host"] = TextBoxHost.Text;//设置TLS的Host
|
||||
}
|
||||
|
||||
v2rayNjsonObject["tls"] = TextBoxTLS.Text; //设置是否启用TLS
|
||||
@ -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}");
|
||||
}
|
||||
|
@ -119,7 +119,7 @@
|
||||
<TextBlock Text="数据加密传输,传输协议使用WebSocket,启用TLS,将被识别为TLS流量。(需要域名)" TextWrapping="Wrap" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="3"></TextBlock>
|
||||
<RadioButton x:Name="RadioButtonWebSocketTLS2Web" Content="WebSocket+TLS+Web" GroupName="TemplateGroup" Grid.Column="0" Grid.Row="3" Checked="RadioButtonWebSocketTLS2Web_Checked"></RadioButton>
|
||||
<TextBlock Text="稳定性强,使用Caddy做伪装网站,隐藏代理,会被识别为访问网站的https流量,抗封锁识别最强。(需要域名)" TextWrapping="Wrap" Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="3"></TextBlock>
|
||||
<RadioButton x:Name="RadioButtonWebSocketTLSselfSigned" Content="WebSocket+TLS(自签证书)" GroupName="TemplateGroup" Grid.Column="0" Grid.Row="4" Checked="RadioButtonTCP2TLSnoDomain_Checked"></RadioButton>
|
||||
<RadioButton x:Name="RadioButtonWebSocketTLSselfSigned" Content="WebSocket+TLS(自签证书)" GroupName="TemplateGroup" Grid.Column="0" Grid.Row="4" Checked="RadioButtonWebSocketTLSselfSigned_Checked"></RadioButton>
|
||||
<TextBlock Text="数据加密传输,传输协议使用WebSocket,启用TLS,将被识别为TLS流量。(无需域名)" TextWrapping="Wrap" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="3"></TextBlock>
|
||||
<TextBlock Text="Shadowrocket (ios)需要手动打开“允许不安全”选项" TextWrapping="Wrap" Grid.Column="4" Grid.Row="4" ></TextBlock>
|
||||
|
||||
|
@ -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
|
||||
|
Binary file not shown.
Binary file not shown.
@ -39,10 +39,10 @@
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"security": "tls",
|
||||
"wsSettings": {
|
||||
"path": null
|
||||
},
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
||||
"allowInsecure": true
|
||||
}
|
@ -38,8 +38,8 @@
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"security": "tls",
|
||||
"network": "ws",
|
||||
"wsSettings": {
|
||||
"path": null
|
||||
}
|
||||
|
@ -41,7 +41,10 @@
|
||||
"network": "h2",
|
||||
"security": "tls",
|
||||
"httpSettings": {
|
||||
"path": null
|
||||
"path": null,
|
||||
"host": [
|
||||
""
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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}
|
||||
|
@ -16,7 +16,10 @@
|
||||
"network": "h2",
|
||||
"security": "tls",
|
||||
"httpSettings": {
|
||||
"path": null
|
||||
"path": null,
|
||||
"host": [
|
||||
""
|
||||
]
|
||||
},
|
||||
"tlsSettings": {
|
||||
"certificates": [
|
||||
|
@ -39,13 +39,13 @@
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "h2",
|
||||
"security": "tls",
|
||||
"httpSettings": {
|
||||
"path": null
|
||||
},
|
||||
"security": "tls",
|
||||
"tlsSettings": {
|
||||
"allowInsecure": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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": {}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user