Skip to content

Commit

Permalink
添加NaiveGUI的URL支持
Browse files Browse the repository at this point in the history
  • Loading branch information
proxysu committed May 19, 2020
1 parent 7e052b8 commit bfdc8f4
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion ProxySU/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Text="程序版本:1.5.2" Grid.Column="0" Grid.Row="0"></TextBlock>
<TextBlock Text="程序版本:1.5.3" Grid.Column="0" Grid.Row="0"></TextBlock>

</Grid>

Expand Down
11 changes: 9 additions & 2 deletions ProxySU/NaiveProxyResultInfoWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ProxySU"
mc:Ignorable="d"
Title="NaiveProxyResultInfoWindow" Height="200" Width="400">
Title="NaiveProxyResultInfoWindow" Height="300" Width="400">
<Grid>
<GroupBox Header="服务器连接参数">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="0.5*"></RowDefinition>
</Grid.RowDefinitions>
<GroupBox Header="服务器连接参数" Grid.Row="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.6*"></ColumnDefinition>
Expand All @@ -33,5 +37,8 @@
<Button x:Name="ButtonOpenDir" Content="确定" Grid.Column="1" Grid.Row="4" Margin="40,3,40,3" Click="ButtonOpenDir_Click"></Button>
</Grid>
</GroupBox>
<GroupBox Header="NaiveGUI导入URL" Grid.Row="1">
<TextBox x:Name="TextBoxNaiveGUIurl" Margin="10" TextWrapping="Wrap"></TextBox>
</GroupBox>
</Grid>
</Window>
22 changes: 12 additions & 10 deletions ProxySU/NaiveProxyResultInfoWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ private void GenerateV2rayShareQRcodeAndBase64Url()
num++;
}
CheckDir(@"naive_config\" + saveFileFolder);
//string trojanUrl = $"trojan://{TextBoxTrojanServerPassword.Text}@{TextBoxTrojanServerHost.Text}:{TextBoxTrojanServerPort.Text}#{TextBoxTrojanServerHost.Text}";
string naiveUrl = $"https://{TextBoxNaiveUser.Text}:{TextBoxNaivePassword.Text}@{TextBoxNaiveServerHost.Text}:443/?name={TextBoxNaiveServerHost.Text}&padding=true";
//MessageBox.Show(v2rayNjsonObject.ToString());
//string trojanUrl = "trojan://" + ToBase64Encode(v2rayNjsonObject.ToString());
//TextBoxTrojanUrl.Text = trojanUrl;
//using (StreamWriter sw = new StreamWriter($"trojan_config\\{saveFileFolder}\\url.txt"))
//{
// sw.WriteLine(trojanUrl);
TextBoxNaiveGUIurl.Text = naiveUrl;
using (StreamWriter sw = new StreamWriter($"naive_config\\{saveFileFolder}\\url.txt"))
{
sw.WriteLine(naiveUrl);

//}
}
//CreateQRCode(trojanUrl);

//移动NaiveProxy官方程序配置文件到相应目录
Expand All @@ -73,17 +73,19 @@ private void GenerateV2rayShareQRcodeAndBase64Url()
sw.WriteLine("NaiveProxy官方程序下载地址:https://github.com/klzgrad/naiveproxy/releases");
sw.WriteLine("下载相应版本,Windows选择naiveproxy-x.xx-win.zip,解压后提取naive.exe。与config.json放在同一目录,运行naive.exe即可。");
sw.WriteLine("-----------------------------------------\n");
sw.WriteLine("其他平台的客户端,暂未发布");
//sw.WriteLine("其他平台的客户端,暂未发布");
//sw.WriteLine("QR.bmp");
//sw.WriteLine("此文件为Trojan-QT5 (windows)、igniter(Android)、Shadowrocket(ios)扫码导入节点");
//sw.WriteLine("Trojan-QT5 (windows)下载网址:https://github.com/TheWanderingCoel/Trojan-Qt5/releases");
//sw.WriteLine("igniter(Android)下载网址:https://github.com/trojan-gfw/igniter/releases");
//sw.WriteLine("Shadowrocket(ios)下载,需要使用国外区的AppleID。请自行谷歌方法。");

//sw.WriteLine("-----------------------------------------\n");
//sw.WriteLine("url.txt");
//sw.WriteLine("此文件为Trojan-QT5 (windows)、igniter(Android)、Shadowrocket(ios)复制粘贴导入节点的网址");
//sw.WriteLine("-----------------------------------------\n");
sw.WriteLine("url.txt");
sw.WriteLine("此文件为NaiveGUI(windows)复制粘贴导入节点的网址");
sw.WriteLine("NaiveGUI(windows)下载网址:https://github.com/ExcitedCodes/NaiveGUI/releases");

sw.WriteLine("-----------------------------------------\n");
sw.WriteLine("服务器通用连接配置参数");
sw.WriteLine($"地址(address):{TextBoxNaiveServerHost.Text}");
sw.WriteLine($"用户名:{TextBoxNaiveUser.Text}");
Expand Down
4 changes: 2 additions & 2 deletions ProxySU/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.2.0")]
[assembly: AssemblyFileVersion("1.5.2.0")]
[assembly: AssemblyVersion("1.5.3.0")]
[assembly: AssemblyFileVersion("1.5.3.0")]
Binary file modified ProxySU/bin/Beta/Beta.zip
Binary file not shown.

0 comments on commit bfdc8f4

Please sign in to comment.