mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-03 21:42:11 +00:00
Bug fix
This commit is contained in:
parent
843b881da6
commit
77b736541e
5 changed files with 26 additions and 25 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
@ -735,7 +735,7 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
if (item.useSystemHosts)
|
if (item.useSystemHosts)
|
||||||
{
|
{
|
||||||
var hostfile = @"C:\Windows\System32\drivers\etc\hosts" ;
|
var hostfile = @"C:\Windows\System32\drivers\etc\hosts";
|
||||||
|
|
||||||
if (File.Exists(hostfile))
|
if (File.Exists(hostfile))
|
||||||
{
|
{
|
||||||
|
|
|
@ -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; }
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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}"
|
||||||
|
|
Loading…
Reference in a new issue