mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-22 05:06:08 +03:00
v2.5.1
This commit is contained in:
parent
e79607be2e
commit
55c7abf01c
@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ProxySU"
|
||||
mc:Ignorable="d"
|
||||
Title="ProxySU - v2.5.1 Beta2" Height="675" Width="660">
|
||||
Title="ProxySU - v2.5.1" Height="675" Width="660">
|
||||
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
||||
https://docs.microsoft.co/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
||||
<Window.Resources>
|
||||
|
@ -1355,13 +1355,13 @@ namespace ProxySU
|
||||
//currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||
|
||||
//备份原来的文件
|
||||
//functionResult = FileCheckExists(client, @"/usr/local/etc/v2ray/config.json");
|
||||
//if (functionResult == true)
|
||||
//{
|
||||
functionResult = FileCheckExists(client, @"/usr/local/etc/v2ray/config.json");
|
||||
if (functionResult == true)
|
||||
{
|
||||
|
||||
sshShellCommand = @"mv /usr/local/etc/v2ray/config.json /usr/local/etc/v2ray/config.json.1";
|
||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||
//}
|
||||
}
|
||||
//读取配置文件各个模块
|
||||
string logConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\server\00_log\00_log.json";
|
||||
string apiConfigJson = $"{pwdir}" + @"TemplateConfg\v2ray\server\01_api\01_api.json";
|
||||
@ -1959,29 +1959,29 @@ namespace ProxySU
|
||||
{
|
||||
//复合方案所需要的配置文件
|
||||
//VLESS over TCP with XTLS模式
|
||||
string outboundsConfigJsons = $"{pwdir}" + @"TemplateConfg\v2ray\client\06_outbounds\vless_tcp_xtls_client_config.json";
|
||||
using (StreamReader readerJson = File.OpenText(outboundsConfigJsons))
|
||||
{
|
||||
JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson));
|
||||
//string outboundsConfigJsons = $"{pwdir}" + @"TemplateConfg\v2ray\client\06_outbounds\vless_tcp_xtls_client_config.json";
|
||||
//using (StreamReader readerJson = File.OpenText(outboundsConfigJsons))
|
||||
//{
|
||||
// JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson));
|
||||
|
||||
//设置客户端的地址/端口/id
|
||||
jObjectJson["outbounds"][0]["settings"]["vnext"][0]["address"] = ReceiveConfigurationParameters[4];
|
||||
jObjectJson["outbounds"][0]["settings"]["vnext"][0]["port"] = int.Parse(ReceiveConfigurationParameters[1]);
|
||||
jObjectJson["outbounds"][0]["settings"]["vnext"][0]["users"][0]["id"] = ReceiveConfigurationParameters[2];
|
||||
// //设置客户端的地址/端口/id
|
||||
// jObjectJson["outbounds"][0]["settings"]["vnext"][0]["address"] = ReceiveConfigurationParameters[4];
|
||||
// jObjectJson["outbounds"][0]["settings"]["vnext"][0]["port"] = int.Parse(ReceiveConfigurationParameters[1]);
|
||||
// jObjectJson["outbounds"][0]["settings"]["vnext"][0]["users"][0]["id"] = ReceiveConfigurationParameters[2];
|
||||
|
||||
clientJson["outbounds"] = jObjectJson["outbounds"];
|
||||
if (!Directory.Exists(@"v2ray_config\vless_tcp_xtls_client_config"))//如果不存在就创建file文件夹
|
||||
{
|
||||
Directory.CreateDirectory(@"v2ray_config\vless_tcp_xtls_client_config");//创建该文件夹
|
||||
}
|
||||
using (StreamWriter sw = new StreamWriter(@"v2ray_config\vless_tcp_xtls_client_config\config.json"))
|
||||
{
|
||||
sw.Write(clientJson.ToString());
|
||||
}
|
||||
}
|
||||
// clientJson["outbounds"] = jObjectJson["outbounds"];
|
||||
// if (!Directory.Exists(@"v2ray_config\vless_tcp_xtls_client_config"))//如果不存在就创建file文件夹
|
||||
// {
|
||||
// Directory.CreateDirectory(@"v2ray_config\vless_tcp_xtls_client_config");//创建该文件夹
|
||||
// }
|
||||
// using (StreamWriter sw = new StreamWriter(@"v2ray_config\vless_tcp_xtls_client_config\config.json"))
|
||||
// {
|
||||
// sw.Write(clientJson.ToString());
|
||||
// }
|
||||
//}
|
||||
|
||||
//VLESS over TCP with TLS模式
|
||||
outboundsConfigJsons = $"{pwdir}" + @"TemplateConfg\v2ray\client\06_outbounds\vless_tcp_tls_caddy_cilent_config.json";
|
||||
string outboundsConfigJsons = $"{pwdir}" + @"TemplateConfg\v2ray\client\06_outbounds\vless_tcp_tls_caddy_cilent_config.json";
|
||||
using (StreamReader readerJson = File.OpenText(outboundsConfigJsons))
|
||||
{
|
||||
JObject jObjectJson = (JObject)JToken.ReadFrom(new JsonTextReader(readerJson));
|
||||
|
@ -13,7 +13,7 @@
|
||||
<RowDefinition Height="0.12*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- V2Ray客户端配置参数 -->
|
||||
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxV2rayClient" Visibility="Collapsed" Grid.Row="0">
|
||||
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxV2rayClient" Visibility="Visible" Grid.Row="0">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"></ColumnDefinition>
|
||||
@ -108,7 +108,7 @@
|
||||
</GroupBox>
|
||||
|
||||
<!-- Xray客户端配置参数 -->
|
||||
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxXrayClient" Visibility="Visible" Grid.Row="0">
|
||||
<GroupBox Header="{DynamicResource GroupBoxHeaderClientParameter}" x:Name="GroupBoxXrayClient" Visibility="Collapsed" Grid.Row="0">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"></ColumnDefinition>
|
||||
|
@ -61,6 +61,7 @@ namespace ProxySU
|
||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||
GroupBoxV2rayClient.Visibility = Visibility.Visible;
|
||||
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||
@ -382,7 +383,7 @@ namespace ProxySU
|
||||
GenerateV2rayVmessWsTlsShareQRcodeAndBase64Url();
|
||||
|
||||
GenerateV2rayTrojanShareQRcodeAndBase64Url();
|
||||
RadioButtonVlessTcpXtls.IsChecked = true;
|
||||
RadioButtonVlessTcpTls.IsChecked = true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -726,6 +727,7 @@ namespace ProxySU
|
||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanGoClient.Visibility = Visibility.Visible;
|
||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||
@ -788,6 +790,7 @@ namespace ProxySU
|
||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanClient.Visibility = Visibility.Visible;
|
||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||
@ -812,6 +815,7 @@ namespace ProxySU
|
||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Visible;
|
||||
@ -831,6 +835,7 @@ namespace ProxySU
|
||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||
@ -861,6 +866,7 @@ namespace ProxySU
|
||||
GroupBoxClientQRandURL.Visibility = Visibility.Visible;
|
||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||
@ -967,6 +973,7 @@ namespace ProxySU
|
||||
GroupBoxClientQRandURL.Visibility = Visibility.Collapsed;
|
||||
GroupBoxClientSSpc.Visibility = Visibility.Collapsed;
|
||||
GroupBoxV2rayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxXrayClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanGoClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxTrojanClient.Visibility = Visibility.Collapsed;
|
||||
GroupBoxNaiveProxyClient.Visibility = Visibility.Collapsed;
|
||||
@ -4256,7 +4263,7 @@ namespace ProxySU
|
||||
|
||||
#endregion
|
||||
|
||||
#region SSR相关
|
||||
#region SSR 相关
|
||||
//生成SSR客户端资料
|
||||
private void GenerateSSRShareQRcodeAndBase64Url()
|
||||
{
|
||||
@ -4629,7 +4636,6 @@ namespace ProxySU
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region MTProto 界面控制
|
||||
private void RadioButtonMtgIpv4_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
Binary file not shown.
@ -6,8 +6,7 @@
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": null,
|
||||
"flow": "xtls-rprx-direct"
|
||||
"id": null
|
||||
}
|
||||
],
|
||||
"decryption": "none",
|
||||
@ -35,7 +34,7 @@
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "xtls",
|
||||
"security": "tls",
|
||||
"xtlsSettings": {
|
||||
"alpn": [
|
||||
"http/1.1"
|
||||
|
Loading…
Reference in New Issue
Block a user