mirror of
https://github.com/proxysu/ProxySU.git
synced 2025-04-04 06:13:37 +03:00
Add fingerprint(uTLS) option
This commit is contained in:
parent
10c8c0f74e
commit
5f4a34e2d6
9 changed files with 50 additions and 0 deletions
|
@ -12,6 +12,7 @@ namespace ProxySuper.Core.Models.Projects
|
|||
public V2raySettings()
|
||||
{
|
||||
WithTLS = true;
|
||||
UTLSOption = string.Empty;
|
||||
|
||||
var guid = Guid.NewGuid().ToString();
|
||||
Port = 443;
|
||||
|
@ -114,6 +115,11 @@ namespace ProxySuper.Core.Models.Projects
|
|||
/// </summary>
|
||||
public string MaskDomain { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// uTLS选项.
|
||||
/// </summary>
|
||||
public string UTLSOption { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string Email
|
||||
{
|
||||
|
|
|
@ -125,6 +125,7 @@ namespace ProxySuper.Core.Services
|
|||
{
|
||||
dest = FullbackPort
|
||||
}));
|
||||
baseBound.streamSettings.xtlsSettings.fingerprint = parameters.UTLSOption;
|
||||
xrayConfig.inbounds.Add(baseBound);
|
||||
SetClients(baseBound, uuidList, withXtls: true);
|
||||
|
||||
|
|
|
@ -160,6 +160,30 @@ namespace ProxySuper.Core.ViewModels
|
|||
RaisePropertyChanged("MaskDomain");
|
||||
}
|
||||
}
|
||||
public string UTLSOption
|
||||
{
|
||||
get => Settings.UTLSOption;
|
||||
set
|
||||
{
|
||||
var namespaceStr = typeof(ComboBoxItem).FullName + ":";
|
||||
var trimValue = value.Replace(namespaceStr, "");
|
||||
trimValue = trimValue.Trim();
|
||||
Settings.UTLSOption = trimValue;
|
||||
RaisePropertyChanged("UTLSOption");
|
||||
}
|
||||
}
|
||||
private List<string> _uTlsOptions = new List<string> { string.Empty, "chrome", "firefox", "safari", "randomized" };
|
||||
public List<string> UTLSOptions => _uTlsOptions;
|
||||
public bool CheckedUTLSOptions
|
||||
{
|
||||
|
||||
get => Settings.Types.Contains(RayType.VLESS_TCP_XTLS);
|
||||
set
|
||||
{
|
||||
CheckBoxChanged(value, RayType.VLESS_TCP_XTLS);
|
||||
RaisePropertyChanged("CheckedUTLSOptions");
|
||||
}
|
||||
}
|
||||
|
||||
public string TrojanPassword
|
||||
{
|
||||
|
|
|
@ -56,6 +56,11 @@
|
|||
<TextBox Text="xtls" IsReadOnly="True" Width="300" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="uTLS" Width="140" />
|
||||
<TextBox Text="{Binding Settings.UTLSOption}" IsReadOnly="True" Width="300" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
||||
<Label Content="分享链接(ShareLink)" Width="140" />
|
||||
<TextBox Text="{Binding Settings.VLESS_TCP_XTLS_ShareLink,Mode=OneTime}" Width="300" IsReadOnly="True" />
|
||||
|
|
|
@ -129,6 +129,16 @@
|
|||
Content="{DynamicResource Random}" />
|
||||
</StackPanel>
|
||||
|
||||
<!--uTLS Options-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal">
|
||||
<Label Content="{DynamicResource XrayUTLS}" Width="120" />
|
||||
<ComboBox Width="200"
|
||||
ItemsSource="{Binding Path=UTLSOptions}"
|
||||
SelectedValue="{Binding UTLSOption}">
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
||||
<!--WebSocket Path-->
|
||||
<StackPanel Margin="30,15,0,0"
|
||||
Orientation="Horizontal"
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
<sys:String x:Key="XrayWithTLS">With TLS</sys:String>
|
||||
<sys:String x:Key="XrayWithTLSDesc">Unchecked means upload your own TLS.</sys:String>
|
||||
<sys:String x:Key="XrayUUID">UUID</sys:String>
|
||||
<sys:String x:Key="XrayUTLS">uTLS</sys:String>
|
||||
<sys:String x:Key="MultiUser">Multi User</sys:String>
|
||||
<sys:String x:Key="MultiUserHelp">Multi Id split with ","</sys:String>
|
||||
<sys:String x:Key="VlessWsPath">VLESS WS Path</sys:String>
|
||||
|
|
|
@ -80,6 +80,7 @@
|
|||
<sys:String x:Key="XrayWithTLS">自動申請證書</sys:String>
|
||||
<sys:String x:Key="XrayWithTLSDesc">如上傳自有證書,則取消對勾。</sys:String>
|
||||
<sys:String x:Key="XrayUUID">UUID</sys:String>
|
||||
<sys:String x:Key="XrayUTLS">uTLS</sys:String>
|
||||
<sys:String x:Key="MultiUser">多用戶</sys:String>
|
||||
<sys:String x:Key="MultiUserHelp">多個UUID用“,”分隔</sys:String>
|
||||
<sys:String x:Key="VlessWsPath">VLESS WS路徑</sys:String>
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
<sys:String x:Key="XrayWithTLS">自动申请证书</sys:String>
|
||||
<sys:String x:Key="XrayWithTLSDesc">如上传自有证书,则取消对勾。</sys:String>
|
||||
<sys:String x:Key="XrayUUID">UUID</sys:String>
|
||||
<sys:String x:Key="XrayUTLS">uTLS</sys:String>
|
||||
<sys:String x:Key="MultiUser">多用户</sys:String>
|
||||
<sys:String x:Key="MultiUserHelp">多个UUID用“,”分隔</sys:String>
|
||||
<sys:String x:Key="VlessWsPath">VLESS WS路径</sys:String>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
"security": "xtls",
|
||||
"xtlsSettings": {
|
||||
"allowInsecure": false,
|
||||
"fingerprint": "",
|
||||
"minVersion": "1.2",
|
||||
"alpn": [
|
||||
"http/1.1"
|
||||
|
|
Loading…
Add table
Reference in a new issue