非 Surge 用户可通过快捷方式获取 URL 内容的方式调用切换会话
boxjs 需更新至 0.19.0
快捷指令
获取 URL 内容
方法
POST
请求体
JSON
url
https://raw.githubusercontent.com/chavyleung/scripts/master/box/switcher/box.switcher.js
isRemote
true
argument
iRingo.TestFlight
- 👍2
- ❤️1
通知 事件的例子
[Script]
Notification = script-path=notification.js,type=event,event-name=notificationnotification.js 内容// console.log(JSON.stringify($event, null, 2))
const { name, data: { title, subtitle, body } } = $event
if (/达乐美|达美乐/.test(title) && /一等奖/.test(body)) {
$notification.post(`🎉 一等奖!!! ${title}`, subtitle, body, { 'media-url': 'https://www.dominos.com.cn/assets/img/logo.a75b8846.png', sound: 1 })
}
$done()
VPings! 超™ 炫酷 新概念整活IP 和 CountryCode, 也可以自动获取当前的网络的信息)https://nz.abc.com, 需要设置 RE_PATTERN 为 nz\.abc\.com, HOSTNAME 为 nz.abc.com 这样才能让跟探针 API 通信的请求进重写脚本由于苹果的安全政策 至少小组件 必须使用 HTTPS 但是我模块里先留着这个正则吧
nezha-agent 的值 为 { "NAME": "小只因", "PLATFORM": "ColorOS" }
[抽奖送码] 我知道竞品很多,但几个月"干饭"迭代 截图 + 贴图 + OCR + 录屏 + 屏幕测量 功能都有了,推荐下!
2.14.289HEAD 请求 10 次的延迟_monitors$server._monitors = [
{
name: 'Cloudflare',
url: 'http://cp.cloudflare.com/generate_204',
method: 'HEAD',
number: 3,
timeout: 2000,
},
{
name: 'Google',
url: 'http://www.google.com/generate_204',
method: 'HEAD',
number: 3,
timeout: 2000,
},
]
2.14.288_monitors$server._monitors = [
{
name: 'Cloudflare',
url: 'http://cp.cloudflare.com/generate_204',
method: 'HEAD',
number: 3,
timeout: 2000,
},
{
name: 'Google',
url: 'http://www.google.com/generate_204',
method: 'HEAD',
number: 3,
timeout: 2000,
},
]
哪吒探针玩 VPS 我用 VPings
PM2 管理, 简单粗暴/Users/xxx/nezha/nezha-agent/Users/xxx/nezha/nezha-agent.sh:#!/usr/bin/env bash
/Users/xxx/nezha/nezha-agent --password 通信密钥 --server 通信网址:端口Node.js 环境和 pnpmpnpm i -g pm2
pm2 startup
pm2 install pm2-logrotate
cd /Users/xxx/nezha
pm2 start nezha-agent.sh --name nezha-agent
pm2 save
pm2 ls
pm2 logssudo 才能执行 网络检测(即 哪吒 /network 页面的 icmp/tcp ping )nezha-agent 的 IP 查询接口进行分流)AND,((PROCESS-NAME,nezha-agent), (OR, ((DOMAIN,blog.cloudflare.com,extended-matching), (DOMAIN,hostinger.com,extended-matching), (DOMAIN,ahrefs.com,extended-matching), (DOMAIN,developers.cloudflare.com,extended-matching)))),DIRECT- DOMAIN,developers.cloudflare.com,DIRECT
- DOMAIN,ahrefs.com,DIRECT
- DOMAIN,blog.cloudflare.com,DIRECT
- DOMAIN,hostinger.com,DIRECTAND 和 PROCESS-NAME 组合语法location /ip {
return 200 'ip=$remote_addr';
add_header Content-Type text/plain;
}/opt/nezha/agent/config.yml ):custom_ip_api:
- 'https://a.com/ip'
- 'https://b.com/ip'脚本地址:https://github.com/VirgilClyne/iRingo/wiki/✈-TestFlight
BoxJs订阅:https://github.com/VirgilClyne/iRingo/raw/main/BoxJs/iRingo.BoxJs.json
会话切换:https://raw.githubusercontent.com/chavyleung/scripts/master/box/switcher/box.switcher.js