mirror of
https://github.com/proxysu/ProxySU.git
synced 2025-02-21 08:53:17 +03:00
添加NaiveProxy一键安装01
This commit is contained in:
parent
d26768232a
commit
eec8b46ea6
@ -30,7 +30,6 @@
|
|||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<TabControl>
|
<TabControl>
|
||||||
@ -157,6 +156,54 @@
|
|||||||
<Button x:Name="ButtonTrojanCancel" Content="取消" Grid.ColumnSpan="1" Margin="10" Grid.Column="2" Grid.Row="2" Click="Button_canel_Click"></Button>
|
<Button x:Name="ButtonTrojanCancel" Content="取消" Grid.ColumnSpan="1" Margin="10" Grid.Column="2" Grid.Row="2" Click="Button_canel_Click"></Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
<TabItem x:Name="TabItemNaiveProxy" Header="NaiveProxy" Width="100" Height="30">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition></ColumnDefinition>
|
||||||
|
<ColumnDefinition></ColumnDefinition>
|
||||||
|
<ColumnDefinition></ColumnDefinition>
|
||||||
|
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<GroupBox Header="参数设置" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Grid.RowSpan="2">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.4*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition></ColumnDefinition>
|
||||||
|
<ColumnDefinition Width="0.3*"></ColumnDefinition>
|
||||||
|
<ColumnDefinition></ColumnDefinition>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="模式:NaiveProxy+TLS+Caddy" Grid.Column="1" Grid.Row="0"></TextBlock>
|
||||||
|
<TextBlock Text="服务器地址(域名):" Grid.Column="0" Grid.Row="1"></TextBlock>
|
||||||
|
<TextBox x:Name="TextBoxNaiveHostDomain" Style="{StaticResource TitleText}" Tag="域名不可为空" Grid.Column="1" Grid.Row="1" Margin="3"></TextBox>
|
||||||
|
<TextBlock Text="端口:443" Grid.Column="2" Grid.Row="1"></TextBlock>
|
||||||
|
<TextBlock Text="用户名:" Grid.Column="0" Grid.Row="2"></TextBlock>
|
||||||
|
<TextBox x:Name="TextBoxNaiveUser" Grid.Column="1" Grid.Row="2" Margin="3"></TextBox>
|
||||||
|
<Button x:Name="ButtonNaiveUser" Content="随机" Grid.Column="2" Grid.Row="2" Margin="2" Click="ButtonNaiveUser_Click"></Button>
|
||||||
|
<TextBlock Text="密码:" Grid.Column="0" Grid.Row="3"></TextBlock>
|
||||||
|
<TextBox x:Name="TextBoxNaivePassword" Grid.Column="1" Grid.Row="3" Margin="3"></TextBox>
|
||||||
|
<Button x:Name="ButtonNaivePassword" Content="更新" Grid.Column="2" Grid.Row="3" Margin="2" Click="ButtonNaivePassword_Click"></Button>
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
|
<!--<Button x:Name="ButtonNaiveTemplate" Content="Naive设置" Grid.Column="1" Grid.Row="0" Margin="5" Click="ButtonTrojanTemplate_Click"/>
|
||||||
|
<TextBlock Text="Naive参数设置" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Center"></TextBlock>-->
|
||||||
|
|
||||||
|
<Button x:Name="ButtonNavieSetUp" Content="NaiveProxy一键安装" Grid.ColumnSpan="1" Margin="10" Grid.Column="0" Grid.Row="2" Click="ButtonNavieSetUp_Click"/>
|
||||||
|
<Button x:Name="ButtonNaiveCancel" Content="取消" Grid.ColumnSpan="1" Margin="10" Grid.Column="2" Grid.Row="2" Click="Button_canel_Click"></Button>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
<TabItem Header="系统工具" Width="100" Height="30">
|
<TabItem Header="系统工具" Width="100" Height="30">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
@ -47,12 +47,22 @@ namespace ProxySU
|
|||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
//初始化选定密码登录
|
||||||
RadioButtonPasswordLogin.IsChecked = true;
|
RadioButtonPasswordLogin.IsChecked = true;
|
||||||
|
//初始化选定无代理
|
||||||
RadioButtonNoProxy.IsChecked = true;
|
RadioButtonNoProxy.IsChecked = true;
|
||||||
|
//初始化代理无需登录
|
||||||
RadioButtonProxyNoLogin.IsChecked = true;
|
RadioButtonProxyNoLogin.IsChecked = true;
|
||||||
|
//初始化隐藏Socks4代理,
|
||||||
RadioButtonSocks4.Visibility = Visibility.Collapsed;
|
RadioButtonSocks4.Visibility = Visibility.Collapsed;
|
||||||
|
//初始化参数给
|
||||||
ReceiveConfigurationParameters = new string[8];
|
ReceiveConfigurationParameters = new string[8];
|
||||||
|
//初始化NaiveProxy的密码
|
||||||
|
|
||||||
|
TextBoxNaivePassword.Text = RandomUUID();
|
||||||
|
//初始化产生用户名
|
||||||
|
TextBoxNaiveUser.Text = RandomUserName();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//远程主机连接信息
|
//远程主机连接信息
|
||||||
@ -1826,12 +1836,51 @@ namespace ProxySU
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonTestTrojanClientInfoWin_Click(object sender, RoutedEventArgs e)
|
//更新NaiveProxy的密码
|
||||||
|
private void ButtonNaivePassword_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
//TrojanResultClientInfoWindow resultClientInformation = new TrojanResultClientInfoWindow();
|
Guid uuid = Guid.NewGuid();
|
||||||
//resultClientInformation.ShowDialog();
|
TextBoxNaivePassword.Text = uuid.ToString();
|
||||||
MessageBox.Show(ReceiveConfigurationParameters[4]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//生成随机UUID
|
||||||
|
private string RandomUUID()
|
||||||
|
{
|
||||||
|
Guid uuid = Guid.NewGuid();
|
||||||
|
//TextBoxNaivePassword.Text = uuid.ToString();
|
||||||
|
return uuid.ToString();
|
||||||
|
}
|
||||||
|
//NaiveProxy产生随机用户名
|
||||||
|
private string RandomUserName()
|
||||||
|
{
|
||||||
|
Random random = new Random();
|
||||||
|
int randomSerialNum = random.Next(0, 4);
|
||||||
|
Guid uuid = Guid.NewGuid();
|
||||||
|
string[] pathArray = uuid.ToString().Split('-');
|
||||||
|
string path = pathArray[randomSerialNum];
|
||||||
|
return path;
|
||||||
|
// TextBoxPath.Text = $"/{path}";
|
||||||
|
//MessageBox.Show(path);
|
||||||
|
}
|
||||||
|
//NaiveProxy更改用户名,随机方式
|
||||||
|
private void ButtonNaiveUser_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
TextBoxNaiveUser.Text = RandomUserName();
|
||||||
|
}
|
||||||
|
|
||||||
|
//NaiveProxy一键安装开始
|
||||||
|
private void ButtonNavieSetUp_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//private void ButtonTestTrojanClientInfoWin_Click(object sender, RoutedEventArgs e)
|
||||||
|
//{
|
||||||
|
// //TrojanResultClientInfoWindow resultClientInformation = new TrojanResultClientInfoWindow();
|
||||||
|
// //resultClientInformation.ShowDialog();
|
||||||
|
// MessageBox.Show(ReceiveConfigurationParameters[4]);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid>
|
<Grid>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user