mirror of
https://github.com/2dust/v2rayN.git
synced 2025-12-23 15:22:43 +00:00
Compare commits
25 commits
e776103729
...
00aed2729d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00aed2729d | ||
|
|
ee66afd7ee | ||
|
|
76c62e63c0 | ||
|
|
ded6d5abee | ||
|
|
8501c42f4f | ||
|
|
f8b90aa7ce | ||
|
|
c2591d40c0 | ||
|
|
74e76904e1 | ||
|
|
86036abef0 | ||
|
|
14712e5694 | ||
|
|
b9b5d24f3e | ||
|
|
8ffb314f1b | ||
|
|
fd8732ecc3 | ||
|
|
02c0cb63dc | ||
|
|
1c3743c962 | ||
|
|
bf92e6c95e | ||
|
|
0f0500d3f3 | ||
|
|
d9776c3264 | ||
|
|
7043cf7b35 | ||
|
|
3a197fc34e | ||
|
|
16479b8180 | ||
|
|
bbedc4dbb1 | ||
|
|
ecf42cb85d | ||
|
|
bd16ccff26 | ||
|
|
3e7bb81d13 |
7 changed files with 38 additions and 16 deletions
|
|
@ -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), libx11-6 (>= 1.7), openssl (>= 3.0), desktop-file-utils (>= 0.26), xdg-utils (>= 1.1.3)
|
Depends: libc6 (>= 2.34), fontconfig (>= 2.14), desktop-file-utils (>= 0.26), xdg-utils (>= 1.1.3), coreutils (>= 8.32), libx11-6, openssl
|
||||||
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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -614,14 +614,13 @@ 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: libXrandr, libXcursor, libXi, libXext, libxcb, libXrender, libXfixes, libXinerama, libxkbcommon
|
Requires: libX11, libXrandr, libXcursor, libXi, libXext, libxcb, libXrender, libXfixes, libXinerama, libxkbcommon
|
||||||
Requires: freetype, cairo, pango, mesa-libEGL, mesa-libGL
|
Requires: fontconfig, freetype, cairo, pango, openssl, 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
|
||||||
|
|
|
||||||
|
|
@ -215,6 +215,7 @@ 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; }
|
||||||
|
|
|
||||||
|
|
@ -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 : une configuration personnalisée repose entièrement sur vos propres paramètres et ne permet pas d’utiliser toutes les fonctions. Pour utiliser le proxy système, modifiez manuellement le port d’écoute.</value>
|
<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>
|
||||||
</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>N’utilisez pas d’adresse d’abonnement HTTP non sécurisée</value>
|
<value>N’utilisez pas d’adresse d’abonnement HTTP non sécurisée</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsCurrentFontFamilyLinuxTip" xml:space="preserve">
|
<data name="TbSettingsCurrentFontFamilyLinuxTip" xml:space="preserve">
|
||||||
<value>Installez la police sur le système, choisissez ou saisissez son nom, effet après redémarrage</value>
|
<value>Installer la police sur le système, choisir ou saisir 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 entraînant un dysfonctionnement, redémarrez l’application. Le mot de passe n’est 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 ou de dysfonctionnement, redémarrez l’application. Il n’est 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>
|
||||||
|
|
|
||||||
|
|
@ -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,
|
record_fragment = _config.CoreBasicItem.EnableFragment ? true : null,
|
||||||
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(),
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,8 @@ public partial class CoreConfigV2rayService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle outbounds - append instead of override
|
var customOutboundsNode = new JsonArray();
|
||||||
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,14 +97,27 @@ public partial class CoreConfigV2rayService
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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)))
|
else if (!fullConfigTemplate.ProxyDetour.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
outbound.streamSettings ??= new StreamSettings4Ray();
|
var outboundAddress = outbound.settings?.servers?.FirstOrDefault()?.address ?? outbound.settings?.vnext?.FirstOrDefault()?.address ?? string.Empty;
|
||||||
outbound.streamSettings.sockopt ??= new Sockopt4Ray();
|
if (!Utils.IsPrivateNetwork(outboundAddress))
|
||||||
outbound.streamSettings.sockopt.dialerProxy = fullConfigTemplate.ProxyDetour;
|
{
|
||||||
|
outbound.streamSettings ??= new StreamSettings4Ray();
|
||||||
|
outbound.streamSettings.sockopt ??= new Sockopt4Ray();
|
||||||
|
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));
|
||||||
|
|
|
||||||
|
|
@ -79,9 +79,18 @@ 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 = dnsAddress,
|
address = domainFinal,
|
||||||
|
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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue