mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-22 05:06:08 +03:00
merge
This commit is contained in:
parent
379edc265f
commit
41e3c85d01
@ -8,6 +8,10 @@ namespace ProxySU_Core.Models.Developers
|
||||
{
|
||||
int Port { get; set; }
|
||||
|
||||
int VLESS_gRPC_Port { get; set; }
|
||||
|
||||
int VLESS_KCP_Port { get; set; }
|
||||
|
||||
int VMESS_KCP_Port { get; set; }
|
||||
|
||||
int ShadowSocksPort { get; set; }
|
||||
|
@ -316,6 +316,16 @@ namespace ProxySU_Core.Models.Developers
|
||||
portList.Add(Parameters.VMESS_KCP_Port);
|
||||
}
|
||||
|
||||
if (Parameters.Types.Contains(XrayType.VLESS_KCP))
|
||||
{
|
||||
portList.Add(Parameters.VLESS_KCP_Port);
|
||||
}
|
||||
|
||||
if (Parameters.Types.Contains(XrayType.VLESS_gRPC))
|
||||
{
|
||||
portList.Add(Parameters.VLESS_gRPC_Port);
|
||||
}
|
||||
|
||||
OpenPort(portList.ToArray());
|
||||
}
|
||||
|
||||
@ -481,7 +491,8 @@ namespace ProxySU_Core.Models.Developers
|
||||
SetPortFree(80);
|
||||
SetPortFree(443);
|
||||
SetPortFree(Parameters.Port);
|
||||
SetPortFree(Parameters.VMESS_KCP_Port);
|
||||
SetPortFree(Parameters.VLESS_gRPC_Port);
|
||||
SetPortFree(Parameters.VLESS_KCP_Port);
|
||||
SetPortFree(Parameters.ShadowSocksPort);
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ namespace ProxySU_Core.Models
|
||||
case XrayType.VLESS_TCP_XTLS:
|
||||
case XrayType.VLESS_WS:
|
||||
case XrayType.VLESS_KCP:
|
||||
case XrayType.VLESS_gRPC:
|
||||
case XrayType.Trojan_TCP:
|
||||
return BuildVlessShareLink(xrayType, settings);
|
||||
case XrayType.VMESS_TCP:
|
||||
@ -99,7 +100,7 @@ namespace ProxySU_Core.Models
|
||||
var _domain = settings.Domain;
|
||||
var _port = settings.Port;
|
||||
var _type = string.Empty;
|
||||
var _encryption = string.Empty;
|
||||
var _encryption = "none";
|
||||
var _security = "tls";
|
||||
var _path = "/";
|
||||
var _host = settings.Domain;
|
||||
@ -112,21 +113,18 @@ namespace ProxySU_Core.Models
|
||||
case XrayType.VLESS_TCP:
|
||||
_protocol = "vless";
|
||||
_type = "tcp";
|
||||
_encryption = "none";
|
||||
_descriptiveText = "vless-tcp-tls";
|
||||
break;
|
||||
case XrayType.VLESS_TCP_XTLS:
|
||||
_protocol = "vless";
|
||||
_type = "tcp";
|
||||
_security = "xtls";
|
||||
_encryption = "none";
|
||||
_descriptiveText = "vless-tcp-xtls";
|
||||
break;
|
||||
case XrayType.VLESS_WS:
|
||||
_protocol = "vless";
|
||||
_type = "ws";
|
||||
_path = settings.VLESS_WS_Path;
|
||||
_encryption = "none";
|
||||
_descriptiveText = "vless-ws-tls";
|
||||
break;
|
||||
case XrayType.VLESS_KCP:
|
||||
|
@ -27,6 +27,8 @@ namespace ProxySU_Core.Models
|
||||
|
||||
VLESS_WS_Path = "/vlessws";
|
||||
VLESS_H2_Path = "/vlessh2";
|
||||
VLESS_KCP_Type = "none";
|
||||
VLESS_KCP_Seed = guid;
|
||||
VLESS_gRPC_ServiceName = "xray_gRPC";
|
||||
|
||||
VMESS_WS_Path = "/vmessws";
|
||||
|
@ -153,6 +153,9 @@
|
||||
<Compile Include="Views\ClientInfo\Trojan_TCP_Control.xaml.cs">
|
||||
<DependentUpon>Trojan_TCP_Control.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\ClientInfo\VLESS_gRPC_Control.xaml.cs">
|
||||
<DependentUpon>VLESS_gRPC_Control.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\ClientInfo\VLESS_KCP_Control.xaml.cs">
|
||||
<DependentUpon>VLESS_KCP_Control.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@ -295,7 +298,9 @@
|
||||
<None Include="Templates\xray\server\05_inbounds\Trojan_WS.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Templates\xray\server\05_inbounds\VLESS_gRPC.json" />
|
||||
<None Include="Templates\xray\server\05_inbounds\VLESS_gRPC.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Templates\xray\server\05_inbounds\VLESS_HTTP2.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
@ -361,6 +366,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\ClientInfo\VLESS_gRPC_Control.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\ClientInfo\VLESS_KCP_Control.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
@ -6,7 +6,8 @@
|
||||
{
|
||||
"id": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"decryption": "none"
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "mkcp",
|
||||
|
@ -16,4 +16,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,13 +89,21 @@ namespace ProxySU_Core.ViewModels
|
||||
public string Domain
|
||||
{
|
||||
get => settings.Domain;
|
||||
set => settings.Domain = value;
|
||||
set
|
||||
{
|
||||
settings.Domain = value;
|
||||
Notify("Domain");
|
||||
}
|
||||
}
|
||||
|
||||
public string MaskDomain
|
||||
{
|
||||
get => settings.MaskDomain;
|
||||
set => settings.MaskDomain = value;
|
||||
set
|
||||
{
|
||||
settings.MaskDomain = value;
|
||||
Notify("MaskDomain");
|
||||
}
|
||||
}
|
||||
|
||||
public string TrojanPassword
|
||||
@ -283,7 +291,7 @@ namespace ProxySU_Core.ViewModels
|
||||
set
|
||||
{
|
||||
CheckBoxChanged(value, XrayType.VLESS_TCP_XTLS);
|
||||
Notify("Checked_VLESS_XTLS");
|
||||
Notify("Checked_VLESS_TCP_XTLS");
|
||||
}
|
||||
}
|
||||
public string VLESS_TCP_XTLS_ShareLink
|
||||
|
@ -18,24 +18,39 @@
|
||||
Style="{StaticResource MaterialDesignNavigatilRailTabControl}"
|
||||
Padding="10">
|
||||
<TabItem Width="200"
|
||||
IsEnabled="{Binding Settings.Checked_VLESS_XTLS}"
|
||||
IsEnabled="{Binding Settings.Checked_VLESS_TCP_XTLS}"
|
||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||
Header="VLESS-TCP-XTLS">
|
||||
<local:VLESS_XTLS_Control />
|
||||
</TabItem>
|
||||
|
||||
<TabItem Width="200"
|
||||
IsEnabled="{Binding Settings.Checked_VLESS_TCP}"
|
||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||
Header="VLESS-TCP-TLS">
|
||||
<local:VLESS_TCP_TLS_Control />
|
||||
</TabItem>
|
||||
|
||||
<TabItem Width="200"
|
||||
IsEnabled="{Binding Settings.Checked_VLESS_WS}"
|
||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||
Header="VLESS-WebSocket-TLS">
|
||||
<local:VLESS_WS_TLS_Control />
|
||||
</TabItem>
|
||||
|
||||
|
||||
<TabItem Width="200"
|
||||
IsEnabled="{Binding Settings.Checked_VLESS_KCP}"
|
||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||
Header="VLESS-mKCP">
|
||||
<local:VLESS_KCP_Control />
|
||||
</TabItem>
|
||||
|
||||
<TabItem Width="200"
|
||||
IsEnabled="{Binding Settings.Checked_VLESS_gRPC}"
|
||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||
Header="VLESS-gRPC">
|
||||
<local:VLESS_gRPC_Control />
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</TabItem>
|
||||
|
||||
@ -71,7 +86,7 @@
|
||||
<TabItem Width="200"
|
||||
IsEnabled="{Binding Settings.Checked_Trojan_TCP}"
|
||||
Style="{StaticResource MaterialDesignNavigationRailTabItem}"
|
||||
Header="VLESS-TCP-Trojan">
|
||||
Header="Trojan-TCP">
|
||||
<local:Trojan_TCP_Control />
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="伪装类型(type)" Width="120" />
|
||||
<TextBox Text="{Binding Settings.VMESS_KCP_Type}" IsReadOnly="True" Width="200" />
|
||||
<TextBox Text="{Binding Settings.VLESS_KCP_Type}" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="路径(path)" Width="120" />
|
||||
<TextBox Text="{Binding Settings.VMESS_KCP_Seed}" IsReadOnly="True" Width="200" />
|
||||
<TextBox Text="{Binding Settings.VLESS_KCP_Seed}" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
@ -53,7 +53,7 @@
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="分享链接" Width="120" />
|
||||
<TextBox Text="{Binding Settings.VMESS_KCP_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
|
||||
<TextBox Text="{Binding Settings.VLESS_KCP_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="路径(path)" Width="120" />
|
||||
<TextBox Text="{Binding Settings.VLESS_TCP_Path}" IsReadOnly="True" Width="200" />
|
||||
<TextBox Text="" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
|
64
ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml
Normal file
64
ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml
Normal file
@ -0,0 +1,64 @@
|
||||
<UserControl x:Class="ProxySU_Core.Views.ClientInfo.VLESS_gRPC_Control"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:ProxySU_Core.Views.ClientInfo"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Content="地址(address)" Width="120" />
|
||||
<TextBox Text="{Binding Settings.Domain}" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="端口(port)" Width="120" />
|
||||
<TextBox Text="{Binding Settings.VLESS_gRPC_Port}" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="用户ID(id)" Width="120" />
|
||||
<TextBox Text="{Binding Settings.UUID}" IsReadOnly="True" Width="300" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="流控(flow)" Width="120" />
|
||||
<TextBox Text="" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="加密(encryption)" Width="120" />
|
||||
<TextBox Text="none" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="传输协议(network)" Width="120" />
|
||||
<TextBox Text="grpc" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="伪装类型(type)" Width="120" />
|
||||
<TextBox Text="none" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="伪装域名(host)" Width="120" />
|
||||
<TextBox Text="" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="路径(path)" Width="120" />
|
||||
<TextBox Text="{Binding Settings.VLESS_gRPC_ServiceName}" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="传输安全(tls)" Width="120" />
|
||||
<TextBox Text="tls" IsReadOnly="True" Width="200" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="分享链接" Width="120" />
|
||||
<TextBox Text="{Binding Settings.VLESS_gRPC_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
28
ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml.cs
Normal file
28
ProxySU_Core/Views/ClientInfo/VLESS_gRPC_Control.xaml.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace ProxySU_Core.Views.ClientInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// VLESS_gRPC_Control.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class VLESS_gRPC_Control : UserControl
|
||||
{
|
||||
public VLESS_gRPC_Control()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -26,6 +26,7 @@
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="50" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--XTLS-->
|
||||
@ -120,8 +121,8 @@
|
||||
VerticalAlignment="Bottom"
|
||||
Width="260" />
|
||||
</StackPanel>
|
||||
|
||||
<!--kcp port-->
|
||||
|
||||
<!--seed-->
|
||||
<StackPanel Margin="40,0,0,10"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
@ -130,13 +131,44 @@
|
||||
Binding Path=Settings.Checked_VLESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="KCP端口" Width="70" VerticalAlignment="Bottom" />
|
||||
<TextBox Text="{Binding Path=Settings.VLESS_KCP_Port}" Width="100" VerticalAlignment="Bottom" />
|
||||
<Label Content="KCP Seed" Width="70" VerticalAlignment="Bottom" />
|
||||
<TextBox Text="{Binding Path=Settings.VLESS_KCP_Seed}" Width="260" VerticalAlignment="Bottom" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="40,0,0,10"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal">
|
||||
<!--kcp type-->
|
||||
<StackPanel Margin="0,0,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Settings.Checked_VLESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="KCP伪装" Width="70" VerticalAlignment="Bottom"/>
|
||||
<ComboBox Width="100"
|
||||
VerticalAlignment="Bottom"
|
||||
ItemsSource="{Binding Path=Settings.KcpTypes}"
|
||||
SelectedValue="{Binding Settings.VLESS_KCP_Type,Mode=TwoWay}">
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
||||
<!--kcp port-->
|
||||
<StackPanel Margin="10,0,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Settings.Checked_VLESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="KCP端口" Width="70" VerticalAlignment="Bottom" />
|
||||
<TextBox Text="{Binding Path=Settings.VLESS_KCP_Port}" Width="100" VerticalAlignment="Bottom" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!--gRPC Port-->
|
||||
<StackPanel Margin="40,0,0,10"
|
||||
Grid.Row="5"
|
||||
Grid.Row="6"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
@ -153,7 +185,7 @@
|
||||
|
||||
<!--xray prot-->
|
||||
<StackPanel Margin="40,0,0,10"
|
||||
Grid.Row="6"
|
||||
Grid.Row="7"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal">
|
||||
<Label Content="Xray端口" Width="70" VerticalAlignment="Bottom" />
|
||||
|
@ -106,7 +106,9 @@
|
||||
Width="260" />
|
||||
</StackPanel>
|
||||
|
||||
<!--kcp port-->
|
||||
|
||||
|
||||
<!--seed-->
|
||||
<StackPanel Margin="40,0,0,10"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
@ -115,14 +117,46 @@
|
||||
Binding Path=Settings.Checked_VMESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="KCP端口" Width="70" VerticalAlignment="Bottom" />
|
||||
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Port}" Width="100" VerticalAlignment="Bottom" />
|
||||
<Label Content="KCP Seed" Width="70" VerticalAlignment="Bottom" />
|
||||
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Seed}" Width="260" VerticalAlignment="Bottom" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="40,0,0,10"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal">
|
||||
<!--kcp type-->
|
||||
<StackPanel Margin="0,0,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Settings.Checked_VMESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="KCP伪装" Width="70" VerticalAlignment="Bottom"/>
|
||||
<ComboBox Width="100"
|
||||
VerticalAlignment="Bottom"
|
||||
ItemsSource="{Binding Path=Settings.KcpTypes}"
|
||||
SelectedValue="{Binding Settings.VMESS_KCP_Type,Mode=TwoWay}">
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
||||
<!--kcp port-->
|
||||
<StackPanel Margin="10,0,0,0"
|
||||
Orientation="Horizontal"
|
||||
Visibility="{
|
||||
Binding Path=Settings.Checked_VMESS_KCP,
|
||||
Converter={StaticResource VisibleConverter}
|
||||
}">
|
||||
<Label Content="KCP端口" Width="70" VerticalAlignment="Bottom" />
|
||||
<TextBox Text="{Binding Path=Settings.VMESS_KCP_Port}" Width="100" VerticalAlignment="Bottom" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
|
||||
<!--xray prot-->
|
||||
<StackPanel Margin="40,0,0,10"
|
||||
Grid.Row="5"
|
||||
Grid.Row="6"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal">
|
||||
<Label Content="Xray端口" Width="70" VerticalAlignment="Bottom" />
|
||||
|
Loading…
Reference in New Issue
Block a user