diff --git a/ProxySuper.Core/Models/Projects/V2raySettings.cs b/ProxySuper.Core/Models/Projects/V2raySettings.cs index fa0bf1c..146286d 100644 --- a/ProxySuper.Core/Models/Projects/V2raySettings.cs +++ b/ProxySuper.Core/Models/Projects/V2raySettings.cs @@ -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 /// public string MaskDomain { get; set; } + /// + /// uTLS选项. + /// + public string UTLSOption { get; set; } + [JsonIgnore] public string Email { diff --git a/ProxySuper.Core/Services/XrayConfigBuilder.cs b/ProxySuper.Core/Services/XrayConfigBuilder.cs index 752fdef..e22da72 100644 --- a/ProxySuper.Core/Services/XrayConfigBuilder.cs +++ b/ProxySuper.Core/Services/XrayConfigBuilder.cs @@ -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); diff --git a/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs b/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs index d9c281d..fc17fff 100644 --- a/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs +++ b/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs @@ -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 _uTlsOptions = new List { string.Empty, "chrome", "firefox", "safari", "randomized" }; + public List 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 { diff --git a/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml b/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml index 902dcf1..e4acb1b 100644 --- a/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml +++ b/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml @@ -56,6 +56,11 @@ + + + + + + + With TLS Unchecked means upload your own TLS. UUID + uTLS Multi User Multi Id split with "," VLESS WS Path diff --git a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml index 48c8c5f..6fbf4e2 100644 --- a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml +++ b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml @@ -80,6 +80,7 @@ 自動申請證書 如上傳自有證書,則取消對勾。 UUID + uTLS 多用戶 多個UUID用“,”分隔 VLESS WS路徑 diff --git a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml index c33beca..1f22830 100644 --- a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml +++ b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml @@ -81,6 +81,7 @@ 自动申请证书 如上传自有证书,则取消对勾。 UUID + uTLS 多用户 多个UUID用“,”分隔 VLESS WS路径 diff --git a/ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_TCP_XTLS.json b/ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_TCP_XTLS.json index eab8363..12bbe7a 100644 --- a/ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_TCP_XTLS.json +++ b/ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_TCP_XTLS.json @@ -16,6 +16,7 @@ "security": "xtls", "xtlsSettings": { "allowInsecure": false, + "fingerprint": "", "minVersion": "1.2", "alpn": [ "http/1.1"