mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-22 13:16:09 +03:00
更新跟进Trojan-go最新分享链接标准
This commit is contained in:
parent
7e9fb342db
commit
3d0a177cd6
@ -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.0" Height="675" Width="650">
|
||||
Title="ProxySU - v2.4.1" 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>
|
||||
|
@ -45,10 +45,10 @@ namespace ProxySU
|
||||
//ReceiveConfigurationParameters[0]----模板类型
|
||||
//ReceiveConfigurationParameters[1]----服务端口
|
||||
//ReceiveConfigurationParameters[2]----V2Ray uuid/(naive/Trojan-go/Trojan/SSR/SS)' Password
|
||||
//ReceiveConfigurationParameters[3]----QUIC加密方式/SSR 加密方法/naive'user/VLESS ws Path
|
||||
//ReceiveConfigurationParameters[3]----QUIC加密方式/SSR 加密方法/SS 加密方式/naive'user/VLESS ws Path
|
||||
//ReceiveConfigurationParameters[4]----Domain
|
||||
//ReceiveConfigurationParameters[5]----伪装类型/插件名称
|
||||
//ReceiveConfigurationParameters[6]----Websocket'Path/http2'Path/QUIC密钥/mKCP Seed/SS 加密方式/VMESS ws Path
|
||||
//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
|
||||
@ -3595,7 +3595,7 @@ namespace ProxySU
|
||||
TextBlockTrojanGoCurrentlySelectedPlanPassword.Visibility = Visibility.Visible;
|
||||
|
||||
TextBlockTrojanGoShowPath.Text = "WebSocket Path:";
|
||||
TextBlockTrojanGoCurrentlySelectedPlanPathSeedKey.Text = ReceiveConfigurationParameters[3]; //mKCP Seed\Quic Key\Path
|
||||
TextBlockTrojanGoCurrentlySelectedPlanPathSeedKey.Text = ReceiveConfigurationParameters[6]; //mKCP Seed\Quic Key\Path
|
||||
|
||||
|
||||
TextBlockTrojanGoShowPath.Visibility = Visibility.Visible;
|
||||
@ -4281,7 +4281,7 @@ namespace ProxySU
|
||||
if (String.Equals(ReceiveConfigurationParameters[0], "TrojanGoWebSocketTLS2Web"))
|
||||
{
|
||||
serverJson["websocket"]["enabled"] = true;
|
||||
serverJson["websocket"]["path"] = ReceiveConfigurationParameters[3];
|
||||
serverJson["websocket"]["path"] = ReceiveConfigurationParameters[6];
|
||||
}
|
||||
|
||||
using (StreamWriter sw = new StreamWriter(@"config.json"))
|
||||
@ -4880,7 +4880,7 @@ namespace ProxySU
|
||||
if (String.Equals(ReceiveConfigurationParameters[0], "TrojanGoWebSocketTLS2Web"))
|
||||
{
|
||||
clientJson["websocket"]["enabled"] = true;
|
||||
clientJson["websocket"]["path"] = ReceiveConfigurationParameters[3];
|
||||
clientJson["websocket"]["path"] = ReceiveConfigurationParameters[6];
|
||||
}
|
||||
|
||||
using (StreamWriter sw = new StreamWriter(@"trojan-go_config\config.json"))
|
||||
@ -9279,9 +9279,9 @@ namespace ProxySU
|
||||
TextBlockCurrentlySelectedPlanSS.Text = ReceiveConfigurationParameters[8]; //所选方案名称
|
||||
TextBlockCurrentlySelectedPlanPortSS.Text = ReceiveConfigurationParameters[1]; //服务器端口
|
||||
TextBlockCurrentlySelectedPlanUUIDSS.Text = ReceiveConfigurationParameters[2]; //密码
|
||||
TextBlockCurrentlySelectedPlanMethodSS.Text = ReceiveConfigurationParameters[6]; //加密方法
|
||||
TextBlockCurrentlySelectedPlanMethodSS.Text = ReceiveConfigurationParameters[3]; //加密方法
|
||||
TextBlockCurrentlySelectedPlanDomainSS.Text = ReceiveConfigurationParameters[4]; //域名
|
||||
TextBlockCurrentlySelectedPlanPathSS.Text = ReceiveConfigurationParameters[3]; //WebSocket Path
|
||||
TextBlockCurrentlySelectedPlanPathSS.Text = ReceiveConfigurationParameters[6]; //WebSocket Path
|
||||
TextBlockCurrentlySelectedPlanFakeWebsite.Text = ReceiveConfigurationParameters[7]; //伪装网站
|
||||
|
||||
if (String.Equals(ReceiveConfigurationParameters[0], "NonePluginSS")
|
||||
@ -10135,7 +10135,7 @@ namespace ProxySU
|
||||
//设置监听端口
|
||||
serverJson["server_port"]= int.Parse(ReceiveConfigurationParameters[1]);
|
||||
//设置加密方式
|
||||
serverJson["method"] = ReceiveConfigurationParameters[6];
|
||||
serverJson["method"] = ReceiveConfigurationParameters[3];
|
||||
//产生伪装Web的监听端口
|
||||
randomCaddyListenPort = GetRandomPort();
|
||||
|
||||
@ -10172,11 +10172,11 @@ namespace ProxySU
|
||||
{
|
||||
serverJson["server_port"] = 10000;
|
||||
serverJson["plugin"] = @"v2ray-plugin";
|
||||
serverJson["plugin_opts"] = $"server;host={ReceiveConfigurationParameters[4]};path={ReceiveConfigurationParameters[3]}";
|
||||
serverJson["plugin_opts"] = $"server;host={ReceiveConfigurationParameters[4]};path={ReceiveConfigurationParameters[6]}";
|
||||
|
||||
//客户端项
|
||||
ReceiveConfigurationParameters[5] = @"v2ray-plugin";
|
||||
ReceiveConfigurationParameters[9] = $"tls;host={ReceiveConfigurationParameters[4]};path={ReceiveConfigurationParameters[3]}";
|
||||
ReceiveConfigurationParameters[9] = $"tls;host={ReceiveConfigurationParameters[4]};path={ReceiveConfigurationParameters[6]}";
|
||||
}
|
||||
else if (String.Equals(ReceiveConfigurationParameters[0], "QuicSS") == true)
|
||||
{
|
||||
|
@ -51,5 +51,5 @@ using System.Windows;
|
||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.4.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.4.0.0")]
|
||||
[assembly: AssemblyVersion("2.4.1.0")]
|
||||
[assembly: AssemblyFileVersion("2.4.1.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,7 +93,7 @@
|
||||
</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>
|
||||
@ -106,6 +106,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>
|
||||
@ -116,11 +117,15 @@
|
||||
<TextBlock Grid.Column="2" Grid.Row="2"></TextBlock>
|
||||
<TextBlock Text="{DynamicResource TextBlockHostPassword}" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBox x:Name="TextBoxTrojanGoServerPassword" IsReadOnly="True" Grid.Column="1" Grid.Row="3" Margin="4" MouseDoubleClick="TextBoxTrojanGoServerPassword_MouseDoubleClick"></TextBox>
|
||||
<TextBlock Grid.Column="2" Grid.Row="3"></TextBlock>
|
||||
<TextBlock x:Name="TextBlockTrojanGoWebSocketPath" Text="{DynamicResource TextBlockTrojanGoWebSocketPath}" Grid.Column="0" Grid.Row="4" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBox x:Name="TextBoxTrojanGoWSPath" IsReadOnly="True" Grid.Column="1" Grid.Row="4" Margin="4" MouseDoubleClick="TextBoxTrojanGoWSPath_MouseDoubleClick"></TextBox>
|
||||
|
||||
<TextBlock Text="Type:" Grid.Column="0" Grid.Row="4" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBox x:Name="TextBoxTrojanGoType" IsReadOnly="True" Grid.Column="1" Grid.Row="4" Margin="4" MouseDoubleClick="TextBoxTrojanGoType_MouseDoubleClick"></TextBox>
|
||||
|
||||
<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="5" Grid.ColumnSpan="2" Margin="5" VerticalAlignment="Center"></TextBlock>
|
||||
|
||||
<TextBlock Text="{DynamicResource TextBlockCopyToClipExplain}" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="2" Margin="5" VerticalAlignment="Center"></TextBlock>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<!-- Trojan客户端配置参数 -->
|
||||
|
@ -364,10 +364,13 @@ namespace ProxySU
|
||||
TextBoxTrojanGoServerPort.Text = "443";
|
||||
//密钥(uuid)
|
||||
TextBoxTrojanGoServerPassword.Text = MainWindow.ReceiveConfigurationParameters[2];
|
||||
//TrojanGo 使用类型
|
||||
TextBoxTrojanGoType.Text = "original";
|
||||
//WebSocket路径
|
||||
if (MainWindow.ReceiveConfigurationParameters[0].Equals("TrojanGoWebSocketTLS2Web"))
|
||||
{
|
||||
TextBoxTrojanGoWSPath.Text = MainWindow.ReceiveConfigurationParameters[3];
|
||||
TextBoxTrojanGoType.Text = "ws";
|
||||
TextBoxTrojanGoWSPath.Text = MainWindow.ReceiveConfigurationParameters[6];
|
||||
TextBoxTrojanGoWSPath.Visibility = Visibility.Visible;
|
||||
TextBlockTrojanGoWebSocketPath.Visibility = Visibility.Visible;
|
||||
TextBlockTrojanGoCaption.Visibility = Visibility.Visible;
|
||||
@ -468,7 +471,7 @@ namespace ProxySU
|
||||
//密码(uuid)
|
||||
TextBoxPasswordSS.Text = MainWindow.ReceiveConfigurationParameters[2];
|
||||
//加密方式
|
||||
TextBoxEncryptionSS.Text = MainWindow.ReceiveConfigurationParameters[6];
|
||||
TextBoxEncryptionSS.Text = MainWindow.ReceiveConfigurationParameters[3];
|
||||
//插件程序
|
||||
TextBoxPluginNameExplainSS.Text = MainWindow.ReceiveConfigurationParameters[5];
|
||||
//插件选项
|
||||
@ -692,9 +695,9 @@ namespace ProxySU
|
||||
ShowPathV2ray();
|
||||
TextBoxQuicKeyMkcpSeedPath.Text = MainWindow.ReceiveConfigurationParameters[9];
|
||||
TextBlockVmessOrVless.Visibility = Visibility.Collapsed;
|
||||
//隐藏下面的二维码显示,因为V2rayN还未支持TCP Path模式。
|
||||
HideGroupBoxClientQRandURL();
|
||||
//ShowGroupBoxClientQRandURL();
|
||||
//显示下面的二维码显示。
|
||||
//HideGroupBoxClientQRandURL();
|
||||
ShowGroupBoxClientQRandURL();
|
||||
}
|
||||
|
||||
//设置VMess over WS with TLS
|
||||
@ -1909,26 +1912,16 @@ namespace ProxySU
|
||||
string proxyfolder = CheckDir("trojan-go_config");
|
||||
configDomainSavePath = CreateConfigSaveDir(proxyfolder, TextBoxTrojanGoServerHost.Text);
|
||||
string configSavePath = configDomainSavePath;
|
||||
//string saveFileFolderFirst = TextBoxTrojanGoServerHost.Text;
|
||||
//int num = 1;
|
||||
//saveFileFolder = saveFileFolderFirst;
|
||||
|
||||
//while (Directory.Exists(@"trojan-go_config\" + saveFileFolder))
|
||||
//{
|
||||
// saveFileFolder = saveFileFolderFirst + "_copy_" + num.ToString();
|
||||
// num++;
|
||||
//}
|
||||
//CheckDir(@"trojan-go_config\" + saveFileFolder);
|
||||
string trojanUrl = $"trojan://{TextBoxTrojanGoServerPassword.Text}@{TextBoxTrojanGoServerHost.Text}:{TextBoxTrojanGoServerPort.Text}?allowinsecure=0&tfo=0&sni=&mux=0&ws=0&group=#{TextBoxTrojanGoServerHost.Text}";
|
||||
//MessageBox.Show(v2rayNjsonObject.ToString());
|
||||
//string trojanUrl = "trojan://" + ToBase64Encode(v2rayNjsonObject.ToString());
|
||||
TextBoxURL.Text = trojanUrl;
|
||||
string trojanGoUrl = GetTrojanGoUrl();
|
||||
|
||||
TextBoxURL.Text = trojanGoUrl;
|
||||
using (StreamWriter sw = new StreamWriter($"{configSavePath}\\url.txt"))
|
||||
{
|
||||
sw.WriteLine(trojanUrl);
|
||||
sw.WriteLine(trojanGoUrl);
|
||||
|
||||
}
|
||||
ImageShareQRcode.Source = CreateQRCode(trojanUrl, $"{configSavePath}\\QR.bmp");
|
||||
ImageShareQRcode.Source = CreateQRCode(trojanGoUrl, $"{configSavePath}\\QR.bmp");
|
||||
|
||||
//移动Trojan官方程序配置文件到相应目录
|
||||
if (File.Exists(@"trojan-go_config\config.json"))
|
||||
@ -1956,21 +1949,21 @@ namespace ProxySU
|
||||
sw.WriteLine("-----------------------------------------\n");
|
||||
sw.WriteLine("QR.bmp");
|
||||
|
||||
//sw.WriteLine("此文件为Trojan-QT5 (windows)、igniter(Android)、Shadowrocket(ios)扫码导入节点(Trojan-Go的WebSocket模式暂不支持)");
|
||||
//sw.WriteLine("此文件为Qv2ray (windows)、igniter(Android)扫码导入节点");
|
||||
sw.WriteLine(Application.Current.FindResource("readmeTxtTrojan-goExplainLine05").ToString());
|
||||
|
||||
//sw.WriteLine("Trojan-QT5 (windows)下载网址:https://github.com/TheWanderingCoel/Trojan-Qt5/releases");
|
||||
//sw.WriteLine("Qv2ray (windows)下载网址:https://github.com/Qv2ray/Qv2ray/releases");
|
||||
sw.WriteLine(Application.Current.FindResource("readmeTxtTrojan-goExplainLine06").ToString());
|
||||
|
||||
//sw.WriteLine("igniter(Android)下载网址:https://github.com/trojan-gfw/igniter/releases");
|
||||
sw.WriteLine(Application.Current.FindResource("readmeTxtTrojan-goExplainLine07").ToString());
|
||||
|
||||
//sw.WriteLine("Shadowrocket(ios)下载,需要使用国外区的AppleID。请自行谷歌方法。");
|
||||
sw.WriteLine(Application.Current.FindResource("readmeTxtTrojan-goExplainLine08").ToString());
|
||||
// sw.WriteLine(Application.Current.FindResource("readmeTxtTrojan-goExplainLine08").ToString());
|
||||
sw.WriteLine("-----------------------------------------\n");
|
||||
sw.WriteLine("url.txt");
|
||||
|
||||
//sw.WriteLine("此文件为Trojan-QT5 (windows)、igniter(Android)、Shadowrocket(ios)复制粘贴导入节点的网址(Trojan-Go的WebSocket模式暂不支持)");
|
||||
//sw.WriteLine("此文件为Qv2ray (windows)、igniter(Android)复制粘贴导入节点的网址");
|
||||
sw.WriteLine(Application.Current.FindResource("readmeTxtTrojan-goExplainLine09").ToString());
|
||||
sw.WriteLine("-----------------------------------------\n");
|
||||
|
||||
@ -2000,6 +1993,13 @@ namespace ProxySU
|
||||
strParam = TextBoxTrojanGoServerPassword.Text;
|
||||
sw.WriteLine(AlignmentStrFunc(Application.Current.FindResource($"{strApplicat}").ToString(), strLenth) + strParam);
|
||||
|
||||
//****** Type: ******
|
||||
//sw.WriteLine(Application.Current.FindResource("TextBlockTrojanGoPassword").ToString() + $"{TextBoxTrojanGoServerPassword.Text}");
|
||||
//strApplicat = "TextBlockTrojanGoPassword";
|
||||
strParam = TextBoxTrojanGoType.Text;
|
||||
sw.WriteLine(AlignmentStrFunc("Type", strLenth) + strParam);
|
||||
//sw.WriteLine(AlignmentStrFunc(Application.Current.FindResource($"{strApplicat}").ToString(), strLenth) + strParam);
|
||||
|
||||
//****** WebSocket路径: ******
|
||||
//sw.WriteLine(Application.Current.FindResource("TextBlockTrojanGoWebSocketPath").ToString() + $"{TextBoxTrojanGoWSPath.Text}");
|
||||
strApplicat = "TextBlockTrojanGoWebSocketPath";
|
||||
@ -2009,6 +2009,7 @@ namespace ProxySU
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region TrojanGo内容双击复制到剪贴板
|
||||
private void TextBoxTrojanGoServerHost_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
@ -2024,13 +2025,63 @@ namespace ProxySU
|
||||
{
|
||||
CopyToClipboard(TextBoxTrojanGoServerPassword.Text);
|
||||
}
|
||||
|
||||
private void TextBoxTrojanGoType_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
CopyToClipboard(TextBoxTrojanGoType.Text);
|
||||
}
|
||||
private void TextBoxTrojanGoWSPath_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
CopyToClipboard(TextBoxTrojanGoWSPath.Text);
|
||||
}
|
||||
#endregion
|
||||
|
||||
//生成TrojanGo的分享链接
|
||||
private string GetTrojanGoUrl()
|
||||
{
|
||||
string trojanGoPassword = EncodeURIComponent(TextBoxTrojanGoServerPassword.Text);
|
||||
string trojanGoHost = TextBoxTrojanGoServerHost.Text;
|
||||
string trojanGoPort = TextBoxTrojanGoServerPort.Text;
|
||||
|
||||
string trojanGoSni = EncodeURIComponent(trojanGoHost);
|
||||
string trojanGoType= EncodeURIComponent(TextBoxTrojanGoType.Text);
|
||||
string trojanGohostName = EncodeURIComponent(trojanGoHost);
|
||||
|
||||
string trojanGoPath = EncodeURIComponent(TextBoxTrojanGoWSPath.Text);
|
||||
string trojanGoEncryption = EncodeURIComponent("");
|
||||
string trojanGoPlugin = EncodeURIComponent("");
|
||||
|
||||
string trojanGoRemarks = EncodeURIComponent(trojanGoHost);
|
||||
|
||||
//分享链接规范:https://github.com/p4gefau1t/trojan-go/issues/132
|
||||
//trojan-go://$(trojan-password)@trojan-host:port/?sni=$(update.microsoft.com)&type=$(original|ws|h2|h2+ws)&host=$(update-01.microsoft.com)&path=$(/update/whatever)&encryption=$(ss;aes-256-gcm:ss-password)&plugin=$(...)#$(descriptive-text)
|
||||
//string trojanGoUrl = $"trojan-go://{trojanGoPassword}@{trojanGoHost}:{trojanGoPort}/?sni={trojanGoSni}&type={trojanGoType}&host={trojanGohostName}&path={trojanGoPath}&encryption={trojanGoEncryption}&plugin={trojanGoPlugin}#{trojanGoRemarks}";
|
||||
|
||||
//&path={trojanGoPath}
|
||||
//&encryption={trojanGoEncryption}
|
||||
//&plugin={trojanGoPlugin}
|
||||
//#{trojanGoRemarks}
|
||||
string trojanGoUrl = $"trojan-go://{trojanGoPassword}@{trojanGoHost}:{trojanGoPort}/?sni={trojanGoSni}&type={trojanGoType}&host={trojanGohostName}";
|
||||
|
||||
if (String.IsNullOrEmpty(trojanGoPath) == false)
|
||||
{
|
||||
trojanGoUrl += $"&path={trojanGoPath}";
|
||||
}
|
||||
if (String.IsNullOrEmpty(trojanGoEncryption) == false)
|
||||
{
|
||||
trojanGoUrl += $"&encryption={trojanGoEncryption}";
|
||||
}
|
||||
if (String.IsNullOrEmpty(trojanGoPlugin) == false)
|
||||
{
|
||||
trojanGoUrl += $"&plugin={trojanGoPlugin}";
|
||||
}
|
||||
|
||||
trojanGoUrl += $"#{trojanGoRemarks}";
|
||||
return trojanGoUrl;
|
||||
}
|
||||
private string EncodeURIComponent(string initialUri)
|
||||
{
|
||||
return Uri.EscapeDataString(initialUri);
|
||||
}
|
||||
|
||||
//生成Trojan客户端资料
|
||||
private void GenerateTrojanShareQRcodeAndBase64Url()
|
||||
@ -2135,6 +2186,7 @@ namespace ProxySU
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region Trojan内容双击复制到剪贴板
|
||||
|
||||
private void TextBoxTrojanServerHost_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
@ -2246,6 +2298,7 @@ namespace ProxySU
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region NaiveProxy内容双击复制到剪贴板
|
||||
private void TextBoxNaiveServerHost_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
@ -2366,6 +2419,7 @@ namespace ProxySU
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#region SSR内容双击复制到剪贴板
|
||||
|
||||
private void TextBoxSSRHostAddress_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
@ -2982,7 +3036,7 @@ namespace ProxySU
|
||||
return spaceString + strTemp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -138,7 +138,7 @@ namespace ProxySU
|
||||
//传递方案名称
|
||||
MainWindow.ReceiveConfigurationParameters[8] = RadioButtonWebSocketSS.Content.ToString();
|
||||
//传递路径
|
||||
MainWindow.ReceiveConfigurationParameters[3] = TextBoxWebSocketPathSS.Text.ToString();
|
||||
MainWindow.ReceiveConfigurationParameters[6] = TextBoxWebSocketPathSS.Text.ToString();
|
||||
}
|
||||
|
||||
//V2Ray-Plugin SS+WebSocket+TLS+Web模式被选中
|
||||
@ -151,7 +151,7 @@ namespace ProxySU
|
||||
MainWindow.ReceiveConfigurationParameters[8] = RadioButtonWebSocketTLSWebFrontSS.Content.ToString();
|
||||
|
||||
//传递路径
|
||||
MainWindow.ReceiveConfigurationParameters[3] = TextBoxWebSocketPathSS.Text.ToString();
|
||||
MainWindow.ReceiveConfigurationParameters[6] = TextBoxWebSocketPathSS.Text.ToString();
|
||||
//传递域名
|
||||
MainWindow.ReceiveConfigurationParameters[4] = TextBoxDomainSS.Text.ToString();
|
||||
//传递伪装网站
|
||||
@ -224,7 +224,7 @@ namespace ProxySU
|
||||
//传递uuid密码
|
||||
MainWindow.ReceiveConfigurationParameters[2] = TextBoxNewUUIDSS.Text.ToString();
|
||||
//传递加密方式
|
||||
MainWindow.ReceiveConfigurationParameters[6] = GetEncryptionMethodSS();
|
||||
MainWindow.ReceiveConfigurationParameters[3] = GetEncryptionMethodSS();
|
||||
|
||||
if (testDomain)
|
||||
{
|
||||
@ -329,7 +329,7 @@ namespace ProxySU
|
||||
private void ComboBoxEncryptionMethodInfo_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
//传递加密方式
|
||||
MainWindow.ReceiveConfigurationParameters[6] = GetEncryptionMethodSS();
|
||||
MainWindow.ReceiveConfigurationParameters[3] = GetEncryptionMethodSS();
|
||||
|
||||
}
|
||||
|
||||
|
@ -364,11 +364,11 @@
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine02">Trojan-go official website: https://github.com/p4gefau1t/trojan-go</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine03">Trojan-go official program download address: https://github.com/p4gefau1t/trojan-go/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine04">Download the corresponding version, select Trojan-go-x.xx-win.zip for Windows, extract trojan-go.exe after decompression. Put it in the same directory as config.json, just run trojan-go.exe.</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine05">This file is for Trojan-QT5 (windows), ignore (Android), Shadowrocket (ios) scan code import node (Trojan-Go’s WebSocket mode is not currently supported)</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine06">Trojan-QT5 (windows) download URL: https://github.com/TheWanderingCoel/Trojan-Qt5/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine05">This file is for Qv2ray (windows), ignore (Android) scan code import node</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine06">Qv2ray (windows) download URL: https://github.com/Qv2ray/Qv2ray/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine07">igniter (Android) download URL: https://github.com/trojan-gfw/igniter/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine08">Shadowrocket(ios) download, you need to use the AppleID of the foreign region. Please Google method yourself.</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine09">This file is Trojan-QT5 (windows), ignore (Android), Shadowrocket (ios) copy and paste the URL of the imported node (Trojan-Go’s WebSocket mode is not currently supported)</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine09">This file is Qv2ray (windows), ignore (Android)copy and paste the URL of the imported node</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine10">Server general connection configuration parameters</sys:String>
|
||||
<!--The following is the documentation for the Trojan client-->
|
||||
<sys:String x:Key="readmeTxtTrojanExplainLine01">This file is the client configuration file used by the official Trojan program. It is configured in global mode, http and socks5 address: 127.0.0.1:1080</sys:String>
|
||||
|
@ -373,11 +373,11 @@
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine02">Trojan-go官方网站:https://github.com/p4gefau1t/trojan-go</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine03">Trojan-go官方程序下载地址:https://github.com/p4gefau1t/trojan-go/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine04">下载相应版本,Windows选择Trojan-go-x.xx-win.zip,解压后提取trojan-go.exe。与config.json放在同一目录,运行trojan-go.exe即可。</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine05">此文件为Trojan-QT5 (windows)、igniter(Android)、Shadowrocket(ios)扫码导入节点(Trojan-Go的WebSocket模式暂不支持)</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine06">Trojan-QT5 (windows)下载网址:https://github.com/TheWanderingCoel/Trojan-Qt5/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine05">此文件为Qv2ray (windows)、igniter(Android)扫码导入节点</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine06">Qv2ray (windows)下载网址:https://github.com/Qv2ray/Qv2ray/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine07">igniter(Android)下载网址:https://github.com/trojan-gfw/igniter/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine08">Shadowrocket(ios)下载,需要使用国外区的AppleID。请自行谷歌方法。</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine09">此文件为Trojan-QT5 (windows)、igniter(Android)、Shadowrocket(ios)复制粘贴导入节点的网址(Trojan-Go的WebSocket模式暂不支持)</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine09">此文件为Qv2ray (windows)、igniter(Android)复制粘贴导入节点的网址</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine10">服务器通用连接配置参数</sys:String>
|
||||
<!--以下为Trojan客户端说明文件-->
|
||||
<sys:String x:Key="readmeTxtTrojanExplainLine01">此文件为Trojan官方程序所使用的客户端配置文件,配置为全局模式,http与socks5地址:127.0.0.1:1080</sys:String>
|
||||
|
@ -367,11 +367,11 @@
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine02">Trojan-go官方網站:https://github.com/p4gefau1t/trojan-go</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine03">Trojan-go官方程序下載地址:https://github.com/p4gefau1t/trojan-go/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine04">下載相應版本,Windows選擇Trojan-go-x.xx-win.zip,解壓後提取trojan-go.exe。與config.json放在同一目錄,運行trojan-go.exe即可。</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine05">此文件為Trojan-QT5 (windows)、igniter(Android)、Shadowrocket(ios)掃碼導入節點(Trojan-Go的WebSocket模式暫不支持)</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine06">Trojan-QT5 (windows)下載網址:https://github.com/TheWanderingCoel/Trojan-Qt5/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine05">此文件為Qv2ray (windows)、igniter(Android)掃碼導入節點</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine06">Qv2ray (windows)下載網址:https://github.com/Qv2ray/Qv2ray/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine07">igniter(Android)下載網址:https://github.com/trojan-gfw/igniter/releases</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine08">Shadowrocket(ios)下載,需要使用國外區的AppleID。請自行谷歌方法。</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine09">此文件為Trojan-QT5 (windows)、igniter(Android)、Shadowrocket(ios)複製粘貼導入節點的網址(Trojan-Go的WebSocket模式暫不支持)</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine09">此文件為Qv2ray (windows)、igniter(Android)複製粘貼導入節點的網址</sys:String>
|
||||
<sys:String x:Key="readmeTxtTrojan-goExplainLine10">服務器通用連接配置參數</sys:String>
|
||||
<!--以下為Trojan客戶端說明文件-->
|
||||
<sys:String x:Key="readmeTxtTrojanExplainLine01">此文件為Trojan官方程序所使用的客戶端配置文件,配置為全局模式,http與socks5地址:127.0.0.1:1080</sys:String>
|
||||
|
@ -88,7 +88,7 @@
|
||||
<TextBlock x:Name="TextBlockNewUUID" Text="{DynamicResource TextBlockTrojanGoPassword}" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" ></TextBlock>
|
||||
<TextBox x:Name="TextBoxNewUUID" Grid.Column="1" Grid.Row="1" Margin="5"></TextBox>
|
||||
<Button x:Name="ButtonNewUUID" Content="{DynamicResource ButtonTrojanChangePassword}" Grid.Column="2" Grid.Row="1" Margin="3" Click="ButtonNewUUID_Click"></Button>
|
||||
<TextBlock Text="{DynamicResource TextBlockTrojanGoPasswordExplain}" TextWrapping="Wrap" Grid.Column="3" Grid.Row="1"></TextBlock>
|
||||
<TextBlock Text="{DynamicResource TextBlockTrojanGoPasswordExplain}" TextWrapping="Wrap" Grid.Column="3" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
|
||||
<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>
|
||||
|
@ -68,7 +68,8 @@ namespace ProxySU
|
||||
MainWindow.ReceiveConfigurationParameters[0] = "TrojanGoWebSocketTLS2Web";
|
||||
//传递方案名称
|
||||
MainWindow.ReceiveConfigurationParameters[8] = RadioButtonTrojanGoWebSocketTLS2Web.Content.ToString();
|
||||
MainWindow.ReceiveConfigurationParameters[3] = TextBoxPath.Text;
|
||||
//传递路径
|
||||
MainWindow.ReceiveConfigurationParameters[6] = TextBoxPath.Text;
|
||||
}
|
||||
|
||||
this.Close();
|
||||
@ -76,25 +77,19 @@ namespace ProxySU
|
||||
//更新密码
|
||||
private void ButtonNewUUID_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Guid uuid = Guid.NewGuid();
|
||||
TextBoxNewUUID.Text = uuid.ToString();
|
||||
//Guid uuid = Guid.NewGuid();
|
||||
TextBoxNewUUID.Text = GenerateRandomUUID();
|
||||
}
|
||||
//更新路径
|
||||
private void ButtonPath_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Random random = new Random();
|
||||
int randomSerialNum = random.Next(0, 4);
|
||||
Guid uuid = Guid.NewGuid();
|
||||
string[] pathArray = uuid.ToString().Split('-');
|
||||
string path = pathArray[randomSerialNum];
|
||||
string path = GenerateRandomPath();
|
||||
TextBoxPath.Text = $"/{path}";
|
||||
//MessageBox.Show(path);
|
||||
}
|
||||
//private void ButtonServerListenPort_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// Random random = new Random();
|
||||
// int randomServerPort = random.Next(10000, 50000);
|
||||
// TextBoxServerListenPort.Text = randomServerPort.ToString();
|
||||
// TextBoxServerListenPort.Text = GetRandomPort();
|
||||
//}
|
||||
private void ButtondCancel_Click(object sender, RoutedEventArgs e) => Close();
|
||||
|
||||
@ -118,8 +113,45 @@ namespace ProxySU
|
||||
ButtonPath.Visibility = Visibility.Visible;
|
||||
TextBoxPath.Text = "/trojan";
|
||||
}
|
||||
|
||||
|
||||
|
||||
//生成随机UUID
|
||||
private string GenerateRandomUUID()
|
||||
{
|
||||
Guid uuid = Guid.NewGuid();
|
||||
return uuid.ToString();
|
||||
}
|
||||
|
||||
//生成随机端口
|
||||
private int GetRandomPort()
|
||||
{
|
||||
Random random = new Random();
|
||||
return random.Next(10001, 60000);
|
||||
}
|
||||
//生成随机Path
|
||||
private string GenerateRandomPath()
|
||||
{
|
||||
Random random = new Random();
|
||||
int randomSerialNum = random.Next(0, 4);
|
||||
//Guid uuid = Guid.NewGuid();
|
||||
string uuid = GenerateRandomUUID();
|
||||
string[] pathArray = uuid.Split('-');
|
||||
string path = pathArray[randomSerialNum];
|
||||
return path;
|
||||
}
|
||||
//域名检测是否为空
|
||||
private bool TestDomainIsEmpty()
|
||||
{
|
||||
if (string.IsNullOrEmpty(TextBoxDomain.Text.ToString()) == true)
|
||||
{
|
||||
//****** "域名不能为空,请检查相关参数设置!" ******
|
||||
MessageBox.Show(Application.Current.FindResource("MessageBoxShow_DomainNotEmpty").ToString());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1020,21 +1020,18 @@ namespace ProxySU
|
||||
//产生随机的uuid
|
||||
private void ButtonNewUUID_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//Guid uuid = Guid.NewGuid();
|
||||
TextBoxNewUUID.Text = GenerateRandomUUID();
|
||||
}
|
||||
|
||||
//产生QUIC密钥/mKCP Seed所用的UUID
|
||||
private void ButtonQuicAndMkcpSeedUUID_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//Guid uuid = Guid.NewGuid();
|
||||
TextBoxQuicAndMkcpSeedUUID.Text = GenerateRandomUUID();
|
||||
}
|
||||
|
||||
//更新随机服务端口
|
||||
private void ButtonServerListenPort_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//Random random = new Random();
|
||||
int randomServerPort = GetRandomPort();
|
||||
TextBoxServerListenPort.Text = randomServerPort.ToString();
|
||||
}
|
||||
@ -1042,13 +1039,8 @@ namespace ProxySU
|
||||
//更新单方案随机的Path
|
||||
private void ButtonPath_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//Random random = new Random();
|
||||
//int randomSerialNum = random.Next(0, 4);
|
||||
//Guid uuid = Guid.NewGuid();
|
||||
//string[] pathArray = uuid.ToString().Split('-');
|
||||
string path = GenerateRandomPath();
|
||||
TextBoxPath.Text = $"/{path}";
|
||||
//MessageBox.Show(path);
|
||||
}
|
||||
|
||||
//更新多方案共存的Path
|
||||
@ -1124,11 +1116,6 @@ namespace ProxySU
|
||||
//读取加密方式
|
||||
private string GetEncryptionMethodSS()
|
||||
{
|
||||
//string methodName;
|
||||
//object methodSelected;
|
||||
//methodSelected = ComboBoxEncryptionMethodInfo.SelectedValue;
|
||||
//methodName = methodSelected.ToString();
|
||||
//return methodName;
|
||||
return ComboBoxEncryptionMethodInfo.SelectedValue.ToString();
|
||||
}
|
||||
private void ButtonDomain_Click(object sender, RoutedEventArgs e)
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user