mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-14 20:48:17 +08:00
🌴 Sync 2026-11-14 02:47:13
This commit is contained in:
1 parent
24333bdf44
commit
eb52887aa7
4 files changed
+28
-2
No files matched your search
@@ -11,6 +11,9 @@ LUCI_DEPENDS:=+luci-base +v2raya
|
||||
LUCI_PKGARCH:=all
|
||||
LUCI_MAINTAINER:=Amr Fateem <amr.fateem@yahoo.com>
|
||||
|
||||
# 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
|
||||
|
||||
@@ -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)
|
||||
|
||||
+1
-1
@@ -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)?
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user