From eb52887aa78c1240406341354180963a505bd96f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 14 Nov 2026 02:47:13 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B4=20Sync=202026-11-14=2002:47:13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-v2raya/Makefile | 3 +++ .../resources/view/v2raya/overview.js | 24 ++++++++++++++++++- v2raya/Makefile | 2 +- v2raya/files/v2raya-detect | 1 + 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/luci-app-v2raya/Makefile b/luci-app-v2raya/Makefile index 66640668e..36d47d35f 100644 --- a/luci-app-v2raya/Makefile +++ b/luci-app-v2raya/Makefile @@ -11,6 +11,9 @@ LUCI_DEPENDS:=+luci-base +v2raya LUCI_PKGARCH:=all LUCI_MAINTAINER:=Amr Fateem +# Date-based version (YY.DDD), the same scheme as the OpenWrt LuCI packages. +# OpenWrt's luci-app-v2raya is newer than 2.5.13 by version comparison, so +# this version must stay ahead of it. Re-date it when OpenWrt passes it. PKG_LICENSE:=Apache-2.0 CONFLICTS:=luci-app-v2raya-nextgen diff --git a/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/overview.js b/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/overview.js index e4aee6dc1..2dd35559b 100644 --- a/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/overview.js +++ b/luci-app-v2raya/htdocs/luci-static/resources/view/v2raya/overview.js @@ -143,13 +143,25 @@ function startService(button) { }); } +var FEED_LATEST = 'https://raw.githubusercontent.com/AmrFateem/luci-V2raya-NextGen/main/feed/latest'; + +function latestRelease() { + return L.resolveDefault(fetch(FEED_LATEST) + .then(function (res) { return res.ok ? res.text() : null; }) + .then(function (text) { + var line = text ? text.split('\n').filter(function (l) { return l.indexOf('v2raya=') === 0; })[0] : null; + return line ? line.substring('v2raya='.length).trim() : null; + }), null); +} + return view.extend({ load: function () { return Promise.all([ uci.load('v2raya'), commandVersion('/usr/bin/v2raya', [ '--version' ]), commandVersion('/usr/bin/v2raya_core', [ 'version' ]), - detectBackends() + detectBackends(), + latestRelease() ]); }, @@ -165,6 +177,12 @@ return view.extend({ var serviceVersion = data[1] || _('not detected'); var coreVersion = data[2] || _('not detected'); var backends = data[3] || {}; + var latestVersion = data[4] || null; + var installedPackage = backends.v2raya_package || null; + var packageStatus = !installedPackage ? _('not detected') + : (latestVersion && latestVersion !== installedPackage) + ? _('%s, update available: run "apk update && apk upgrade"').format(installedPackage) + : installedPackage; var detectAvailable = Object.keys(backends).length > 0; var enabledServices = (backends.services_enabled || '').split(',').filter(function (name) { return name && name !== 'v2raya'; @@ -246,6 +264,10 @@ return view.extend({ E('label', { class: 'cbi-value-title' }, _('Service')), E('div', { class: 'cbi-value-field' }, status) ]), + E('div', { class: 'cbi-value' }, [ + E('label', { class: 'cbi-value-title' }, _('Package')), + E('div', { class: 'cbi-value-field' }, packageStatus) + ]), E('div', { class: 'cbi-value' }, [ E('label', { class: 'cbi-value-title' }, _('v2rayA version')), E('div', { class: 'cbi-value-field' }, serviceVersion) diff --git a/v2raya/Makefile b/v2raya/Makefile index 7538a92ce..401025d3d 100644 --- a/v2raya/Makefile +++ b/v2raya/Makefile @@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2raya PKG_VERSION:=2.5.15 -PKG_RELEASE:=11 +PKG_RELEASE:=12 PKG_SOURCE:=v2rayA-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)? diff --git a/v2raya/files/v2raya-detect b/v2raya/files/v2raya-detect index 216458b83..0e3c56fb9 100644 --- a/v2raya/files/v2raya-detect +++ b/v2raya/files/v2raya-detect @@ -124,6 +124,7 @@ v2ray_path=$v2ray_bin v2ray_version=$(version_line "$v2ray_bin" version) v2ray_package=$v2ray_pkg old_v2raya_package=$old_v2raya_pkg +v2raya_package=$(pkg_version v2raya) geoip_present=$geoip_present geosite_present=$geosite_present services_present=$present