mirror of
https://github.com/2dust/v2rayN.git
synced 2025-12-24 23:59:27 +00:00
Compare commits
No commits in common. "b4c20e7b812ef5c5ff34f29def8ab4c51b655649" and "bbedc4dbb11472e56f9fe766fbedcee4fc95f872" have entirely different histories.
b4c20e7b81
...
bbedc4dbb1
3 changed files with 3 additions and 12 deletions
|
|
@ -1221,7 +1221,6 @@ public static class ConfigHandler
|
||||||
CoreType = coreType,
|
CoreType = coreType,
|
||||||
ConfigType = EConfigType.PolicyGroup,
|
ConfigType = EConfigType.PolicyGroup,
|
||||||
Remarks = remark,
|
Remarks = remark,
|
||||||
IsSub = false
|
|
||||||
};
|
};
|
||||||
if (!subId.IsNullOrEmpty())
|
if (!subId.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -97,12 +97,9 @@ public partial class CoreConfigV2rayService
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((!fullConfigTemplate.ProxyDetour.IsNullOrEmpty())
|
else if (!fullConfigTemplate.ProxyDetour.IsNullOrEmpty())
|
||||||
&& ((outbound.streamSettings?.sockopt?.dialerProxy.IsNullOrEmpty() ?? true) == true))
|
|
||||||
{
|
{
|
||||||
var outboundAddress = outbound.settings?.servers?.FirstOrDefault()?.address
|
var outboundAddress = outbound.settings?.servers?.FirstOrDefault()?.address ?? outbound.settings?.vnext?.FirstOrDefault()?.address ?? string.Empty;
|
||||||
?? outbound.settings?.vnext?.FirstOrDefault()?.address
|
|
||||||
?? string.Empty;
|
|
||||||
if (!Utils.IsPrivateNetwork(outboundAddress))
|
if (!Utils.IsPrivateNetwork(outboundAddress))
|
||||||
{
|
{
|
||||||
outbound.streamSettings ??= new StreamSettings4Ray();
|
outbound.streamSettings ??= new StreamSettings4Ray();
|
||||||
|
|
|
||||||
|
|
@ -82,16 +82,11 @@ public partial class CoreConfigV2rayService
|
||||||
var (domain, scheme, port, path) = Utils.ParseUrl(dnsAddress);
|
var (domain, scheme, port, path) = Utils.ParseUrl(dnsAddress);
|
||||||
var domainFinal = dnsAddress;
|
var domainFinal = dnsAddress;
|
||||||
int? portFinal = null;
|
int? portFinal = null;
|
||||||
if (scheme.IsNullOrEmpty() || scheme.StartsWith("udp", StringComparison.OrdinalIgnoreCase))
|
if (scheme.IsNullOrEmpty() || scheme.Contains("udp", StringComparison.OrdinalIgnoreCase) || scheme.Contains("tcp", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
domainFinal = domain;
|
domainFinal = domain;
|
||||||
portFinal = port > 0 ? port : null;
|
portFinal = port > 0 ? port : null;
|
||||||
}
|
}
|
||||||
else if (scheme.StartsWith("tcp", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
domainFinal = scheme + "://" + domain;
|
|
||||||
portFinal = port > 0 ? port : null;
|
|
||||||
}
|
|
||||||
var dnsServer = new DnsServer4Ray
|
var dnsServer = new DnsServer4Ray
|
||||||
{
|
{
|
||||||
address = domainFinal,
|
address = domainFinal,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue