mirror of
https://github.com/proxysu/ProxySU.git
synced 2025-04-01 21:06:18 +03:00
添加Trojan-go的Mux设置
This commit is contained in:
parent
d34ecbd81f
commit
56f6f6f976
12 changed files with 144 additions and 20 deletions
|
@ -5,7 +5,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ProxySU"
|
||||
mc:Ignorable="d"
|
||||
Title="ProxySU - v2.4.15" Height="675" Width="650">
|
||||
Title="ProxySU - v2.4.16" Height="675" Width="650">
|
||||
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
||||
https://docs.microsoft.com/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
||||
<Window.Resources>
|
||||
|
|
|
@ -70,13 +70,13 @@ namespace ProxySU
|
|||
//ReceiveConfigurationParameters[0]----模板类型
|
||||
//ReceiveConfigurationParameters[1]----服务端口
|
||||
//ReceiveConfigurationParameters[2]----V2Ray uuid/(naive/Trojan-go/Trojan/SSR/SS)' Password
|
||||
//ReceiveConfigurationParameters[3]----QUIC加密方式/SSR 加密方法/SS 加密方式/naive'user/VLESS ws Path
|
||||
//ReceiveConfigurationParameters[3]----QUIC加密方式/SSR 加密方法/SS 加密方式/naive'user/VLESS ws Path/trojan-go mux concurrency
|
||||
//ReceiveConfigurationParameters[4]----Domain
|
||||
//ReceiveConfigurationParameters[5]----伪装类型/插件名称
|
||||
//ReceiveConfigurationParameters[5]----伪装类型/插件名称/trojan-go mux idle_timeout
|
||||
//ReceiveConfigurationParameters[6]----V2Ray&Trojan-go&SS--Websocket'Path/http2'Path/QUIC密钥/mKCP Seed/VMESS ws Path
|
||||
//ReceiveConfigurationParameters[7]----伪装网站
|
||||
//ReceiveConfigurationParameters[8]----方案名称
|
||||
//ReceiveConfigurationParameters[9]----插件参数选项/VMESS tcp Path/MTProto Parameters
|
||||
//ReceiveConfigurationParameters[9]----插件参数选项/VMESS tcp Path/MTProto Parameters/trojan-go是否启用Mux(true)
|
||||
//public static ConnectionInfo ConnectionInfo;
|
||||
|
||||
public static string proxyType = "V2Ray"; //代理类型标识: V2Ray\TrojanGo\Trojan\NaiveProxy
|
||||
|
@ -2569,6 +2569,23 @@ namespace ProxySU
|
|||
clientJson["websocket"]["enabled"] = true;
|
||||
clientJson["websocket"]["path"] = ReceiveConfigurationParameters[6];
|
||||
}
|
||||
//如果开启了mux,设置客户端配置文件参数
|
||||
if (String.Equals(ReceiveConfigurationParameters[9],"true") == true)
|
||||
{
|
||||
clientJson["mux"]["enabled"] = true;
|
||||
clientJson["mux"]["concurrency"] = int.Parse(ReceiveConfigurationParameters[3]);
|
||||
clientJson["mux"]["idle_timeout"] = int.Parse(ReceiveConfigurationParameters[5]);
|
||||
//if(int.TryParse(ReceiveConfigurationParameters[3],out int value) == true)
|
||||
//{
|
||||
// clientJson["mux"]["concurrency"] = value;
|
||||
//}
|
||||
//if (int.TryParse(ReceiveConfigurationParameters[5], out int value2) == true)
|
||||
//{
|
||||
// clientJson["mux"]["idle_timeout"] = value2;
|
||||
//}
|
||||
//clientJson["mux"]["idle_timeout"] = int.TryParse(ReceiveConfigurationParameters[5], out int value2);
|
||||
//clientJson["mux"]["idle_timeout"] = value2;
|
||||
}
|
||||
|
||||
using (StreamWriter sw = new StreamWriter(@"trojan-go_config\config.json"))
|
||||
{
|
||||
|
@ -6919,7 +6936,7 @@ namespace ProxySU
|
|||
#region 测试用代码
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
proxyType = "V2Ray";
|
||||
proxyType = "TrojanGo";
|
||||
ResultClientInformation resultClientInformation = new ResultClientInformation();
|
||||
resultClientInformation.ShowDialog();
|
||||
return;
|
||||
|
|
|
@ -51,5 +51,5 @@ using System.Windows;
|
|||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.4.15.0")]
|
||||
[assembly: AssemblyFileVersion("2.4.15.0")]
|
||||
[assembly: AssemblyVersion("2.4.16.0")]
|
||||
[assembly: AssemblyFileVersion("2.4.16.0")]
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<RowDefinition Height="0.12*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- V2Ray客户端配置参数 -->
|
||||
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxV2rayClient" Visibility="Visible" Grid.Row="0">
|
||||
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxV2rayClient" Visibility="Collapsed" Grid.Row="0">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"></ColumnDefinition>
|
||||
|
@ -93,12 +93,12 @@
|
|||
</Grid>
|
||||
</GroupBox>
|
||||
<!-- Trojan-Go客户端配置参数 -->
|
||||
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxTrojanGoClient" Visibility="Collapsed" Grid.Row="0">
|
||||
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxTrojanGoClient" Visibility="Visible" Grid.Row="0">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition Width="0.5*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition></RowDefinition>
|
||||
|
@ -107,6 +107,7 @@
|
|||
<RowDefinition Height="30"></RowDefinition>
|
||||
<RowDefinition Height="30"></RowDefinition>
|
||||
<RowDefinition Height="30"></RowDefinition>
|
||||
<RowDefinition Height="30"></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{DynamicResource TextBlockServerAddress}" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" ></TextBlock>
|
||||
|
@ -124,8 +125,25 @@
|
|||
<TextBlock x:Name="TextBlockTrojanGoWebSocketPath" Text="{DynamicResource TextBlockTrojanGoWebSocketPath}" Grid.Column="0" Grid.Row="5" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBox x:Name="TextBoxTrojanGoWSPath" IsReadOnly="True" Grid.Column="1" Grid.Row="5" Margin="4" MouseDoubleClick="TextBoxTrojanGoWSPath_MouseDoubleClick"></TextBox>
|
||||
<TextBlock x:Name="TextBlockTrojanGoCaption" Grid.Column="2" Grid.Row="4"></TextBlock>
|
||||
|
||||
<TextBlock Text="{DynamicResource TextBlockCopyToClipExplain}" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="2" Margin="5" VerticalAlignment="Center"></TextBlock>
|
||||
|
||||
<TextBlock x:Name="TextBlockMuxSelect" Text="{DynamicResource CheckBoxMuxSelect}" Grid.Column="0" Grid.Row="6" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
|
||||
<Grid x:Name="GridMuxSelect" Grid.Column="1" Grid.Row="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="85"></ColumnDefinition>
|
||||
<ColumnDefinition Width="50"></ColumnDefinition>
|
||||
<ColumnDefinition Width="85"></ColumnDefinition>
|
||||
<ColumnDefinition Width="50"></ColumnDefinition>
|
||||
<ColumnDefinition Width="10"></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="concurrency:" Grid.Column="0" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBox x:Name="TextBoxConcurrency" Grid.Column="1" Margin="5" MouseDoubleClick="TextBoxConcurrency_MouseDoubleClick"/>
|
||||
<TextBlock Text="idle_timeout:" Grid.Column="2" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBox x:Name="TextBoxIdle_timeout" Grid.Column="3" Margin="5" MouseDoubleClick="TextBoxIdle_timeout_MouseDoubleClick"/>
|
||||
<TextBlock Grid.Column="4" Text="s" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
|
||||
</Grid>
|
||||
<TextBlock x:Name="TextBlockExplainCheckBoxMuxSelectResult" Text="{DynamicResource TextBlockExplainCheckBoxMuxSelectResult}" TextWrapping="Wrap" Grid.Column="2" Grid.Row="6" Grid.RowSpan="2"></TextBlock>
|
||||
<TextBlock Text="{DynamicResource TextBlockCopyToClipExplain}" Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="2" Margin="5" VerticalAlignment="Center"></TextBlock>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<!-- Trojan客户端配置参数 -->
|
||||
|
|
|
@ -362,6 +362,10 @@ namespace ProxySU
|
|||
TextBlockTrojanGoWebSocketPath.Visibility = Visibility.Hidden;
|
||||
TextBlockTrojanGoCaption.Visibility = Visibility.Hidden;
|
||||
|
||||
TextBlockMuxSelect.Visibility = Visibility.Hidden;
|
||||
GridMuxSelect.Visibility = Visibility.Hidden;
|
||||
TextBlockExplainCheckBoxMuxSelectResult.Visibility = Visibility.Hidden;
|
||||
|
||||
//******"可用于ShadowRocket (ios)、igniter(Android)、Qv2ray (windows) 扫码和导入url。注意:有的客户端可能不支持WebSocket模式。" ******
|
||||
TextBlockQrURLexplain.Text = Application.Current.FindResource("TextBlockQrURLexplainTrojan-go").ToString();
|
||||
|
||||
|
@ -383,6 +387,14 @@ namespace ProxySU
|
|||
TextBlockTrojanGoCaption.Visibility = Visibility.Visible;
|
||||
|
||||
}
|
||||
if(String.Equals(MainWindow.ReceiveConfigurationParameters[9],"true") == true)
|
||||
{
|
||||
TextBoxConcurrency.Text = MainWindow.ReceiveConfigurationParameters[3];
|
||||
TextBoxIdle_timeout.Text = MainWindow.ReceiveConfigurationParameters[5];
|
||||
TextBlockMuxSelect.Visibility = Visibility.Visible;
|
||||
GridMuxSelect.Visibility = Visibility.Visible;
|
||||
TextBlockExplainCheckBoxMuxSelectResult.Visibility = Visibility.Visible;
|
||||
}
|
||||
CheckDir("trojan-go_config");
|
||||
GenerateTrojanGoShareQRcodeAndBase64Url();
|
||||
}
|
||||
|
@ -2062,7 +2074,7 @@ namespace ProxySU
|
|||
//sw.WriteLine(Application.Current.FindResource("TextBlockTrojanGoPassword").ToString() + $"{TextBoxTrojanGoServerPassword.Text}");
|
||||
//strApplicat = "TextBlockTrojanGoPassword";
|
||||
strParam = TextBoxTrojanGoType.Text;
|
||||
sw.WriteLine(AlignmentStrFunc("Type", strLenth) + strParam);
|
||||
sw.WriteLine(AlignmentStrFunc("Type:", strLenth) + strParam);
|
||||
//sw.WriteLine(AlignmentStrFunc(Application.Current.FindResource($"{strApplicat}").ToString(), strLenth) + strParam);
|
||||
|
||||
//****** WebSocket路径: ******
|
||||
|
@ -2071,6 +2083,24 @@ namespace ProxySU
|
|||
strParam = TextBoxTrojanGoWSPath.Text;
|
||||
sw.WriteLine(AlignmentStrFunc(Application.Current.FindResource($"{strApplicat}").ToString(), strLenth) + strParam);
|
||||
|
||||
//****** Mux多路复用 ******
|
||||
//sw.WriteLine(Application.Current.FindResource("TextBlockTrojanGoWebSocketPath").ToString() + $"{TextBoxTrojanGoWSPath.Text}");
|
||||
strApplicat = "CheckBoxMuxSelect";
|
||||
strParam = ":";
|
||||
sw.WriteLine(AlignmentStrFunc(Application.Current.FindResource($"{strApplicat}").ToString(), strLenth) + strParam);
|
||||
|
||||
//****** concurrency: ******
|
||||
//sw.WriteLine(Application.Current.FindResource("TextBlockTrojanGoWebSocketPath").ToString() + $"{TextBoxTrojanGoWSPath.Text}");
|
||||
strApplicat = "concurrency:";
|
||||
strParam = TextBoxConcurrency.Text;
|
||||
sw.WriteLine(AlignmentStrFunc(strApplicat, strLenth) + strParam);
|
||||
|
||||
//****** idle_timeout: ******
|
||||
//sw.WriteLine(Application.Current.FindResource("TextBlockTrojanGoWebSocketPath").ToString() + $"{TextBoxTrojanGoWSPath.Text}");
|
||||
strApplicat = "idle_timeout:";
|
||||
strParam = TextBoxIdle_timeout.Text;
|
||||
sw.WriteLine(AlignmentStrFunc(strApplicat, strLenth) + strParam);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2098,6 +2128,15 @@ namespace ProxySU
|
|||
{
|
||||
CopyToClipboard(TextBoxTrojanGoWSPath.Text);
|
||||
}
|
||||
private void TextBoxConcurrency_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
CopyToClipboard(TextBoxConcurrency.Text);
|
||||
}
|
||||
|
||||
private void TextBoxIdle_timeout_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
CopyToClipboard(TextBoxIdle_timeout.Text);
|
||||
}
|
||||
#endregion
|
||||
|
||||
//生成TrojanGo的分享链接
|
||||
|
@ -3059,7 +3098,7 @@ namespace ProxySU
|
|||
return spaceString + strTemp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -138,6 +138,9 @@
|
|||
<sys:String x:Key="TextBlockTrojanGoPassword">Password:</sys:String>
|
||||
<sys:String x:Key="TextBlockTrojanGoPasswordExplain">Use the existing password and paste it directly into the box</sys:String>
|
||||
<sys:String x:Key="TextBlockTrojanGoWebSocketPath">WebSocket Path:</sys:String>
|
||||
<sys:String x:Key="CheckBoxMuxSelect">Mux multiplexing</sys:String>
|
||||
<sys:String x:Key="TextBlockExplainCheckBoxMuxSelect">The settings here are only valid for the official client configuration file config.json, other clients need to be set manually, and the server automatically adapts.</sys:String>
|
||||
<sys:String x:Key="TextBlockExplainCheckBoxMuxSelectResult">This field does not appear in the QR code and sharing URL. The client needs to set it by itself, and the server enables automatic adaptation by default.</sys:String>
|
||||
<sys:String x:Key="ButtonTrojanGoTemplateOK">OK</sys:String>
|
||||
<sys:String x:Key="ButtonTrojanGoTemplateCancel">Cancel</sys:String>
|
||||
<!-- The following V2Ray template library interface -->
|
||||
|
|
|
@ -139,6 +139,9 @@
|
|||
<sys:String x:Key="TextBlockTrojanGoPassword">密码:</sys:String>
|
||||
<sys:String x:Key="TextBlockTrojanGoPasswordExplain">使用已有密码,直接粘贴到框中</sys:String>
|
||||
<sys:String x:Key="TextBlockTrojanGoWebSocketPath">WebSocket路径:</sys:String>
|
||||
<sys:String x:Key="CheckBoxMuxSelect">Mux多路复用</sys:String>
|
||||
<sys:String x:Key="TextBlockExplainCheckBoxMuxSelect">此处设置只对官方客户端配置文件config.json有效,其他客户端需手动设置,服务端自动适配。</sys:String>
|
||||
<sys:String x:Key="TextBlockExplainCheckBoxMuxSelectResult">此字段不出现在QR码及分享URL中,客户端需自行设置,服务端默认启用自动适配。</sys:String>
|
||||
<sys:String x:Key="ButtonTrojanGoTemplateOK">确定</sys:String>
|
||||
<sys:String x:Key="ButtonTrojanGoTemplateCancel">取消</sys:String>
|
||||
<!-- 以下V2Ray模板库界面 -->
|
||||
|
|
|
@ -138,6 +138,9 @@
|
|||
<sys:String x:Key="TextBlockTrojanGoPassword">密碼:</sys:String>
|
||||
<sys:String x:Key="TextBlockTrojanGoPasswordExplain">使用已有密碼,直接粘貼到框中</sys:String>
|
||||
<sys:String x:Key="TextBlockTrojanGoWebSocketPath">WebSocket路徑:</sys:String>
|
||||
<sys:String x:Key="CheckBoxMuxSelect">Mux多路復用</sys:String>
|
||||
<sys:String x:Key="TextBlockExplainCheckBoxMuxSelect">此處設置只對官方客戶端配置文件config.json有效,其他客戶端需手動設置,服務端自動適配。</sys:String>
|
||||
<sys:String x:Key="TextBlockExplainCheckBoxMuxSelectResult">此字段不出現在QR碼及分享URL中,客戶端需自行設置,服務端默認啟用自動適配。</sys:String>
|
||||
<sys:String x:Key="ButtonTrojanGoTemplateOK">確定</sys:String>
|
||||
<sys:String x:Key="ButtonTrojanGoTemplateCancel">取消</sys:String>
|
||||
<!-- 以下V2Ray模板庫界面 -->
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
<RowDefinition></RowDefinition>
|
||||
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock x:Name="TextBlockDomain" Text="{DynamicResource TextBlockTrojanGoDomain}" Grid.Column="0" Grid.Row="0" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBox x:Name="TextBoxDomain" Style="{StaticResource TitleText}" Tag="{DynamicResource TextBoxDomainPrompt}" Grid.Column="1" Grid.Row="0" Margin="5"></TextBox>
|
||||
|
@ -92,10 +92,26 @@
|
|||
<TextBlock x:Name="TextBlockPath" Text="{DynamicResource TextBlockTrojanGoWebSocketPath}" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBox x:Name="TextBoxPath" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="1" Margin="5"></TextBox>
|
||||
<Button x:Name="ButtonPath" Content="{DynamicResource ButtonNaiveProxyChangeUser}" Grid.Column="2" Grid.Row="2" Margin="2" Click="ButtonPath_Click"></Button>
|
||||
|
||||
<CheckBox x:Name="CheckBoxMuxSelect" Content="{DynamicResource CheckBoxMuxSelect}" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Checked="CheckBoxMuxSelect_Checked" Unchecked="CheckBoxMuxSelect_Unchecked"></CheckBox>
|
||||
<Grid x:Name="GridTrojanGoMuxSelected" Grid.Column="1" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="90"></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition Width="90"></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="concurrency:" Grid.Column="0" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBox x:Name="TextBoxConcurrency" Text="8" Grid.Column="1" Margin="5"/>
|
||||
<TextBlock Text="idle_timeout:" Grid.Column="2" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBox x:Name="TextBoxIdle_timeout" Text="60" Grid.Column="3" Margin="5"/>
|
||||
<TextBlock Grid.Column="4" Text="s" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
|
||||
</Grid>
|
||||
<TextBlock x:Name="TextBlockExplainCheckBoxMuxSelect" Text="{DynamicResource TextBlockExplainCheckBoxMuxSelect}" TextWrapping="Wrap" Grid.Column="2" Grid.Row="3" Grid.ColumnSpan="2" Grid.RowSpan="2"></TextBlock>
|
||||
|
||||
<TextBlock x:Name="TextBlockMaskSites" Text="{DynamicResource TextBlockV2RayMaskSites}" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Visibility="Hidden"></TextBlock>
|
||||
<TextBox x:Name="TextBoxMaskSites" Style="{StaticResource TitleText}" Tag="{DynamicResource TextBoxV2RayMaskSitesTag}" Grid.Column="1" Grid.Row="3" Margin="5" Visibility="Hidden"></TextBox>
|
||||
<Grid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="4">
|
||||
<Grid Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
|
@ -103,8 +119,8 @@
|
|||
<ColumnDefinition></ColumnDefinition>
|
||||
<ColumnDefinition></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="ButtondDecide" Content="{DynamicResource ButtonTrojanGoTemplateOK}" Grid.Column="1" Grid.Row="6" Margin="3" Click="ButtondDecide_Click"></Button>
|
||||
<Button x:Name="ButtondCancel" Content="{DynamicResource ButtonTrojanGoTemplateCancel}" Grid.Column="3" Grid.Row="6" Margin="3" Click="ButtondCancel_Click"></Button>
|
||||
<Button x:Name="ButtondDecide" Content="{DynamicResource ButtonTrojanGoTemplateOK}" Grid.Column="1" Margin="3" Click="ButtondDecide_Click"></Button>
|
||||
<Button x:Name="ButtondCancel" Content="{DynamicResource ButtonTrojanGoTemplateCancel}" Grid.Column="3" Margin="3" Click="ButtondCancel_Click"></Button>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
|
@ -22,6 +22,9 @@ namespace ProxySU
|
|||
{
|
||||
InitializeComponent();
|
||||
RadioButtonTrojanGoTLS2Web.IsChecked = true;
|
||||
CheckBoxMuxSelect.IsChecked = false;
|
||||
GridTrojanGoMuxSelected.Visibility = Visibility.Collapsed;
|
||||
TextBlockExplainCheckBoxMuxSelect.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
private void ButtondDecide_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
@ -71,7 +74,13 @@ namespace ProxySU
|
|||
//传递路径
|
||||
MainWindow.ReceiveConfigurationParameters[6] = TextBoxPath.Text;
|
||||
}
|
||||
|
||||
//传递Mux的concurrency与idle_timeout
|
||||
if (CheckBoxMuxSelect.IsChecked == true)
|
||||
{
|
||||
MainWindow.ReceiveConfigurationParameters[9] = "true";
|
||||
MainWindow.ReceiveConfigurationParameters[3] = TextBoxConcurrency.Text;
|
||||
MainWindow.ReceiveConfigurationParameters[5] = TextBoxIdle_timeout.Text;
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
//更新密码
|
||||
|
@ -153,5 +162,16 @@ namespace ProxySU
|
|||
}
|
||||
}
|
||||
|
||||
private void CheckBoxMuxSelect_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
GridTrojanGoMuxSelected.Visibility = Visibility.Visible;
|
||||
TextBlockExplainCheckBoxMuxSelect.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private void CheckBoxMuxSelect_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
GridTrojanGoMuxSelected.Visibility = Visibility.Collapsed;
|
||||
TextBlockExplainCheckBoxMuxSelect.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -14,5 +14,10 @@
|
|||
"websocket": {
|
||||
"enabled": false,
|
||||
"path": ""
|
||||
},
|
||||
"mux": {
|
||||
"enabled": false,
|
||||
"concurrency": 8,
|
||||
"idle_timeout": 60
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue