1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-22 05:06:08 +03:00

add uTLS settings.

This commit is contained in:
autumn 2022-11-21 16:42:47 +08:00
parent 1110f8291e
commit db6a399ca9
3 changed files with 109 additions and 94 deletions

View File

@ -9,6 +9,10 @@ namespace ProxySuper.Core.Models.Projects
{ {
public class XraySettings : V2raySettings public class XraySettings : V2raySettings
{ {
public static List<string> UTLSList = new List<string> { "", "chrome", "firefox", "safari", "randomized" };
public string UTLS { get; set; } = UTLSList[1];
/// <summary> /// <summary>
/// vless xtls shareLink /// vless xtls shareLink
/// </summary> /// </summary>

View File

@ -87,6 +87,19 @@ namespace ProxySuper.Core.ViewModels
} }
} }
public List<string> UTLSList { get => XraySettings.UTLSList; }
public string UTLS
{
get => Settings.UTLS;
set
{
Settings.UTLS = value;
RaisePropertyChanged(nameof(UTLS));
}
}
public int VLESS_KCP_Port public int VLESS_KCP_Port
{ {
get => Settings.VLESS_KCP_Port; get => Settings.VLESS_KCP_Port;

View File

@ -115,16 +115,28 @@
<!--xray prot--> <!--xray prot-->
<StackPanel Margin="0,15,0,0" Orientation="Horizontal"> <StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource XrayPort}" Foreground="Gray" Width="120" /> <Label Content="{DynamicResource XrayPort}" Width="120" />
<TextBox Text="{Binding Path=Port}" Width="120" /> <TextBox Text="{Binding Path=Port}" Width="120" />
<Label Content="{DynamicResource XrayPortDefault}" Foreground="Red" /> <Label Content="{DynamicResource XrayPortDefault}" Foreground="Red" />
</StackPanel> </StackPanel>
<!--xray utls-->
<StackPanel Margin="0,15,0,0"
Orientation="Horizontal">
<Label Content="uTLS" Width="120" VerticalAlignment="Bottom"/>
<ComboBox Width="260"
VerticalAlignment="Bottom"
ItemsSource="{Binding Path=UTLSList}"
SelectedValue="{Binding UTLS,Mode=TwoWay}">
</ComboBox>
</StackPanel>
<!--more params--> <!--more params-->
<Expander ExpandDirection="Down" Margin="0,10,0,0"> <Expander ExpandDirection="Down" Margin="0,10,0,0">
<Expander.Header> <Expander.Header>
<TextBlock Text="更多参数" FontWeight="Bold" /> <TextBlock Text="更多参数" FontWeight="Bold" />
</Expander.Header> </Expander.Header>
<Expander.Content> <Expander.Content>
<StackPanel> <StackPanel>
<StackPanel Margin="0,15,0,0" Orientation="Horizontal"> <StackPanel Margin="0,15,0,0" Orientation="Horizontal">
@ -168,8 +180,8 @@
Visibility="{ Visibility="{
Binding Path=Checked_VLESS_KCP, Binding Path=Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}" Orientation="Horizontal"> }"
Orientation="Horizontal">
<Label Content="{DynamicResource VlessKcpType}" Foreground="LimeGreen" Width="120" /> <Label Content="{DynamicResource VlessKcpType}" Foreground="LimeGreen" Width="120" />
<ComboBox Width="260" <ComboBox Width="260"
ItemsSource="{Binding Path=KcpTypes}" ItemsSource="{Binding Path=KcpTypes}"
@ -209,19 +221,6 @@
<TextBox Text="{Binding Path=VLESS_gRPC_ServiceName}" Width="260" /> <TextBox Text="{Binding Path=VLESS_gRPC_ServiceName}" Width="260" />
</StackPanel> </StackPanel>
<!--Tcp Path
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_TCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="VMESS WS路径" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_TCP_Path}"
VerticalAlignment="Bottom"
Width="260" />
</StackPanel>-->
<!--WebSocket Path--> <!--WebSocket Path-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
@ -280,8 +279,7 @@
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource SSPassword}" Foreground="Fuchsia" Width="120" /> <Label Content="{DynamicResource SSPassword}" Foreground="Fuchsia" Width="120" />
<TextBox Text="{Binding Path=ShadowSocksPassword}" <TextBox Text="{Binding Path=ShadowSocksPassword}" Width="260"/>
Width="260"/>
</StackPanel> </StackPanel>
<!--ss加密方式--> <!--ss加密方式-->