1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-26 07:06:08 +03:00

添加Trojan-Go的WebSocket模式

This commit is contained in:
ProxySU 2020-06-06 10:35:24 +08:00
parent db1ccfed9b
commit 0e37f01254
4 changed files with 15 additions and 5 deletions

View File

@ -296,7 +296,6 @@
<!--<TextBlock Text="Trojan参数设置" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Center"></TextBlock>-->
<Button x:Name="ButtonTrojanGoTemplate" Content="Trojan-Go参数设置" Grid.Column="1" Grid.Row="0" Margin="5" Click="ButtonTrojanGoTemplate_Click"/>
<Button x:Name="ButtonTrojanGoSetUp" Content="Trojan-Go一键安装" Grid.ColumnSpan="1" Margin="10" Grid.Column="0" Grid.Row="2" Click="ButtonTrojanGoSetUp_Click"/>
<Button x:Name="ButtonTrojanGoCancel" Content="取消" Grid.ColumnSpan="1" Margin="10" Grid.Column="2" Grid.Row="2" Click="Button_canel_Click"></Button>
</Grid>
@ -411,7 +410,7 @@
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Text="程序版本1.7.0" Grid.Column="0" Grid.Row="0"></TextBlock>
<TextBlock Text="程序版本1.7.1" Grid.Column="0" Grid.Row="0"></TextBlock>
</Grid>

View File

@ -2280,9 +2280,14 @@ namespace ProxySU
//设置证书
serverJson["ssl"]["cert"] = "/etc/trojan-go/trojan-go.crt";
serverJson["ssl"]["key"] = "/etc/trojan-go/trojan-go.key";
serverJson["ssl"]["cert"] = "/etc/trojan-go/trojan-go.crt";
serverJson["ssl"]["sni"] = ReceiveConfigurationParameters[4];
if (ReceiveConfigurationParameters[0].Contains("WebSocket"))
{
serverJson["websocket"]["enabled"] = true;
serverJson["websocket"]["path"] = ReceiveConfigurationParameters[3];
}
using (StreamWriter sw = new StreamWriter(@"config.json"))
{
sw.Write(serverJson.ToString());
@ -2470,6 +2475,12 @@ namespace ProxySU
clientJson["remote_port"] = 443;
clientJson["password"][0] = ReceiveConfigurationParameters[2];
if (ReceiveConfigurationParameters[0].Contains("WebSocket"))
{
clientJson["websocket"]["enabled"] = true;
clientJson["websocket"]["path"] = ReceiveConfigurationParameters[3];
}
using (StreamWriter sw = new StreamWriter(@"trojan-go_config\config.json"))
{
sw.Write(clientJson.ToString());

View File

@ -51,5 +51,5 @@ using System.Windows;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.7.0.0")]
[assembly: AssemblyFileVersion("1.7.0.0")]
[assembly: AssemblyVersion("1.7.1.0")]
[assembly: AssemblyFileVersion("1.7.1.0")]

Binary file not shown.