mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-23 05:36:08 +03:00
添加Trojan-Go的WebSocket模式
This commit is contained in:
parent
db1ccfed9b
commit
0e37f01254
@ -296,7 +296,6 @@
|
|||||||
<!--<TextBlock Text="Trojan参数设置" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Center"></TextBlock>-->
|
<!--<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="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="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>
|
<Button x:Name="ButtonTrojanGoCancel" Content="取消" Grid.ColumnSpan="1" Margin="10" Grid.Column="2" Grid.Row="2" Click="Button_canel_Click"></Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -411,7 +410,7 @@
|
|||||||
<RowDefinition></RowDefinition>
|
<RowDefinition></RowDefinition>
|
||||||
<RowDefinition></RowDefinition>
|
<RowDefinition></RowDefinition>
|
||||||
</Grid.RowDefinitions>
|
</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>
|
</Grid>
|
||||||
|
|
||||||
|
@ -2280,9 +2280,14 @@ namespace ProxySU
|
|||||||
//设置证书
|
//设置证书
|
||||||
serverJson["ssl"]["cert"] = "/etc/trojan-go/trojan-go.crt";
|
serverJson["ssl"]["cert"] = "/etc/trojan-go/trojan-go.crt";
|
||||||
serverJson["ssl"]["key"] = "/etc/trojan-go/trojan-go.key";
|
serverJson["ssl"]["key"] = "/etc/trojan-go/trojan-go.key";
|
||||||
serverJson["ssl"]["cert"] = "/etc/trojan-go/trojan-go.crt";
|
|
||||||
serverJson["ssl"]["sni"] = ReceiveConfigurationParameters[4];
|
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"))
|
using (StreamWriter sw = new StreamWriter(@"config.json"))
|
||||||
{
|
{
|
||||||
sw.Write(serverJson.ToString());
|
sw.Write(serverJson.ToString());
|
||||||
@ -2470,6 +2475,12 @@ namespace ProxySU
|
|||||||
clientJson["remote_port"] = 443;
|
clientJson["remote_port"] = 443;
|
||||||
clientJson["password"][0] = ReceiveConfigurationParameters[2];
|
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"))
|
using (StreamWriter sw = new StreamWriter(@"trojan-go_config\config.json"))
|
||||||
{
|
{
|
||||||
sw.Write(clientJson.ToString());
|
sw.Write(clientJson.ToString());
|
||||||
|
@ -51,5 +51,5 @@ using System.Windows;
|
|||||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||||
// 方法是按如下所示使用“*”: :
|
// 方法是按如下所示使用“*”: :
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.7.0.0")]
|
[assembly: AssemblyVersion("1.7.1.0")]
|
||||||
[assembly: AssemblyFileVersion("1.7.0.0")]
|
[assembly: AssemblyFileVersion("1.7.1.0")]
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user