Skip to content

Commit

Permalink
update flow control
Browse files Browse the repository at this point in the history
  • Loading branch information
MisCusi2023 committed May 8, 2023
1 parent be74f42 commit 332f542
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
8 changes: 5 additions & 3 deletions ProxySuper.Core/Models/Projects/XraySettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ namespace ProxySuper.Core.Models.Projects
{
public class XraySettings : V2raySettings
{
public static List<string> FlowList = new List<string> { "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443", "xtls-rprx-splice", "xtls-rprx-splice-udp443" };
public static List<string> UTLSList = new List<string> { "", "chrome", "firefox", "safari", "randomized" };
public static List<string> UTLSList = new List<string> { "", "chrome", "firefox", "safari", "ios", "android", "edge", "360", "qq", "random", "randomized" };

//流控参数在服务端只有两种 "none", "xtls-rprx-vision",客户端可以选择三种:"none", "xtls-rprx-vision", "xtls-rprx-vision-udp443",但是选择了XTLS模式就是默认flow不为空或者"none",所以这里不再填加"none"这一项。
public static List<string> FlowList = new List<string> { "xtls-rprx-vision", "xtls-rprx-vision-udp443" }; //{ "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443", "xtls-rprx-splice", "xtls-rprx-splice-udp443" };

public string UTLS { get; set; } = UTLSList[1];

public string Flow { get; set; } = FlowList[2];
public string Flow { get; set; } = FlowList[0];

/// <summary>
/// vless xtls shareLink
Expand Down
2 changes: 1 addition & 1 deletion ProxySuper.Core/Services/ShareLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private static string BuildVlessShareLink(RayType xrayType, V2raySettings settin
case RayType.VLESS_TCP_XTLS:
_protocol = "vless";
_type = "tcp";
_security = "xtls";
_security = "tls";
_descriptiveText = "vless-tcp-xtls";
break;
case RayType.VLESS_WS:
Expand Down
1 change: 1 addition & 0 deletions ProxySuper.Core/Services/XrayConfigBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ private static void SetClients(dynamic bound, List<string> uuidList, bool withXt
}
else
{
flow = "xtls-rprx-vision,none";//兼容普通tls与xtls
obj = new { id = id, flow = flow };
}
Expand Down
2 changes: 1 addition & 1 deletion ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<Label Content="传输安全(tls)" Width="140" />
<TextBox Text="xtls" IsReadOnly="True" Width="300" />
<TextBox Text="tls" IsReadOnly="True" Width="300" />
</StackPanel>

<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
Expand Down
2 changes: 1 addition & 1 deletion ProxySuper.WPF/Controls/XraySettingsControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
Binding Path=Checked_VLESS_TCP_XTLS,
Converter={StaticResource VisibleConverter}
}">
<Label Content="{Binding Path=Flow}" Width="120" VerticalAlignment="Bottom"/>
<Label Content="{DynamicResource Flow}" Width="120" VerticalAlignment="Bottom"/>
<ComboBox Width="260"
VerticalAlignment="Bottom"
ItemsSource="{Binding Path=FlowList}"
Expand Down
2 changes: 1 addition & 1 deletion ProxySuper.WPF/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
Icon="/Resources/ProxySU.ico"
Title="ProxySU v4.1.10" Height="600" Width="1000">
Title="ProxySU v4.1.10" Height="600" Width="1000">
<Grid>

</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@
"clients": [
{
"id": "",
"flow": "xtls-rprx-direct"
"flow": "xtls-rprx-vision,none"
}
],
"decryption": "none",
"fallbacks": []
},
"streamSettings": {
"network": "tcp",
"security": "xtls",
"xtlsSettings": {
"allowInsecure": false,
"security": "tls",
"tlsSettings": {
"rejectUnknownSni": true,
"minVersion": "1.2",
"alpn": [
"http/1.1"
],
"certificates": [
{
"ocspStapling": 3600,
"certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt",
"keyFile": "/usr/local/etc/xray/ssl/xray_ssl.key"
}
Expand Down

0 comments on commit 332f542

Please sign in to comment.