mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 11:53:56 +08:00
🔥 Sync 2026-06-21 03:09:38
This commit is contained in:
1 parent
81d63898c6
commit
3d988e88f2
29 files changed
+867
-191
No files matched your search
@@ -137,7 +137,12 @@ const methods = {
|
||||
break;
|
||||
}
|
||||
|
||||
return { result: (system(`/usr/bin/wget --spider -qT3 ${url} 2>"/dev/null"`, 3100) === 0) };
|
||||
let start = clock(true);
|
||||
let ret = system(`/usr/bin/wget --spider -qT3 ${url} 2>"/dev/null"`, 3100);
|
||||
let end = clock(true);
|
||||
let elapsed = (end[0] - start[0]) * 1000 + int((end[1] - start[1]) / 1000000);
|
||||
|
||||
return { result: (ret === 0), elapsed: elapsed };
|
||||
}
|
||||
},
|
||||
|
||||
@@ -163,7 +168,7 @@ const methods = {
|
||||
const type = req.args?.type;
|
||||
let result = {};
|
||||
|
||||
const fd = popen('/usr/bin/sing-box generate ' + type + ` ${req.args?.params || ''}`);
|
||||
const fd = popen(`/usr/bin/sing-box generate ${type} ${shellquote(req.args?.params || '')}`);
|
||||
if (fd) {
|
||||
let ech_cfg_set = false;
|
||||
let ech_key_set = false;
|
||||
|
||||
Reference in new issue
Block a user