This commit is contained in:
2dust 2023-12-01 17:03:49 +08:00
parent 843b881da6
commit 77b736541e
5 changed files with 26 additions and 25 deletions

View file

@ -892,7 +892,7 @@ namespace v2rayN.Handler
{ {
profileItem.allowInsecure = config.coreBasicItem.defAllowInsecure.ToString().ToLower(); profileItem.allowInsecure = config.coreBasicItem.defAllowInsecure.ToString().ToLower();
} }
if (Utils.IsNullOrEmpty(profileItem.fingerprint)) if (Utils.IsNullOrEmpty(profileItem.fingerprint) && profileItem.streamSecurity == Global.StreamSecurityReality)
{ {
profileItem.fingerprint = config.coreBasicItem.defFingerprint; profileItem.fingerprint = config.coreBasicItem.defFingerprint;
} }

View file

@ -1,7 +1,7 @@
using System.IO; using Newtonsoft.Json.Linq;
using System.IO;
using System.Net; using System.Net;
using System.Net.NetworkInformation; using System.Net.NetworkInformation;
using Newtonsoft.Json.Linq;
using v2rayN.Base; using v2rayN.Base;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Resx; using v2rayN.Resx;

View file

@ -11,7 +11,7 @@ namespace v2rayN.Mode
public string remarks { get; set; } public string remarks { get; set; }
public bool enabled { get; set; } = true; public bool enabled { get; set; } = true;
public ECoreType coreType { get; set; } public ECoreType coreType { get; set; }
public bool useSystemHosts { get; set; } = true; public bool useSystemHosts { get; set; }
public string? normalDNS { get; set; } public string? normalDNS { get; set; }
public string? tunDNS { get; set; } public string? tunDNS { get; set; }
public string? domainStrategy4Freedom { get; set; } public string? domainStrategy4Freedom { get; set; }

View file

@ -123,7 +123,8 @@ namespace v2rayN.Views
sepa2.Visibility = Visibility.Collapsed; sepa2.Visibility = Visibility.Collapsed;
gridTransport.Visibility = Visibility.Collapsed; gridTransport.Visibility = Visibility.Collapsed;
cmbCoreType.IsEnabled = false; cmbCoreType.IsEnabled = false;
cmbFingerprint.IsEnabled = false;
cmbFingerprint.Text = string.Empty;
break; break;
} }

View file

@ -64,6 +64,20 @@
Style="{StaticResource DefComboBox}" /> Style="{StaticResource DefComboBox}" />
</StackPanel> </StackPanel>
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal">
<TextBlock
Margin="{StaticResource SettingItemMargin}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSettingsUseSystemHosts}" />
<ToggleButton
x:Name="togUseSystemHosts"
Grid.Row="5"
Grid.Column="1"
Margin="{StaticResource SettingItemMargin}"
HorizontalAlignment="Left" />
</StackPanel>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal"> <StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
<TextBlock <TextBlock
Margin="{StaticResource SettingItemMargin}" Margin="{StaticResource SettingItemMargin}"
@ -86,20 +100,6 @@
Style="{StaticResource DefButton}" /> Style="{StaticResource DefButton}" />
</StackPanel> </StackPanel>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
<TextBlock
Margin="{StaticResource SettingItemMargin}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSettingsUseSystemHosts}" />
<ToggleButton
x:Name="togUseSystemHosts"
Grid.Row="5"
Grid.Column="1"
Margin="{StaticResource SettingItemMargin}"
HorizontalAlignment="Left" />
</StackPanel>
<TextBox <TextBox
x:Name="txtnormalDNS" x:Name="txtnormalDNS"
Margin="{StaticResource SettingItemMargin}" Margin="{StaticResource SettingItemMargin}"