mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-23 03:16:53 +00:00
Adds properties
This commit is contained in:
parent
f45290eb3a
commit
7b082cf870
2 changed files with 19 additions and 3 deletions
|
@ -203,8 +203,15 @@ public class Response4Ray
|
||||||
|
|
||||||
public class Dns4Ray
|
public class Dns4Ray
|
||||||
{
|
{
|
||||||
public Dictionary<string, List<string>>? hosts { get; set; }
|
public Dictionary<string, object>? hosts { get; set; }
|
||||||
public List<object> servers { get; set; }
|
public List<object> servers { get; set; }
|
||||||
|
public string? clientIp { get; set; }
|
||||||
|
public string? queryStrategy { get; set; }
|
||||||
|
public bool? disableCache { get; set; }
|
||||||
|
public bool? disableFallback { get; set; }
|
||||||
|
public bool? disableFallbackIfMatch { get; set; }
|
||||||
|
public bool? useSystemHosts { get; set; }
|
||||||
|
public string? tag { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DnsServer4Ray
|
public class DnsServer4Ray
|
||||||
|
@ -214,6 +221,12 @@ public class DnsServer4Ray
|
||||||
public bool? skipFallback { get; set; }
|
public bool? skipFallback { get; set; }
|
||||||
public List<string>? expectedIPs { get; set; }
|
public List<string>? expectedIPs { get; set; }
|
||||||
public List<string>? unexpectedIPs { get; set; }
|
public List<string>? unexpectedIPs { get; set; }
|
||||||
|
public string? clientIp { get; set; }
|
||||||
|
public string? queryStrategy { get; set; }
|
||||||
|
public int? timeoutMs { get; set; }
|
||||||
|
public bool? disableCache { get; set; }
|
||||||
|
public bool? finalQuery { get; set; }
|
||||||
|
public string? tag { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Routing4Ray
|
public class Routing4Ray
|
||||||
|
|
|
@ -1340,10 +1340,13 @@ public class CoreConfigV2rayService
|
||||||
return await Task.FromResult(0);
|
return await Task.FromResult(0);
|
||||||
}
|
}
|
||||||
v2rayConfig.dns ??= new Dns4Ray();
|
v2rayConfig.dns ??= new Dns4Ray();
|
||||||
v2rayConfig.dns.hosts ??= new Dictionary<string, List<string>>();
|
v2rayConfig.dns.hosts ??= new Dictionary<string, object>();
|
||||||
if (simpleDNSItem.AddCommonHosts == true)
|
if (simpleDNSItem.AddCommonHosts == true)
|
||||||
{
|
{
|
||||||
v2rayConfig.dns.hosts = Global.PredefinedHosts;
|
v2rayConfig.dns.hosts = Global.PredefinedHosts.ToDictionary(
|
||||||
|
kvp => kvp.Key,
|
||||||
|
kvp => (object)kvp.Value
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (simpleDNSItem.UseSystemHosts == true)
|
if (simpleDNSItem.UseSystemHosts == true)
|
||||||
|
|
Loading…
Reference in a new issue