1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-24 22:26:07 +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

@ -108,23 +108,35 @@
Width="260" /> Width="260" />
<Button Margin="5,0,0,0" <Button Margin="5,0,0,0"
Padding="12,3" Padding="12,3"
Command="{Binding Path=RandomUuid}" Command="{Binding Path=RandomUuid}"
Content="{DynamicResource Random}" /> Content="{DynamicResource Random}" />
</StackPanel> </StackPanel>
<!--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">
@ -143,33 +155,33 @@
<!--WebSocket Path--> <!--WebSocket Path-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VLESS_WS, Binding Path=Checked_VLESS_WS,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource VlessWsPath}" Foreground="LimeGreen" Width="120" /> <Label Content="{DynamicResource VlessWsPath}" Foreground="LimeGreen" Width="120" />
<TextBox Text="{Binding Path=VLESS_WS_Path}" Width="260" /> <TextBox Text="{Binding Path=VLESS_WS_Path}" Width="260" />
</StackPanel> </StackPanel>
<!--seed--> <!--seed-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VLESS_KCP, Binding Path=Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource VlessKcpSeed}" Foreground="LimeGreen" Width="120" /> <Label Content="{DynamicResource VlessKcpSeed}" Foreground="LimeGreen" Width="120" />
<TextBox Text="{Binding Path=VLESS_KCP_Seed}" Width="260" /> <TextBox Text="{Binding Path=VLESS_KCP_Seed}" Width="260" />
</StackPanel> </StackPanel>
<!--kcp type--> <!--kcp type-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
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}"
@ -179,118 +191,104 @@
<!--kcp port--> <!--kcp port-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
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 VlessKcpPort}" Width="120" Foreground="LimeGreen" /> <Label Content="{DynamicResource VlessKcpPort}" Width="120" Foreground="LimeGreen" />
<TextBox Text="{Binding Path=VLESS_KCP_Port}" Width="260" /> <TextBox Text="{Binding Path=VLESS_KCP_Port}" Width="260" />
</StackPanel> </StackPanel>
<!--gRPC Port--> <!--gRPC Port-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VLESS_gRPC, Binding Path=Checked_VLESS_gRPC,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource VlessRPCPort}" Width="120" Foreground="LimeGreen" /> <Label Content="{DynamicResource VlessRPCPort}" Width="120" Foreground="LimeGreen" />
<TextBox Text="{Binding Path=VLESS_gRPC_Port}" Width="260" /> <TextBox Text="{Binding Path=VLESS_gRPC_Port}" Width="260" />
</StackPanel> </StackPanel>
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VLESS_gRPC, Binding Path=Checked_VLESS_gRPC,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource VlessRPCName}" Width="120" Foreground="LimeGreen" /> <Label Content="{DynamicResource VlessRPCName}" Width="120" Foreground="LimeGreen" />
<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"
Visibility="{ Visibility="{
Binding Path=Checked_VMESS_WS, Binding Path=Checked_VMESS_WS,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource VmessWsPath}" Foreground="Blue" Width="120" /> <Label Content="{DynamicResource VmessWsPath}" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_WS_Path}" <TextBox Text="{Binding Path=VMESS_WS_Path}"
VerticalAlignment="Bottom" VerticalAlignment="Bottom"
Width="260" /> Width="260" />
</StackPanel> </StackPanel>
<!--seed--> <!--seed-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VMESS_KCP, Binding Path=Checked_VMESS_KCP,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource VmessKcpSeed}" Foreground="Blue" Width="120" /> <Label Content="{DynamicResource VmessKcpSeed}" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_KCP_Seed}" Width="260" /> <TextBox Text="{Binding Path=VMESS_KCP_Seed}" Width="260" />
</StackPanel> </StackPanel>
<!--kcp type--> <!--kcp type-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VMESS_KCP, Binding Path=Checked_VMESS_KCP,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource VmessKcpType}" Foreground="Blue" Width="120" VerticalAlignment="Bottom"/> <Label Content="{DynamicResource VmessKcpType}" Foreground="Blue" Width="120" VerticalAlignment="Bottom"/>
<ComboBox Width="260" <ComboBox Width="260"
VerticalAlignment="Bottom" VerticalAlignment="Bottom"
ItemsSource="{Binding Path=KcpTypes}" ItemsSource="{Binding Path=KcpTypes}"
SelectedValue="{Binding VMESS_KCP_Type,Mode=TwoWay}"> SelectedValue="{Binding VMESS_KCP_Type,Mode=TwoWay}">
</ComboBox> </ComboBox>
</StackPanel> </StackPanel>
<!--kcp port--> <!--kcp port-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VMESS_KCP, Binding Path=Checked_VMESS_KCP,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource VmessKcpPort}" Foreground="Blue" Width="120" /> <Label Content="{DynamicResource VmessKcpPort}" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_KCP_Port}" Width="260" /> <TextBox Text="{Binding Path=VMESS_KCP_Port}" Width="260" />
</StackPanel> </StackPanel>
<!--ss密码--> <!--ss密码-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=CheckedShadowSocks, Binding Path=CheckedShadowSocks,
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加密方式-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=CheckedShadowSocks, Binding Path=CheckedShadowSocks,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource SSMethods}" Foreground="Fuchsia" Width="120" /> <Label Content="{DynamicResource SSMethods}" Foreground="Fuchsia" Width="120" />
<ComboBox Width="260" <ComboBox Width="260"
ItemsSource="{Binding ShadowSocksMethods}" ItemsSource="{Binding ShadowSocksMethods}"
@ -300,22 +298,22 @@
<!--ss端口--> <!--ss端口-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=CheckedShadowSocks, Binding Path=CheckedShadowSocks,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource SSPort}" Foreground="Fuchsia" Width="120" /> <Label Content="{DynamicResource SSPort}" Foreground="Fuchsia" Width="120" />
<TextBox Text="{Binding Path=ShadowSocksPort}" Width="260"/> <TextBox Text="{Binding Path=ShadowSocksPort}" Width="260"/>
</StackPanel> </StackPanel>
<!--Trojan密码--> <!--Trojan密码-->
<StackPanel Margin="0,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_Trojan_TCP, Binding Path=Checked_Trojan_TCP,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource TrojanPassword}" Foreground="CadetBlue" Width="120" /> <Label Content="{DynamicResource TrojanPassword}" Foreground="CadetBlue" Width="120" />
<TextBox Text="{Binding Path=TrojanPassword}" Width="260" /> <TextBox Text="{Binding Path=TrojanPassword}" Width="260" />
</StackPanel> </StackPanel>