mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-19 02:44:59 +03:00
Compare commits
4 Commits
88d59488fd
...
7.23.4
| Author | SHA1 | Date | |
|---|---|---|---|
| 1de83f96ed | |||
| 994bc1ca6a | |||
| 3ca49dd9db | |||
| a0bd8f9934 |
@@ -1,7 +1,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>7.23.3</Version>
|
<Version>7.23.4</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public static class ConfigHandler
|
|||||||
config.ClashUIItem.ConnectionsColumnItem ??= [];
|
config.ClashUIItem.ConnectionsColumnItem ??= [];
|
||||||
config.SystemProxyItem ??= new();
|
config.SystemProxyItem ??= new();
|
||||||
config.WebDavItem ??= new();
|
config.WebDavItem ??= new();
|
||||||
config.CheckUpdateItem ??= new();
|
config.CheckUpdateItem ??= new();
|
||||||
config.Fragment4RayItem ??= new()
|
config.Fragment4RayItem ??= new()
|
||||||
{
|
{
|
||||||
Packets = "tlshello",
|
Packets = "tlshello",
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ public class CertPemManager
|
|||||||
collection.ImportFromPem(pemText);
|
collection.ImportFromPem(pemText);
|
||||||
return collection;
|
return collection;
|
||||||
});
|
});
|
||||||
|
|
||||||
private static readonly Lazy<X509Certificate2Collection> _mozillaRootCerts = new(() =>
|
private static readonly Lazy<X509Certificate2Collection> _mozillaRootCerts = new(() =>
|
||||||
{
|
{
|
||||||
var pemText = EmbedUtils.GetEmbedText(Global.MozillaRootCertFileName);
|
var pemText = EmbedUtils.GetEmbedText(Global.MozillaRootCertFileName);
|
||||||
@@ -295,6 +296,7 @@ public class CertPemManager
|
|||||||
collection.ImportFromPem(pemText);
|
collection.ImportFromPem(pemText);
|
||||||
return collection;
|
return collection;
|
||||||
});
|
});
|
||||||
|
|
||||||
private X509Certificate2Collection BuildTrustedCertificateCollection()
|
private X509Certificate2Collection BuildTrustedCertificateCollection()
|
||||||
{
|
{
|
||||||
if (_config.GuiItem.RootCertProvider == Global.ChromeRootProvider)
|
if (_config.GuiItem.RootCertProvider == Global.ChromeRootProvider)
|
||||||
|
|||||||
@@ -8,8 +8,10 @@ public class CoreManager
|
|||||||
private static readonly Lazy<CoreManager> _instance = new(() => new());
|
private static readonly Lazy<CoreManager> _instance = new(() => new());
|
||||||
public static CoreManager Instance => _instance.Value;
|
public static CoreManager Instance => _instance.Value;
|
||||||
private Config _config;
|
private Config _config;
|
||||||
|
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
private WindowsJobService? _processJob;
|
private WindowsJobService? _processJob;
|
||||||
|
|
||||||
private ProcessService? _processService;
|
private ProcessService? _processService;
|
||||||
private ProcessService? _processPreService;
|
private ProcessService? _processPreService;
|
||||||
private bool _linuxSudo = false;
|
private bool _linuxSudo = false;
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ public class UIItem
|
|||||||
public bool MacOSShowInDock { get; set; }
|
public bool MacOSShowInDock { get; set; }
|
||||||
public List<ColumnItem> MainColumnItem { get; set; }
|
public List<ColumnItem> MainColumnItem { get; set; }
|
||||||
public List<WindowSizeItem> WindowSizeItem { get; set; }
|
public List<WindowSizeItem> WindowSizeItem { get; set; }
|
||||||
|
public bool HideColumnIpInfo { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|||||||
@@ -286,7 +286,6 @@ public class BalancersItem4Ray
|
|||||||
public List<string>? selector { get; set; }
|
public List<string>? selector { get; set; }
|
||||||
public BalancersStrategy4Ray? strategy { get; set; }
|
public BalancersStrategy4Ray? strategy { get; set; }
|
||||||
public string? tag { get; set; }
|
public string? tag { get; set; }
|
||||||
public string? fallbackTag { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BalancersStrategy4Ray
|
public class BalancersStrategy4Ray
|
||||||
|
|||||||
Generated
+20
-20
@@ -149,7 +149,7 @@ namespace ServiceLib.Resx {
|
|||||||
return ResourceManager.GetString("Downloading", resourceCulture);
|
return ResourceManager.GetString("Downloading", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Failed to convert configuration file 的本地化字符串。
|
/// 查找类似 Failed to convert configuration file 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -321,6 +321,15 @@ namespace ServiceLib.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Please enter valid HTTP request headers JSON. 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string InvalidHttpOutboundHeaders {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("InvalidHttpOutboundHeaders", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Invalid Realm URL. 的本地化字符串。
|
/// 查找类似 Invalid Realm URL. 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -330,15 +339,6 @@ namespace ServiceLib.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Please enter valid HTTP request headers JSON. 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string InvalidHttpOutboundHeaders {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("InvalidHttpOutboundHeaders", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Invalid address (URL) 的本地化字符串。
|
/// 查找类似 Invalid address (URL) 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -3231,15 +3231,6 @@ namespace ServiceLib.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 HTTP headers 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string TbHttpOutboundHeaders {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("TbHttpOutboundHeaders", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Port hopping interval 的本地化字符串。
|
/// 查找类似 Port hopping interval 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -3258,6 +3249,15 @@ namespace ServiceLib.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 HTTP headers 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string TbHttpOutboundHeaders {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TbHttpOutboundHeaders", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Realm URL 的本地化字符串。
|
/// 查找类似 Realm URL 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -5012,7 +5012,7 @@ namespace ServiceLib.Resx {
|
|||||||
return ResourceManager.GetString("TipHttpOutboundHeaders", resourceCulture);
|
return ResourceManager.GetString("TipHttpOutboundHeaders", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 *Default value raw 的本地化字符串。
|
/// 查找类似 *Default value raw 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ public partial class CoreConfigV2rayService
|
|||||||
: null,
|
: null,
|
||||||
},
|
},
|
||||||
tag = balancerTag,
|
tag = balancerTag,
|
||||||
fallbackTag = _coreConfig.outbounds?.FirstOrDefault(o => o.tag.StartsWith(selector))?.tag,
|
|
||||||
};
|
};
|
||||||
_coreConfig.routing.balancers ??= [];
|
_coreConfig.routing.balancers ??= [];
|
||||||
_coreConfig.routing.balancers.Add(balancer);
|
_coreConfig.routing.balancers.Add(balancer);
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public partial class CoreConfigV2rayService
|
|||||||
outbound.settings.address = _node.Address;
|
outbound.settings.address = _node.Address;
|
||||||
outbound.settings.port = _node.Port;
|
outbound.settings.port = _node.Port;
|
||||||
|
|
||||||
if(protocolExtra.HttpHeaders.IsNotEmpty())
|
if (protocolExtra.HttpHeaders.IsNotEmpty())
|
||||||
{
|
{
|
||||||
outbound.settings.headers = JsonUtils.ParseJson(protocolExtra.HttpHeaders);
|
outbound.settings.headers = JsonUtils.ParseJson(protocolExtra.HttpHeaders);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Reflection.Metadata;
|
|
||||||
|
|
||||||
namespace ServiceLib.Services;
|
namespace ServiceLib.Services;
|
||||||
|
|
||||||
|
|||||||
@@ -425,7 +425,7 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
|||||||
ProfileExManager.Instance.SetTestDelay(it.IndexId, responseTime);
|
ProfileExManager.Instance.SetTestDelay(it.IndexId, responseTime);
|
||||||
await UpdateFunc(it.IndexId, responseTime.ToString());
|
await UpdateFunc(it.IndexId, responseTime.ToString());
|
||||||
|
|
||||||
if (responseTime > 0)
|
if (!_config.UiItem.HideColumnIpInfo && responseTime > 0)
|
||||||
{
|
{
|
||||||
var ipInfo = await ConnectionHandler.GetIPInfo(webProxy);
|
var ipInfo = await ConnectionHandler.GetIPInfo(webProxy);
|
||||||
var ipStr = ipInfo?.ToString() ?? Global.None;
|
var ipStr = ipInfo?.ToString() ?? Global.None;
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
|
|||||||
}
|
}
|
||||||
if (item.Name.Equals("IpInfo", StringComparison.CurrentCultureIgnoreCase))
|
if (item.Name.Equals("IpInfo", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
item2.IsVisible = _config.SpeedTestItem.IPAPIUrl.IsNotEmpty();
|
item2.IsVisible = _config.SpeedTestItem.IPAPIUrl.IsNotEmpty() && !_config.UiItem.HideColumnIpInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ public partial class ProfilesView
|
|||||||
}
|
}
|
||||||
if (item.Name.Equals("IpInfo", StringComparison.CurrentCultureIgnoreCase))
|
if (item.Name.Equals("IpInfo", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
item2.Visibility = _config.SpeedTestItem.IPAPIUrl.IsNotEmpty() ? Visibility.Visible : Visibility.Hidden;
|
item2.Visibility = _config.SpeedTestItem.IPAPIUrl.IsNotEmpty() && !_config.UiItem.HideColumnIpInfo ? Visibility.Visible : Visibility.Hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user