mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-09 23:59:01 +08:00
由于QX脚本不走Rewrite,使用Backend方式触发
This commit is contained in:
parent
a0691bedaf
commit
e72745fbce
@ -1,5 +1,34 @@
|
||||
/**
|
||||
Sub-Store 自动同步配置到gist
|
||||
由于机制特殊,注意需要按照说明进行配置!
|
||||
|
||||
「QX配置」
|
||||
[http_backend]
|
||||
https://raw.githubusercontent.com/Peng-YM/Sub-Store/master/backend/sub-store.min.js, tag=Sub-Store, path=/, enabled=true
|
||||
[task_local]
|
||||
0 12 * * * https://raw.githubusercontent.com/Peng-YM/Sub-Store/master/scripts/cron-sync-artifacts.js, tag=Sub-Store, img-url=https://raw.githubusercontent.com/58xinian/icon/master/Sub-Store1.png, enabled=true
|
||||
|
||||
「Surge配置」
|
||||
[Script]
|
||||
Sub-Store 自动同步 = type=cron,cronexp=0 12 * * *, script-path=https://raw.githubusercontent.com/Peng-YM/Sub-Store/master/scripts/cron-sync-artifacts.js
|
||||
|
||||
「Loon配置」
|
||||
[Script]
|
||||
cron "0 12 * * *" script-path=https://raw.githubusercontent.com/Peng-YM/Sub-Store/master/scripts/cron-sync-artifacts.js, tag=Sub-Store 自动同步
|
||||
*/
|
||||
|
||||
|
||||
const $ = API();
|
||||
$.http.get('https://sub.store/api/cron/sync-artifacts');
|
||||
const { isQX, isLoon, isSurge } = ENV();
|
||||
const url = 'https://sub.store/api/cron/sync-artifacts';
|
||||
if (isQX) {
|
||||
$task.fetch({
|
||||
url: "http://localhost:9999/api/cron/sync-artifacts"
|
||||
});
|
||||
} else {
|
||||
$.http.get(url);
|
||||
}
|
||||
$.log("同步配置成功!");
|
||||
$.done();
|
||||
|
||||
// prettier ignore
|
||||
|
Loading…
x
Reference in New Issue
Block a user