mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-21 20:56:08 +03:00
添加服务端参数显示窗口
This commit is contained in:
parent
cdd0d6b844
commit
4f98cfe560
@ -39,7 +39,9 @@ namespace ProxySU
|
||||
RadioButtonProxyNoLogin.IsChecked = true;
|
||||
RadioButtonSocks4.Visibility = Visibility.Collapsed;
|
||||
ReceiveConfigurationParameters = new string[6];
|
||||
|
||||
//ReceiveConfigurationParameters[4] = "domaintext";
|
||||
|
||||
|
||||
}
|
||||
//开始布署安装
|
||||
//System.Diagnostics.Process exitProgram = System.Diagnostics.Process.GetProcessById(System.Diagnostics.Process.GetCurrentProcess().Id);
|
||||
@ -208,8 +210,13 @@ namespace ProxySU
|
||||
appConfig = "TemplateConfg\\TLS_server_config.json";
|
||||
clientConfig = "TemplateConfg\\tcp_client_config.json";
|
||||
}
|
||||
Task task = new Task(() => StartSetUpRemoteHost(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing, appConfig, clientConfig, upLoadPath));
|
||||
task.Start();
|
||||
//Thread thread
|
||||
Thread thread = new Thread(() => StartSetUpRemoteHost(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing, appConfig, clientConfig, upLoadPath));
|
||||
thread.SetApartmentState(ApartmentState.STA);
|
||||
thread.Start();
|
||||
// Task task = new Task(() => StartSetUpRemoteHost(connectionInfo, TextBlockSetUpProcessing, ProgressBarSetUpProcessing, appConfig, clientConfig, upLoadPath));
|
||||
//task.Start();
|
||||
|
||||
}
|
||||
|
||||
#region 端口数字防错代码,密钥选择代码
|
||||
@ -516,10 +523,11 @@ namespace ProxySU
|
||||
textBlockName.Dispatcher.BeginInvoke(updateAction, textBlockName, progressBar, currentStatus);
|
||||
Thread.Sleep(1000);
|
||||
|
||||
//MessageBox.Show("客户端配置文件已保存在config文件夹中");
|
||||
//显示服务端连接参数
|
||||
//MessageBox.Show("用于V2ray官方客户端的配置文件已保存在config文件夹中");
|
||||
ResultClientInformation resultClientInformation = new ResultClientInformation();
|
||||
resultClientInformation.ShowDialog();
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -26,29 +26,30 @@
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="地址(address)" Grid.Column="0" Grid.Row="0" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxHostAddress" Grid.Column="1" Grid.Row="0" Margin="8"></TextBox>
|
||||
<TextBox x:Name="TextBoxHostAddress" IsReadOnly="True" Grid.Column="1" Grid.Row="0" Margin="8"></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" Grid.Column="1" Grid.Row="1" Margin="8"></TextBox>
|
||||
<TextBox x:Name="TextBoxPort" IsReadOnly="True" Grid.Column="1" Grid.Row="1" Margin="8"></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" Grid.Column="1" Grid.Row="2" Margin="8"></TextBox>
|
||||
<TextBox x:Name="TextBoxUUID" IsReadOnly="True" Grid.Column="1" Grid.Row="2" Margin="8"></TextBox>
|
||||
<TextBlock Text="说明" Grid.Column="2" Grid.Row="2"></TextBlock>
|
||||
<TextBlock Text="加密方式" Grid.Column="0" Grid.Row="3" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxEncryption" Grid.Column="1" Grid.Row="3" Margin="8"></TextBox>
|
||||
<TextBox x:Name="TextBoxEncryption" IsReadOnly="True" Grid.Column="1" Grid.Row="3" Margin="8"></TextBox>
|
||||
<TextBlock Text="说明" Grid.Column="2" Grid.Row="3"></TextBlock>
|
||||
<TextBlock Text="传输协议" Grid.Column="0" Grid.Row="4" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxTransmission" Grid.Column="1" Grid.Row="4" Margin="8"></TextBox>
|
||||
<TextBox x:Name="TextBoxTransmission" IsReadOnly="True" Grid.Column="1" Grid.Row="4" Margin="8"></TextBox>
|
||||
<TextBlock Text="说明" Grid.Column="2" Grid.Row="4"></TextBlock>
|
||||
<TextBlock Text="伪装类型" Grid.Column="0" Grid.Row="5" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxCamouflageType" Grid.Column="1" Grid.Row="5" Margin="8"></TextBox>
|
||||
<TextBox x:Name="TextBoxCamouflageType" IsReadOnly="True" Grid.Column="1" Grid.Row="5" Margin="8"></TextBox>
|
||||
<TextBlock Text="说明" Grid.Column="2" Grid.Row="5"></TextBlock>
|
||||
<TextBlock Text="路径(Path)" Grid.Column="0" Grid.Row="6" Margin="8"></TextBlock>
|
||||
<TextBox x:Name="TextBoxPath" Grid.Column="1" Grid.Row="6" Margin="8"></TextBox>
|
||||
<TextBox x:Name="TextBoxPath" IsReadOnly="True" Grid.Column="1" Grid.Row="6" Margin="8"></TextBox>
|
||||
<TextBlock Text="说明" Grid.Column="2" Grid.Row="6"></TextBlock>
|
||||
|
||||
<Button Content="确定" Grid.Column="1" Grid.Row="7" Grid.RowSpan="2" Margin="8"></Button>
|
||||
<Button Content="取消" Grid.Column="2" Grid.Row="7" Grid.RowSpan="2" Margin="8"></Button>
|
||||
<TextBlock Text="以上参数可以手动输入客户端,用于V2ray官方客户端的配置文件已经存放入config目录下,点击确定可打开" Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="2" TextWrapping="Wrap"></TextBlock>
|
||||
<Button Content="确定" Grid.Column="2" Grid.Row="7" Grid.RowSpan="2" Margin="20" Click="Button_Click"></Button>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
@ -21,6 +21,54 @@ namespace ProxySU
|
||||
public ResultClientInformation()
|
||||
{
|
||||
InitializeComponent();
|
||||
//主机地址
|
||||
TextBoxHostAddress.Text = MainWindow.ReceiveConfigurationParameters[4];
|
||||
//主机端口
|
||||
TextBoxPort.Text = MainWindow.ReceiveConfigurationParameters[1];
|
||||
//用户ID(uuid)
|
||||
TextBoxUUID.Text = MainWindow.ReceiveConfigurationParameters[2];
|
||||
//路径Path
|
||||
TextBoxPath.Text = MainWindow.ReceiveConfigurationParameters[3];
|
||||
//加密方式,一般都为auto
|
||||
TextBoxEncryption.Text = "auto";
|
||||
//伪装类型
|
||||
TextBoxCamouflageType.Text = MainWindow.ReceiveConfigurationParameters[5];
|
||||
|
||||
if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "TCP"))
|
||||
{
|
||||
TextBoxTransmission.Text = "tcp";
|
||||
}
|
||||
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "WebSocketTLS2Web"))
|
||||
{
|
||||
TextBoxTransmission.Text = "WebSocket(ws)";
|
||||
}
|
||||
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "TCPhttp"))
|
||||
{
|
||||
TextBoxTransmission.Text = "tcp";
|
||||
|
||||
}
|
||||
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "MkcpNone") || String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCP2SRTP") || String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCPuTP") || String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCP2WechatVideo") || String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCP2DTLS") || String.Equals(MainWindow.ReceiveConfigurationParameters[0], "mKCP2WireGuard"))
|
||||
{
|
||||
TextBoxTransmission.Text = "mKCP(kcp)";
|
||||
}
|
||||
|
||||
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "HTTP2"))
|
||||
{
|
||||
TextBoxTransmission.Text = "h2";
|
||||
}
|
||||
else if (String.Equals(MainWindow.ReceiveConfigurationParameters[0], "TLS"))
|
||||
{
|
||||
TextBoxTransmission.Text = "";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string openFolderPath = @"config";
|
||||
System.Diagnostics.Process.Start("explorer.exe", openFolderPath);
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ namespace ProxySU
|
||||
{
|
||||
//传递模板类型
|
||||
MainWindow.ReceiveConfigurationParameters[0] = "TCPhttp";
|
||||
MainWindow.ReceiveConfigurationParameters[5] = "http";
|
||||
}
|
||||
else if (RadioButtonMkcpNoCamouflage.IsChecked == true)
|
||||
{
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user