Compare commits

..

No commits in common. "00aed2729d3317a74790c0bf9507ba8bf97e6401" and "e776103729fd8096a2f011cec52be3e93ee0f6c6" have entirely different histories.

7 changed files with 16 additions and 38 deletions

View file

@ -28,7 +28,7 @@ Package: v2rayN
Version: $Version Version: $Version
Architecture: $Arch2 Architecture: $Arch2
Maintainer: https://github.com/2dust/v2rayN Maintainer: https://github.com/2dust/v2rayN
Depends: libc6 (>= 2.34), fontconfig (>= 2.14), desktop-file-utils (>= 0.26), xdg-utils (>= 1.1.3), coreutils (>= 8.32), libx11-6, openssl Depends: libc6 (>= 2.34), fontconfig (>= 2.14), libx11-6 (>= 1.7), openssl (>= 3.0), desktop-file-utils (>= 0.26), xdg-utils (>= 1.1.3)
Description: A GUI client for Windows and Linux, support Xray core and sing-box-core and others Description: A GUI client for Windows and Linux, support Xray core and sing-box-core and others
EOF EOF

View file

@ -614,13 +614,14 @@ ExclusiveArch: aarch64 x86_64
Source0: __PKGROOT__.tar.gz Source0: __PKGROOT__.tar.gz
# Runtime dependencies (Avalonia / X11 / Fonts / GL) # Runtime dependencies (Avalonia / X11 / Fonts / GL)
Requires: libX11, libXrandr, libXcursor, libXi, libXext, libxcb, libXrender, libXfixes, libXinerama, libxkbcommon Requires: libXrandr, libXcursor, libXi, libXext, libxcb, libXrender, libXfixes, libXinerama, libxkbcommon
Requires: fontconfig, freetype, cairo, pango, openssl, mesa-libEGL, mesa-libGL Requires: freetype, cairo, pango, mesa-libEGL, mesa-libGL
Requires: glibc >= 2.34 Requires: glibc >= 2.34
Requires: fontconfig >= 2.14 Requires: fontconfig >= 2.14
Requires: libX11 >= 1.7
Requires: openssl >= 1:3.0
Requires: desktop-file-utils >= 0.26 Requires: desktop-file-utils >= 0.26
Requires: xdg-utils >= 1.1.3 Requires: xdg-utils >= 1.1.3
Requires: coreutils >= 8.32
%description %description
v2rayN Linux for Red Hat Enterprise Linux v2rayN Linux for Red Hat Enterprise Linux

View file

