Compare commits

...

6 commits

Author SHA1 Message Date
nirvanalinlei
e183ad35bf
Merge 935d9e0aa3 into e19b000081 2026-03-31 19:27:00 +08:00
JieXu
e19b000081
fix (#9017)
* Update package-rhel.sh

* Enhance download_singbox function to handle cronet
2026-03-31 19:26:53 +08:00
2dust
7329dbae11 up 7.20.1
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release Linux / deb (push) Blocked by required conditions
release Linux / rpm (push) Blocked by required conditions
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
2026-03-30 20:46:52 +08:00
nirvanalinlei
695a073cd6
Fix sing-box selector generation for dynamic group tags (#9015) 2026-03-30 20:12:36 +08:00
DHR60
01c85adedf
Show clash ui when tun enabled (#9010) 2026-03-30 20:09:10 +08:00
2dust
2caf8ea14f Bug fix
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release Linux / deb (push) Blocked by required conditions
release Linux / rpm (push) Blocked by required conditions
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
https://github.com/2dust/v2rayN/issues/9016
2026-03-30 19:49:37 +08:00
6 changed files with 30 additions and 14 deletions

View file

@ -253,11 +253,14 @@ download_xray() {
} }
download_singbox() { download_singbox() {
local outdir="$1" rid="$2" ver="${SING_VER:-}" url tmp tarname="singbox.tar.gz" bin # Download sing-box
local outdir="$1" rid="$2" ver="${SING_VER:-}" url tmp tarname="singbox.tar.gz" bin cronet
mkdir -p "$outdir" mkdir -p "$outdir"
if [[ -z "$ver" ]]; then if [[ -z "$ver" ]]; then
ver="$(curl -fsSL https://api.github.com/repos/SagerNet/sing-box/releases/latest \ ver="$(curl -fsSL https://api.github.com/repos/SagerNet/sing-box/releases/latest \
| grep -Eo '"tag_name":\s*"v[^"]+"' | sed -E 's/.*"v([^"]+)".*/\1/' | head -n1)" || true | grep -Eo '"tag_name":\s*"v[^"]+"' \
| sed -E 's/.*"v([^"]+)".*/\1/' \
| head -n1)" || true
fi fi
[[ -n "$ver" ]] || { echo "[sing-box] Failed to get version"; return 1; } [[ -n "$ver" ]] || { echo "[sing-box] Failed to get version"; return 1; }
if [[ "$rid" == "linux-arm64" ]]; then if [[ "$rid" == "linux-arm64" ]]; then
@ -272,6 +275,8 @@ download_singbox() {
bin="$(find "$tmp" -type f -name 'sing-box' | head -n1 || true)" bin="$(find "$tmp" -type f -name 'sing-box' | head -n1 || true)"
[[ -n "$bin" ]] || { echo "[!] sing-box unpack failed"; rm -rf "$tmp"; return 1; } [[ -n "$bin" ]] || { echo "[!] sing-box unpack failed"; rm -rf "$tmp"; return 1; }
install -m 755 "$bin" "$outdir/sing-box" install -m 755 "$bin" "$outdir/sing-box"
cronet="$(find "$tmp" -type f -name 'libcronet*.so*' | head -n1 || true)"
[[ -n "$cronet" ]] && install -m 644 "$cronet" "$outdir/libcronet.so"
rm -rf "$tmp" rm -rf "$tmp"
} }

View file

@ -232,11 +232,13 @@ download_xray() {
download_singbox() { download_singbox() {
# Download sing-box # Download sing-box
local outdir="$1" rid="$2" ver="${SING_VER:-}" url tmp tarname="singbox.tar.gz" bin local outdir="$1" rid="$2" ver="${SING_VER:-}" url tmp tarname="singbox.tar.gz" bin cronet
mkdir -p "$outdir" mkdir -p "$outdir"
if [[ -z "$ver" ]]; then if [[ -z "$ver" ]]; then
ver="$(curl -fsSL https://api.github.com/repos/SagerNet/sing-box/releases/latest \ ver="$(curl -fsSL https://api.github.com/repos/SagerNet/sing-box/releases/latest \
| grep -Eo '"tag_name":\s*"v[^"]+"' | sed -E 's/.*"v([^"]+)".*/\1/' | head -n1)" || true | grep -Eo '"tag_name":\s*"v[^"]+"' \
| sed -E 's/.*"v([^"]+)".*/\1/' \
| head -n1)" || true
fi fi
[[ -n "$ver" ]] || { echo "[sing-box] Failed to get version"; return 1; } [[ -n "$ver" ]] || { echo "[sing-box] Failed to get version"; return 1; }
if [[ "$rid" == "linux-arm64" ]]; then if [[ "$rid" == "linux-arm64" ]]; then
@ -251,6 +253,8 @@ download_singbox() {
bin="$(find "$tmp" -type f -name 'sing-box' | head -n1 || true)" bin="$(find "$tmp" -type f -name 'sing-box' | head -n1 || true)"
[[ -n "$bin" ]] || { echo "[!] sing-box unpack failed"; rm -rf "$tmp"; return 1; } [[ -n "$bin" ]] || { echo "[!] sing-box unpack failed"; rm -rf "$tmp"; return 1; }
install -m 755 "$bin" "$outdir/sing-box" install -m 755 "$bin" "$outdir/sing-box"
cronet="$(find "$tmp" -type f -name 'libcronet*.so*' | head -n1 || true)"
[[ -n "$cronet" ]] && install -m 644 "$cronet" "$outdir/libcronet.so"
rm -rf "$tmp" rm -rf "$tmp"
} }

View file

@ -1,7 +1,7 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Version>7.20.0</Version> <Version>7.20.1</Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

View file

@ -1432,7 +1432,7 @@ public static class ConfigHandler
else if (node.ConfigType == EConfigType.Custom else if (node.ConfigType == EConfigType.Custom
&& node.PreSocksPort is > 0 and <= 65535) && node.PreSocksPort is > 0 and <= 65535)
{ {
var preCoreType = AppManager.Instance.RunningCoreType = config.TunModeItem.EnableTun ? ECoreType.sing_box : ECoreType.Xray; var preCoreType = config.TunModeItem.EnableTun ? ECoreType.sing_box : ECoreType.Xray;
itemSocks = new ProfileItem() itemSocks = new ProfileItem()
{ {
CoreType = preCoreType, CoreType = preCoreType,

View file

@ -90,6 +90,9 @@ public class CoreManager
await CoreStart(mainContext); await CoreStart(mainContext);
await CoreStartPreService(preContext); await CoreStartPreService(preContext);
AppManager.Instance.RunningCoreType = preContext?.RunCoreType ?? mainContext.RunCoreType;
if (_processService != null) if (_processService != null)
{ {
await UpdateFunc(true, $"{node.GetSummary()}"); await UpdateFunc(true, $"{node.GetSummary()}");
@ -172,7 +175,7 @@ public class CoreManager
private async Task CoreStart(CoreConfigContext context) private async Task CoreStart(CoreConfigContext context)
{ {
var node = context.Node; var node = context.Node;
var coreType = AppManager.Instance.RunningCoreType = AppManager.Instance.GetCoreType(node, node.ConfigType); var coreType = AppManager.Instance.GetCoreType(node, node.ConfigType);
var coreInfo = CoreInfoManager.Instance.GetCoreInfo(coreType); var coreInfo = CoreInfoManager.Instance.GetCoreInfo(coreType);
var displayLog = node.ConfigType != EConfigType.Custom || node.DisplayLog; var displayLog = node.ConfigType != EConfigType.Custom || node.DisplayLog;

View file

@ -709,18 +709,22 @@ public class ProfilesViewModel : MyReactiveObject
public async Task ServerSpeedtest(ESpeedActionType actionType) public async Task ServerSpeedtest(ESpeedActionType actionType)
{ {
if (actionType == ESpeedActionType.Mixedtest) List<ProfileItem>? lstSelected;
if (actionType is ESpeedActionType.Mixedtest or ESpeedActionType.FastRealping)
{ {
SelectedProfiles = ProfileItems; if (actionType == ESpeedActionType.FastRealping)
{
actionType = ESpeedActionType.Realping;
}
lstSelected = JsonUtils.Deserialize<List<ProfileItem>>(JsonUtils.Serialize(ProfileItems?.OrderBy(t => t.Sort)));
} }
else if (actionType == ESpeedActionType.FastRealping) else
{ {
SelectedProfiles = ProfileItems; lstSelected = await GetProfileItems(false);
actionType = ESpeedActionType.Realping;
} }
var lstSelected = await GetProfileItems(false); if (lstSelected is null || lstSelected.Count <= 0)
if (lstSelected == null)
{ {
return; return;
} }