mirror of
https://github.com/kenzok8/small-package
synced 2025-01-07 07:06:58 +08:00
update 2024-12-29 16:23:13
This commit is contained in:
parent
57167010b0
commit
8ebf78759c
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_MAINTAINER:=Thaolga <https://github.com/Thaolga/luci-app-nekobox>
|
||||
PKG_NAME:=luci-app-nekobox
|
||||
PKG_VERSION:=1.6.1
|
||||
PKG_VERSION:=1.6.2
|
||||
PKG_RELEASE:=cn
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Latest Version: v1.6.1">
|
||||
<title>Latest Version: v1.6.1</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Latest Version: v1.6.2">
|
||||
<title>Latest Version: v1.6.2</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
@ -15,7 +15,7 @@
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
|
||||
<text aria-hidden="true" x="495" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="700" style="letter-spacing: -5;">Latest Version</text>
|
||||
<text x="495" y="140" transform="scale(.1)" fill="#fff" textLength="700" style="letter-spacing: -5;">Latest Version</text>
|
||||
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.6.1</text>
|
||||
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.6.1</text>
|
||||
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.6.2</text>
|
||||
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.6.2</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -1,5 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v1.6.1">
|
||||
<title>Current Version: v1.6.1</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v1.6.2">
|
||||
<title>Current Version: v1.6.2</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
@ -15,7 +15,7 @@
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
|
||||
<text aria-hidden="true" x="495" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="700" style="letter-spacing: -5;">Current Version</text>
|
||||
<text x="495" y="140" transform="scale(.1)" fill="#fff" textLength="700" style="letter-spacing: -5;">Current Version</text>
|
||||
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.6.1</text>
|
||||
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.6.1</text>
|
||||
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.6.2</text>
|
||||
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.6.2</text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -40,6 +40,9 @@ function getSingboxVersion() {
|
||||
}
|
||||
return ['version' => $version, 'type' => 'Singbox 预览版'];
|
||||
} else {
|
||||
if (strpos($version, 'v') !== false) {
|
||||
return ['version' => $version, 'type' => 'Singbox 编译版'];
|
||||
}
|
||||
return ['version' => $version, 'type' => 'Singbox 正式版'];
|
||||
}
|
||||
}
|
||||
@ -141,6 +144,7 @@ $singBoxVersion = $singBoxVersionInfo['version'];
|
||||
$singBoxType = $singBoxVersionInfo['type'];
|
||||
$puernyaVersion = ($singBoxType === 'Puernya 预览版') ? $singBoxVersion : '未安装';
|
||||
$singboxPreviewVersion = ($singBoxType === 'Singbox 预览版') ? $singBoxVersion : '未安装';
|
||||
$singboxCompileVersion = ($singBoxType === 'Singbox 编译版') ? $singBoxVersion : '未安装';
|
||||
$mihomoVersionInfo = getMihomoVersion();
|
||||
$mihomoVersion = $mihomoVersionInfo['version'];
|
||||
$mihomoType = $mihomoVersionInfo['type'];
|
||||
@ -948,22 +952,47 @@ function checkVersion(outputId, updateFiles, currentVersions) {
|
||||
}
|
||||
|
||||
document.getElementById('checkSingboxButton').addEventListener('click', function () {
|
||||
const singBoxVersion = "<?php echo htmlspecialchars($singBoxVersion); ?>";
|
||||
const singBoxVersion = "<?php echo htmlspecialchars(trim($singBoxVersion)); ?>";
|
||||
const singBoxType = "<?php echo htmlspecialchars($singBoxType); ?>";
|
||||
const puernyaVersion = "<?php echo htmlspecialchars($puernyaVersion); ?>";
|
||||
const singboxPreviewVersion = "<?php echo htmlspecialchars($singboxPreviewVersion); ?>";
|
||||
const singboxCompileVersion = "<?php echo htmlspecialchars($singboxCompileVersion); ?>";
|
||||
|
||||
let finalPreviewVersion = '未安装';
|
||||
let finalCompileVersion = '未安装';
|
||||
let finalOfficialVersion = '未安装';
|
||||
let finalPuernyaVersion = '未安装';
|
||||
|
||||
if (puernyaVersion === '1.10.0-alpha.29-067c81a7') {
|
||||
finalPuernyaVersion = puernyaVersion;
|
||||
}
|
||||
|
||||
if (singBoxVersion && /^v/.test(singBoxVersion) && /alpha|beta/.test(singBoxVersion)) {
|
||||
finalCompileVersion = singBoxVersion;
|
||||
}
|
||||
|
||||
if (singBoxVersion && /alpha|beta/.test(singBoxVersion) && puernyaVersion !== '1.10.0-alpha.29-067c81a7' && !/^v/.test(singBoxVersion)) {
|
||||
finalPreviewVersion = singBoxVersion;
|
||||
}
|
||||
|
||||
if (singBoxVersion && !/[a-zA-Z]/.test(singBoxVersion)) {
|
||||
finalOfficialVersion = singBoxVersion;
|
||||
}
|
||||
|
||||
const currentVersions = {
|
||||
'Singbox [ 正式版 ]': singBoxType === 'Singbox 正式版' ? singBoxVersion : '未安装',
|
||||
'Singbox [ 预览版 ]': singboxPreviewVersion,
|
||||
'Singbox [ 编译版 ]': singboxPreviewVersion,
|
||||
'Puernya [ 预览版 ]': puernyaVersion
|
||||
'Singbox [ 正式版 ]': finalOfficialVersion,
|
||||
'Singbox [ 预览版 ]': finalPreviewVersion,
|
||||
'Singbox [ 编译版 ]': finalCompileVersion,
|
||||
'Puernya [ 预览版 ]': finalPuernyaVersion
|
||||
};
|
||||
|
||||
const updateFiles = [
|
||||
{ name: 'Singbox [ 正式版 ]', url: 'update_singbox_stable.php' },
|
||||
{ name: 'Singbox [ 预览版 ]', url: 'update_singbox_preview.php' },
|
||||
{ name: 'Singbox [ 编译版 ]', url: 'update_singbox_core.php' },
|
||||
{ name: 'Puernya [ 预览版 ]', url: 'puernya.php' }
|
||||
];
|
||||
|
||||
checkVersion('NewSingbox', updateFiles, currentVersions);
|
||||
});
|
||||
|
||||
|
@ -1 +1 @@
|
||||
V1.6.1-cn
|
||||
V1.6.2-cn
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -30,8 +30,8 @@
|
||||
name="theme-color"
|
||||
content="#FFFFFF"
|
||||
/>
|
||||
<script type="module" crossorigin src="./assets/index-DTQ-SwsF.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-Wi3TY4zB.css">
|
||||
<script type="module" crossorigin src="./assets/index-BBqZAzxq.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-Doht7gsQ.css">
|
||||
<link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="./registerSW.js"></script></head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -1 +1 @@
|
||||
if(!self.define){let e,i={};const s=(s,n)=>(s=new URL(s+".js",n).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(n,r)=>{const f=e||("document"in self?document.currentScript.src:"")||location.href;if(i[f])return;let c={};const o=e=>s(e,f),t={module:{uri:f},exports:c,require:o};i[f]=Promise.all(n.map((e=>t[e]||o(e)))).then((e=>(r(...e),c)))}}define(["./workbox-3e8df8c8"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-DTQ-SwsF.js",revision:null},{url:"assets/index-Wi3TY4zB.css",revision:null},{url:"index.html",revision:"8f2b14077448252f401b1c9451be4cca"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"7f1c4521acc10694fefef8f72dd2ea5f"},{url:"pwa-192x192.png",revision:"021df52501f4357c03eebd808f40dc6a"},{url:"pwa-512x512.png",revision:"d2f759aaabcb2c44ff52b27fde3de6e0"},{url:"pwa-maskable-192x192.png",revision:"7cd11dc5f0490b349d23eef5591d10e5"},{url:"pwa-maskable-512x512.png",revision:"8c97dc367a85a5a1eba523b24f79d03b"},{url:"manifest.webmanifest",revision:"c452912633990899ffe790f985ad0db9"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));
|
||||
if(!self.define){let e,i={};const s=(s,n)=>(s=new URL(s+".js",n).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(n,r)=>{const f=e||("document"in self?document.currentScript.src:"")||location.href;if(i[f])return;let o={};const t=e=>s(e,f),c={module:{uri:f},exports:o,require:t};i[f]=Promise.all(n.map((e=>c[e]||t(e)))).then((e=>(r(...e),o)))}}define(["./workbox-3e8df8c8"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-BBqZAzxq.js",revision:null},{url:"assets/index-Doht7gsQ.css",revision:null},{url:"index.html",revision:"58857bcc1ef0a5a5642e8310f1fb7515"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"7f1c4521acc10694fefef8f72dd2ea5f"},{url:"pwa-192x192.png",revision:"021df52501f4357c03eebd808f40dc6a"},{url:"pwa-512x512.png",revision:"d2f759aaabcb2c44ff52b27fde3de6e0"},{url:"pwa-maskable-192x192.png",revision:"7cd11dc5f0490b349d23eef5591d10e5"},{url:"pwa-maskable-512x512.png",revision:"8c97dc367a85a5a1eba523b24f79d03b"},{url:"manifest.webmanifest",revision:"c452912633990899ffe790f985ad0db9"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));
|
||||
|
@ -1 +1 @@
|
||||
v1.35.0
|
||||
v1.36.0
|
@ -1,12 +1,24 @@
|
||||
<%+cbi/valueheader%>
|
||||
<%
|
||||
local api = require "luci.passwall.api"
|
||||
local appname = 'passwall'
|
||||
local uci = api.libuci
|
||||
local ss_type = uci:get(appname, "@global_subscribe[0]", "ss_type") or "shadowsocks-libev"
|
||||
local trojan_type = uci:get(appname, "@global_subscribe[0]", "trojan_type") or "trojan-plus"
|
||||
local vmess_type = uci:get(appname, "@global_subscribe[0]", "vmess_type") or "xray"
|
||||
local vless_type = uci:get(appname, "@global_subscribe[0]", "vless_type") or "xray"
|
||||
local hysteria2_type = uci:get(appname, "@global_subscribe[0]", "hysteria2_type") or "hysteria2"
|
||||
-%>
|
||||
<script src="<%=resource%>/qrcode.min.js"></script>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
let has_singbox = "<%=api.finded_com("singbox")%>"
|
||||
let has_xray = "<%=api.finded_com("xray")%>"
|
||||
let has_hysteria2 = "<%=api.finded_com("hysteria")%>"
|
||||
let ss_type = "<%=ss_type%>"
|
||||
let trojan_type = "<%=trojan_type%>"
|
||||
let vmess_type = "<%=vmess_type%>"
|
||||
let vless_type = "<%=vless_type%>"
|
||||
let hysteria2_type = "<%=hysteria2_type%>"
|
||||
|
||||
function padright(str, cnt, pad) {
|
||||
return str + Array(cnt + 1).join(pad);
|
||||
@ -719,7 +731,7 @@ local api = require "luci.passwall.api"
|
||||
}
|
||||
if (sipIndex !== -1) {
|
||||
// SIP002
|
||||
var userInfo = b64decsafe(url0.substr(0, sipIndex));
|
||||
var userInfo = b64decsafe(decodeURIComponent(url0.substr(0, sipIndex)));
|
||||
var temp = url0.substr(sipIndex + 1).replace('/?', '?').split('?');
|
||||
var serverInfo = temp[0].split(":");
|
||||
var server = serverInfo[0];
|
||||
@ -746,18 +758,20 @@ local api = require "luci.passwall.api"
|
||||
method = userInfo.substr(0, userInfoSplitIndex);
|
||||
password = userInfo.substr(userInfoSplitIndex + 1);
|
||||
}
|
||||
if (has_singbox) {
|
||||
if (ss_type == "sing-box" && has_singbox) {
|
||||
dom_prefix = "singbox_"
|
||||
opt.set('type', "sing-box");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
} else if (has_xray) {
|
||||
} else if (ss_type == "xray" && has_xray) {
|
||||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
method = method.toLowerCase() === "chacha20-ietf-poly1305" ? "chacha20-poly1305" : method;
|
||||
} else {
|
||||
if (["2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305"].includes(method)) {
|
||||
dom_prefix = "ssrust_"
|
||||
opt.set('type', "SS-Rust");
|
||||
method = method.toLowerCase() === "chacha20-poly1305" ? "chacha20-ietf-poly1305" : method;
|
||||
} else {
|
||||
dom_prefix = "ss_"
|
||||
opt.set('type', "SS");
|
||||
@ -874,11 +888,11 @@ local api = require "luci.passwall.api"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (has_singbox) {
|
||||
if (ss_type == "sing-box" && has_singbox) {
|
||||
dom_prefix = "singbox_"
|
||||
opt.set('type', "sing-box");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
} else if (has_xray) {
|
||||
} else if (ss_type == "xray" && has_xray) {
|
||||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
opt.set(dom_prefix + 'protocol', "shadowsocks");
|
||||
@ -903,11 +917,11 @@ local api = require "luci.passwall.api"
|
||||
}
|
||||
}
|
||||
if (ssu[0] === "trojan" || ssu[0] === "trojan-plus") {
|
||||
if (has_singbox) {
|
||||
if (trojan_type == "sing-box" && has_singbox) {
|
||||
dom_prefix = "singbox_"
|
||||
opt.set('type', "sing-box");
|
||||
opt.set(dom_prefix + 'protocol', "trojan");
|
||||
} else if (has_xray) {
|
||||
} else if (trojan_type == "xray" && has_xray) {
|
||||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
opt.set(dom_prefix + 'protocol', "trojan");
|
||||
@ -1021,11 +1035,10 @@ local api = require "luci.passwall.api"
|
||||
if (ssu[0] === "vmess") {
|
||||
var sstr = b64DecodeUnicode(ssu[1]);
|
||||
var ploc = sstr.indexOf("/?");
|
||||
if (has_singbox) {
|
||||
if (vmess_type == "sing-box" && has_singbox) {
|
||||
dom_prefix = "singbox_"
|
||||
opt.set('type', "sing-box");
|
||||
}
|
||||
if (has_xray) {
|
||||
} else if (has_xray) {
|
||||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
}
|
||||
@ -1110,11 +1123,10 @@ local api = require "luci.passwall.api"
|
||||
}
|
||||
}
|
||||
if (ssu[0] === "vless") {
|
||||
if (has_singbox) {
|
||||
if (vless_type == "sing-box" && has_singbox) {
|
||||
dom_prefix = "singbox_"
|
||||
opt.set('type', "sing-box");
|
||||
}
|
||||
if (has_xray) {
|
||||
} else if (has_xray) {
|
||||
dom_prefix = "xray_"
|
||||
opt.set('type', "Xray");
|
||||
}
|
||||
@ -1266,7 +1278,7 @@ local api = require "luci.passwall.api"
|
||||
queryParam[decodeURIComponent(params[0])] = decodeURIComponent(params[1] || '');
|
||||
}
|
||||
}
|
||||
if (has_singbox) {
|
||||
if (hysteria2_type == "sing-box" && has_singbox) {
|
||||
opt.set('type', "sing-box");
|
||||
dom_prefix = "singbox_"
|
||||
opt.set(dom_prefix + 'protocol', "hysteria2");
|
||||
@ -1275,8 +1287,7 @@ local api = require "luci.passwall.api"
|
||||
opt.set(dom_prefix + 'hysteria2_obfs_type', "salamander");
|
||||
opt.set(dom_prefix + 'hysteria2_obfs_password', queryParam["obfs-password"]);
|
||||
}
|
||||
}
|
||||
if (has_hysteria2) {
|
||||
} else if (has_hysteria2) {
|
||||
opt.set('type', "Hysteria2");
|
||||
dom_prefix = "hysteria2_"
|
||||
opt.set(dom_prefix + 'auth_password', decodeURIComponent(password));
|
||||
|
@ -593,7 +593,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
info = info:sub(1, find_index - 1)
|
||||
end
|
||||
|
||||
local hostInfo = split(base64Decode(info), "@")
|
||||
local hostInfo = split(base64Decode(UrlDecode(info)), "@")
|
||||
if hostInfo and #hostInfo > 0 then
|
||||
local host_port = hostInfo[#hostInfo]
|
||||
-- [2001:4860:4860::8888]:443
|
||||
|
Loading…
Reference in New Issue
Block a user