@ -215,7 +215,6 @@ public class Dns4Ray
public class DnsServer4Ray public class DnsServer4Ray
{ {
public string? address { get; set; } public string? address { get; set; }
public int? port { get; set; }
public List<string>? domains { get; set; } public List<string>? domains { get; set; }
public bool? skipFallback { get; set; } public bool? skipFallback { get; set; }
public List<string>? expectedIPs { get; set; } public List<string>? expectedIPs { get; set; }

View file

@ -127,7 +127,7 @@
<value>Format de configuration incorrect</value> <value>Format de configuration incorrect</value>
</data> </data>
<data name="CustomServerTips" xml:space="preserve"> <data name="CustomServerTips" xml:space="preserve">
<value>Attention : la configuration personnalisée dépend entièrement de vos paramètres et peut ne pas activer toutes les fonctions. Pour utiliser le proxy système, changez le port découte manuellement.</value> <value>Attention : une configuration personnalisée repose entièrement sur vos propres paramètres et ne permet pas dutiliser toutes les fonctions. Pour utiliser le proxy système, modifiez manuellement le port découte.</value>
</data> </data>
<data name="Downloading" xml:space="preserve"> <data name="Downloading" xml:space="preserve">
<value>Téléchargement commencé...</value> <value>Téléchargement commencé...</value>
@ -1309,7 +1309,7 @@
<value>Nutilisez pas dadresse dabonnement HTTP non sécurisée</value> <value>Nutilisez pas dadresse dabonnement HTTP non sécurisée</value>
</data> </data>
<data name="TbSettingsCurrentFontFamilyLinuxTip" xml:space="preserve"> <data name="TbSettingsCurrentFontFamilyLinuxTip" xml:space="preserve">
<value>Installer la police sur le système, choisir ou saisir son nom, effet après redémarrage</value> <value>Installez la police sur le système, choisissez ou saisissez son nom, effet après redémarrage</value>
</data> </data>
<data name="menuExitTips" xml:space="preserve"> <data name="menuExitTips" xml:space="preserve">
<value>Voulez-vous vraiment quitter ?</value> <value>Voulez-vous vraiment quitter ?</value>
@ -1321,7 +1321,7 @@
<value>Mot de passe sudo du système</value> <value>Mot de passe sudo du système</value>
</data> </data>
<data name="TbSettingsLinuxSudoPasswordTip" xml:space="preserve"> <data name="TbSettingsLinuxSudoPasswordTip" xml:space="preserve">
<value>Le mot de passe sera vérifié en ligne de commande. En cas déchec ou de dysfonctionnement, redémarrez lapplication. Il nest pas stocké et doit être saisi à chaque redémarrage.</value> <value>Le mot de passe sera vérifié en ligne de commande. En cas déchec entraînant un dysfonctionnement, redémarrez lapplication. Le mot de passe nest pas stocké et doit être saisi à chaque redémarrage.</value>
</data> </data>
<data name="TransportHeaderTypeTip5" xml:space="preserve"> <data name="TransportHeaderTypeTip5" xml:space="preserve">
<value>*Mode XHTTP</value> <value>*Mode XHTTP</value>

View file

@ -294,7 +294,7 @@ public partial class CoreConfigSingboxService
var tls = new Tls4Sbox() var tls = new Tls4Sbox()
{ {
enabled = true, enabled = true,
record_fragment = _config.CoreBasicItem.EnableFragment ? true : null, record_fragment = _config.CoreBasicItem.EnableFragment,
server_name = server_name, server_name = server_name,
insecure = Utils.ToBool(node.AllowInsecure.IsNullOrEmpty() ? _config.CoreBasicItem.DefAllowInsecure.ToString().ToLower() : node.AllowInsecure), insecure = Utils.ToBool(node.AllowInsecure.IsNullOrEmpty() ? _config.CoreBasicItem.DefAllowInsecure.ToString().ToLower() : node.AllowInsecure),
alpn = node.GetAlpn(), alpn = node.GetAlpn(),

View file

@ -86,8 +86,8 @@ public partial class CoreConfigV2rayService
} }
} }
var customOutboundsNode = new JsonArray(); // Handle outbounds - append instead of override
var customOutboundsNode = fullConfigTemplateNode["outbounds"] is JsonArray outbounds ? outbounds : new JsonArray();
foreach (var outbound in v2rayConfig.outbounds) foreach (var outbound in v2rayConfig.outbounds)
{ {
if (outbound.protocol.ToLower() is "blackhole" or "dns" or "freedom") if (outbound.protocol.ToLower() is "blackhole" or "dns" or "freedom")
@ -97,27 +97,14 @@ public partial class CoreConfigV2rayService
continue; continue;
} }
} }
else if (!fullConfigTemplate.ProxyDetour.IsNullOrEmpty()) else if ((outbound.streamSettings?.sockopt?.dialerProxy.IsNullOrEmpty() == true) && (!fullConfigTemplate.ProxyDetour.IsNullOrEmpty()) && !(Utils.IsPrivateNetwork(outbound.settings?.servers?.FirstOrDefault()?.address ?? string.Empty) || Utils.IsPrivateNetwork(outbound.settings?.vnext?.FirstOrDefault()?.address ?? string.Empty)))
{
var outboundAddress = outbound.settings?.servers?.FirstOrDefault()?.address ?? outbound.settings?.vnext?.FirstOrDefault()?.address ?? string.Empty;
if (!Utils.IsPrivateNetwork(outboundAddress))
{ {
outbound.streamSettings ??= new StreamSettings4Ray(); outbound.streamSettings ??= new StreamSettings4Ray();
outbound.streamSettings.sockopt ??= new Sockopt4Ray(); outbound.streamSettings.sockopt ??= new Sockopt4Ray();
outbound.streamSettings.sockopt.dialerProxy = fullConfigTemplate.ProxyDetour; outbound.streamSettings.sockopt.dialerProxy = fullConfigTemplate.ProxyDetour;
} }
}
customOutboundsNode.Add(JsonUtils.DeepCopy(outbound)); customOutboundsNode.Add(JsonUtils.DeepCopy(outbound));
} }
if (fullConfigTemplateNode["outbounds"] is JsonArray templateOutbounds)
{
foreach (var outbound in templateOutbounds)
{
customOutboundsNode.Add(outbound?.DeepClone());
}
}
fullConfigTemplateNode["outbounds"] = customOutboundsNode; fullConfigTemplateNode["outbounds"] = customOutboundsNode;
return await Task.FromResult(JsonUtils.Serialize(fullConfigTemplateNode)); return await Task.FromResult(JsonUtils.Serialize(fullConfigTemplateNode));

View file

@ -79,18 +79,9 @@ public partial class CoreConfigV2rayService
static object CreateDnsServer(string dnsAddress, List<string> domains, List<string>? expectedIPs = null) static object CreateDnsServer(string dnsAddress, List<string> domains, List<string>? expectedIPs = null)
{ {
var (domain, scheme, port, path) = Utils.ParseUrl(dnsAddress);
var domainFinal = dnsAddress;
int? portFinal = null;
if (scheme.IsNullOrEmpty() || scheme.Contains("udp", StringComparison.OrdinalIgnoreCase) || scheme.Contains("tcp", StringComparison.OrdinalIgnoreCase))
{
domainFinal = domain;
portFinal = port > 0 ? port : null;
}
var dnsServer = new DnsServer4Ray var dnsServer = new DnsServer4Ray
{ {
address = domainFinal, address = dnsAddress,
port = portFinal,
skipFallback = true, skipFallback = true,
domains = domains.Count > 0 ? domains : null, domains = domains.Count > 0 ? domains : null,
expectedIPs = expectedIPs?.Count > 0 ? expectedIPs : null expectedIPs = expectedIPs?.Count > 0 ? expectedIPs : null