├── .gitbook
└── assets
│ └── image.png
├── README.md
├── SUMMARY.md
├── advanced
├── aid.md
└── pc.md
├── awesome
├── icons.md
├── subscriptions.md
├── videos.md
└── wallpapers.md
├── base
├── tips.md
└── upgrade.md
└── dev
├── env.md
├── pei-zhi-wen-dang-.boxjs.json.md
└── url-scheme.md
/.gitbook/assets/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chavyleung/boxjs-doc/04f430107c01a46cf264536f94ef04caa6ce3c58/.gitbook/assets/image.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: BoxJs 是一款运行在 Surge、Quantumult X、Loon、Shadowrocket、Stash 环境下的脚本!
3 | ---
4 |
5 | # 介绍
6 |
7 | ## 安装
8 |
9 | ### Surge
10 |
11 | {% code title="Surge Module" %}
12 | ```bash
13 | # 安装路径:
14 | 首页 > 模块 > 安装新模块
15 |
16 | # 模块地址:
17 | https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.surge.sgmodule
18 | ```
19 | {% endcode %}
20 |
21 | ### Quantumult X
22 |
23 | > 在最新的版本,推荐只使用 **Rewrite** 安装,无特殊需要无必要配置 **HTTP Backend**。
24 |
25 | {% tabs %}
26 | {% tab title="Rewrite (推荐)" %}
27 | **一键安装**
28 |
29 | 如果你使用的是 **v1.0.29 (670)** 及以上版本: [一键安装](https://api.boxjs.app/quanx-install)
30 |
31 |
32 |
33 | #### 手动安装
34 |
35 | {% code title="QuanX Rewrite" %}
36 | ```bash
37 | # 安装路径:
38 | 风车 > 重写 > 引用
39 |
40 | # 重写路径:
41 | https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.quanx.conf
42 |
43 | ```
44 | {% endcode %}
45 | {% endtab %}
46 |
47 | {% tab title="HTTP Backend (不建议)" %}
48 | HTTP Backend 需要通过 IP+端口 的形式访问
49 |
50 | 如果你觉得这样不够优雅,可参考 \`Rewrite + HTTP Backend (进阶)\` 实现域名访问
51 |
52 | {% hint style="info" %}
53 | 添加 Backend 时不要填 \`主机名\`
54 | {% endhint %}
55 |
56 | {% code title="HTTP Backend" %}
57 | ```bash
58 | # 安装路径:
59 | 风车 > 工具&分析> HTTP Backend > 添加
60 |
61 | # 标签: boxjs
62 | # 处理请求的路径: ^/
63 |
64 | # 脚本路径
65 | https://raw.githubusercontent.com/chavyleung/scripts/master/box/chavy.boxjs.js
66 |
67 | # 访问地址:
68 | http://127.0.0.1:9999
69 |
70 | # 注意事项
71 | 注意配置 HTTP Backend 的地址为 0.0.0.0 端口为 9999
72 | 配置完成后确保打开了 HTTP Backend 的开关
73 | 然后 全部更新 > 重启代理
74 | ```
75 | {% endcode %}
76 | {% endtab %}
77 |
78 | {% tab title="Rewrite + HTTP Backend ( 新手不建议)" %}
79 | ```bash
80 | # 第一步
81 | 同时配置 HTTP Backend 和 Rewrite
82 | 全部更新 > 重启代理
83 | 配置后应该通过 http://127.0.0.1:9999 访问下页面后是否正常
84 |
85 | # 第二步
86 | # http://boxjs.com
87 | # http://boxjs.net
88 | # http://127.0.0.1:9999
89 | 进入 BoxJs > 应用(底栏) > 内置应用 > 偏好设置
90 |
91 | # 第三步
92 | 在 `HTTP Backend (Quantumult X)` 中填入 HTTP Backend 的地址
93 | 如: http://127.0.0.1:9999
94 |
95 | # 然后就可以通过`域名`的方式访问 BoxJs 了
96 |
97 | # 原理
98 | 通过 Rewrite 可以实现域名的形式访问 BoxJs
99 | 通过 偏好设置 可以让 BoxJs 的数据请求走 HTTP Backend
100 |
101 | # 感谢 https://github.com/chouchoui PR
102 | # 详见 https://github.com/chavyleung/scripts/pull/327
103 | ```
104 | {% endtab %}
105 | {% endtabs %}
106 |
107 | ### Loon
108 |
109 | #### 一键安装
110 |
111 | 如果你使用的是 **v2.1.19 (385)** 及以上的版本,你可以直接: [一键安装](https://api.boxjs.app/loon-install)
112 |
113 | #### 手动安装
114 |
115 | {% code title="Loon Plugin" %}
116 | ```bash
117 | # 安装路径:
118 | 配置 > 插件 > 插件
119 |
120 | # 插件地址:
121 | https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.loon.plugin
122 | ```
123 | {% endcode %}
124 |
125 | ### Shadowrocket
126 |
127 | #### 一键安装
128 |
129 | 如果你使用的是 **v2.2.8 (1658)** 及以上的版本,你可以直接: [一键安装](http://api.boxjs.app/shadowrocket-install)
130 |
131 | #### 手动安装
132 |
133 | {% tabs %}
134 | {% tab title="Module (推荐)" %}
135 | {% code title="Shadowrocket Module" %}
136 | ```bash
137 | # 安装路径:
138 | 配置 > 模块 > 右上角加号
139 |
140 | # 模块地址:
141 | https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.surge.sgmodule
142 |
143 | # 感谢
144 | @JOJOforshaun PR
145 | ```
146 | {% endcode %}
147 | {% endtab %}
148 |
149 | {% tab title="Rewrite" %}
150 | {% code title="Shadowrocket Rewrite" %}
151 | ```bash
152 | # 安装路径:
153 | 配置 > 点击使用中的配置文件 > 编辑纯文本
154 |
155 | # 在 [Script] 标签下增加以下内容,如果没有 [Script],可自行增加
156 |
157 | # 重写地址:
158 | Rewrite: BoxJs = type=http-request,pattern=https?:\/\/boxjs\.(com|net),script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/box/chavy.boxjs.js, requires-body=true, timeout=120
159 |
160 | ```
161 | {% endcode %}
162 | {% endtab %}
163 | {% endtabs %}
164 |
165 | {% hint style="warning" %}
166 | 安装完成后,最好重启一次代理
167 | {% endhint %}
168 |
169 | ### Stash
170 |
171 | {% code title="Stash stoverride" %}
172 | ```bash
173 | # 安装路径:
174 | 首页 > 覆写 > 安装覆写
175 |
176 | # 覆写地址:
177 | https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.stash.stoverride
178 | ```
179 | {% endcode %}
180 |
181 | ## 访问
182 |
183 | [http://boxjs.com](http://boxjs.com)
184 |
--------------------------------------------------------------------------------
/SUMMARY.md:
--------------------------------------------------------------------------------
1 | # Table of contents
2 |
3 | * [介绍](README.md)
4 |
5 | ## 基础
6 |
7 | * [如何升级](base/upgrade.md)
8 | * [一些技巧](base/tips.md)
9 |
10 | ## 进阶
11 |
12 | * [急救](advanced/aid.md)
13 | * [通过 PC 访问](advanced/pc.md)
14 |
15 | ## 开发文档
16 |
17 | * [配置文档 (\*.boxjs.json)](dev/pei-zhi-wen-dang-.boxjs.json.md)
18 | * [URL Scheme](dev/url-scheme.md)
19 |
20 | ## awesome
21 |
22 | * [订阅](awesome/subscriptions.md)
23 | * [视频](awesome/videos.md)
24 | * [图标](awesome/icons.md)
25 | * [壁纸](awesome/wallpapers.md)
26 |
--------------------------------------------------------------------------------
/advanced/aid.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: 如果使用 BoxJs 的过程中遇到白屏,无法打开等症状,可以尝试手动运行以下脚本!
3 | ---
4 |
5 | # 急救
6 |
7 | ### 抹掉全局备份
8 |
9 | {% hint style="danger" %}
10 | 如果在全局备份后出现 VPN 自动断连、日志出现内存警告,可尝试抹掉备份!
11 | {% endhint %}
12 |
13 | > 出现这个问题,是因为备份的数量过多,内存不足引起的,建议把备份数量控制在 3 个以内。
14 |
15 | 手动运行 [抹掉全局备份](https://raw.githubusercontent.com/chavyleung/scripts/master/box/scripts/boxjs.revert.baks.js) 脚本
16 |
17 | ### 抹掉订阅缓存
18 |
19 | {% hint style="danger" %}
20 | 如果你在添加订阅后,出现白屏现象,可尝试抹掉订阅缓存!
21 | {% endhint %}
22 |
23 | > 抹掉订阅缓存是非常安全的操作,不会对已保存的会话、设置产生任何影响,可以放心抹掉。
24 |
25 | > 清缓存后,所有订阅会显示“格式错误”,然后手动更新下订阅即可!
26 |
27 | 手动运行 [抹掉订阅缓存](https://raw.githubusercontent.com/chavyleung/scripts/master/box/scripts/boxjs.revert.caches.js) 脚本
28 |
29 | ### 如何运行脚本
30 |
31 | ```bash
32 | 1. 使用浏览器打开脚本, 全选 > 复制
33 |
34 | # Surge
35 | 首页 > 脚本 > 编辑器 > 把脚本粘进去 > 执行
36 | # QuanX
37 | 风车 > 调试 > 构造请求 > 添加 > 下一步 > 把示例代码`全部`删掉 > 把脚本粘进去 > 执行
38 | # Loon
39 | 配置 > 脚本 > 本地JS文件 > 添加 > 创建新脚本 > 随便填个脚本名字 > 把脚本粘进去 > 运行
40 | # Shadowrocket
41 | 配置 > 当前使用的配置文件末尾的i > 脚本 > 右上角加号 > 随便填个脚本名字 > 粘贴脚本链接到脚本路径 > 滑动屏幕到底部 > 点击运行脚本
42 | ```
43 |
44 |
--------------------------------------------------------------------------------
/advanced/pc.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: 通过外部设备的浏览器来访问手机上的 BoxJs,外部设备包括但不限于 PC、Mac、Linux、Android……
3 | ---
4 |
5 | # 通过 PC 访问
6 |
7 | {% hint style="info" %}
8 | 以下将安装有 BoxJs 的设备称为 A,访问 BoxJs 的设备称为 B
9 | {% endhint %}
10 |
11 | ### Quantumult X
12 |
13 | 1. 将 A、B 两台设备置于同一局域网内
14 | 2. 【A设备】使用 HTTP Backend 的方式来配置 BoxJs
15 | 3. 【A设备】设置 HTTP Backend 的监听地址为 0.0.0.0,端口默认 9999 即可
16 | 4. 【A设备】通过自身浏览器访问 http://127.0.0.1:9999 验证是否正常访问
17 | 5. 【A设备】取得本设备的局域网地址,如:192.168.x.x
18 | 6. 【B设备】打开浏览器并访问:http://192.168.x.x:9999 即可
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/awesome/icons.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: BoxJs 内有很多精美的图标,它们都来自这些大佬哦~
3 | ---
4 |
5 | # 图标
6 |
7 | {% embed url="https://github.com/Orz-3/" %}
8 |
9 | {% embed url="https://github.com/58xinian" %}
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/awesome/subscriptions.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: 这里罗列了一些非常棒的 BoxJs 订阅,感谢各位大佬对 BoxJs 的支持。
3 | ---
4 |
5 | # 订阅
6 |
7 | {% hint style="info" %}
8 | 排名不分先后
9 | {% endhint %}
10 |
11 | ### @lxk0301
12 |
13 | :pencil: [订阅地址](https://jdsharedresourcescdn.azureedge.net/jdresource/lxk0301.boxjs.json)
14 |
15 | [https://jdsharedresourcescdn.azureedge.net/jdresource/lxk0301.boxjs.json](https://jdsharedresourcescdn.azureedge.net/jdresource/lxk0301.boxjs.json)
16 |
17 | {% embed url="https://gitee.com/lxk0301/jd_docker" %}
18 |
19 |
20 |
21 | ### @AsVow
22 |
23 | :pencil: [订阅地址](https://ooxx.be/js/box.json)
24 |
25 | [https://ooxx.be/js/box.json](https://ooxx.be/js/box.json)
26 |
27 | {% embed url="https://ooxx.be/js" %}
28 |
29 |
30 |
31 | ### @NobyDa
32 |
33 | :pencil: [订阅地址](https://raw.githubusercontent.com/NobyDa/Script/master/NobyDa\_BoxJs.json)
34 |
35 | [https://raw.githubusercontent.com/NobyDa/Script/master/NobyDa\_BoxJs.json](https://raw.githubusercontent.com/NobyDa/Script/master/NobyDa\_BoxJs.json)
36 |
37 | {% embed url="https://github.com/NobyDa" %}
38 |
39 |
40 |
41 | ### @Peng-YM
42 |
43 | :pencil: [订阅地址](https://raw.githubusercontent.com/Peng-YM/QuanX/master/Tasks/box.js.json)
44 |
45 | [https://raw.githubusercontent.com/Peng-YM/QuanX/master/Tasks/box.js.json](https://raw.githubusercontent.com/Peng-YM/QuanX/master/Tasks/box.js.json)
46 |
47 | {% embed url="https://github.com/Peng-YM" %}
48 |
49 |
50 |
51 | ### @Sunert
52 |
53 | :pencil: [订阅地址](https://raw.githubusercontent.com/Sunert/Scripts/master/Task/sunert.boxjs.json)
54 |
55 | [https://raw.githubusercontent.com/Sunert/Scripts/master/Task/sunert.boxjs.json](https://raw.githubusercontent.com/Sunert/Scripts/master/Task/sunert.boxjs.json)
56 |
57 | {% embed url="https://github.com/Sunert" %}
58 |
59 |
60 |
61 | ### @chavyleung
62 |
63 | :pencil: [订阅地址](https://raw.githubusercontent.com/chavyleung/scripts/master/box/chavy.boxjs.json)
64 |
65 | [https://raw.githubusercontent.com/chavyleung/scripts/master/box/chavy.boxjs.json](https://raw.githubusercontent.com/chavyleung/scripts/master/box/chavy.boxjs.json)
66 |
67 | {% embed url="https://github.com/chavyleung" %}
68 |
69 |
70 |
71 | ### @chouchoui
72 |
73 | :pencil: [订阅地址](https://raw.githubusercontent.com/chouchoui/QuanX/master/vei.boxjs.json)
74 |
75 | [https://raw.githubusercontent.com/chouchoui/QuanX/master/vei.boxjs.json](https://raw.githubusercontent.com/chouchoui/QuanX/master/vei.boxjs.json)
76 |
77 | {% embed url="https://github.com/chouchoui" %}
78 |
79 |
80 |
81 | ### @evilbutcher
82 |
83 | :pencil: [订阅地址](https://raw.githubusercontent.com/evilbutcher/Quantumult\_X/master/evilbutcher.boxjs.json)
84 |
85 | [https://raw.githubusercontent.com/evilbutcher/Quantumult\_X/master/evilbutcher.boxjs.json](https://raw.githubusercontent.com/evilbutcher/Quantumult\_X/master/evilbutcher.boxjs.json)
86 |
87 | {% embed url="https://github.com/evilbutcher" %}
88 |
89 |
90 |
91 | ### @lowking
92 |
93 | :pencil:[ 订阅地址](https://raw.githubusercontent.com/lowking/Scripts/master/lowking.boxjs.json)
94 |
95 | [https://raw.githubusercontent.com/lowking/Scripts/master/lowking.boxjs.json](https://raw.githubusercontent.com/lowking/Scripts/master/lowking.boxjs.json)
96 |
97 | {% embed url="https://github.com/lowking" %}
98 |
99 |
100 |
101 | ### @songyangzz
102 |
103 | :pencil: [订阅地址](https://raw.githubusercontent.com/songyangzz/QuantumultX/master/syzzzf.box.json)
104 |
105 | [https://raw.githubusercontent.com/songyangzz/QuantumultX/master/syzzzf.box.json](https://raw.githubusercontent.com/songyangzz/QuantumultX/master/syzzzf.box.json)
106 |
107 | {% embed url="https://github.com/songyangzz" %}
108 |
109 |
110 |
111 | ### @toulanboy
112 |
113 | :pencil: [订阅地址](https://raw.githubusercontent.com/toulanboy/scripts/master/toulanboy.boxjs.json)
114 |
115 | [https://raw.githubusercontent.com/toulanboy/scripts/master/toulanboy.boxjs.json](https://raw.githubusercontent.com/toulanboy/scripts/master/toulanboy.boxjs.json)
116 |
117 | {% embed url="https://github.com/toulanboy" %}
118 |
119 |
120 |
121 | ### @zZPiglet
122 |
123 | :pencil: [订阅地址](https://raw.githubusercontent.com/zZPiglet/Task/master/zZPiglet.boxjs.json)
124 |
125 | [https://raw.githubusercontent.com/zZPiglet/Task/master/zZPiglet.boxjs.json](https://raw.githubusercontent.com/zZPiglet/Task/master/zZPiglet.boxjs.json)
126 |
127 | {% embed url="https://github.com/zZPiglet" %}
128 |
129 |
130 |
131 | ### @id77
132 |
133 | [https://raw.githubusercontent.com/id77/QuantumultX/master/box.json](https://raw.githubusercontent.com/id77/QuantumultX/master/box.json)
134 |
135 | {% embed url="https://github.com/id77/QuantumultX/tree/master" %}
136 |
137 | ###
138 |
139 | ### @dompling
140 |
141 | [https://raw.githubusercontent.com/dompling/Script/master/dompling.boxjs.json](https://raw.githubusercontent.com/dompling/Script/master/dompling.boxjs.json)
142 |
143 | {% embed url="https://github.com/dompling" %}
144 |
145 |
146 |
147 |
148 |
149 |
--------------------------------------------------------------------------------
/awesome/videos.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: 同样,这里有一些非常棒的视频教程,欢迎大家关注 UP 主的频道。
3 | ---
4 |
5 | # 视频
6 |
7 | {% embed url="https://www.youtube.com/channel/UCgjdfJbXYaFfC3Wxump37Mg" %}
8 |
9 | {% embed url="https://youtu.be/eIpBrRxiy0w" %}
10 |
11 | {% embed url="https://www.youtube.com/channel/UCXdlywuMV\_a8jEZ4wV6669g" %}
12 |
13 | {% embed url="https://youtu.be/kKa26Fj0MJA" %}
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/awesome/wallpapers.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: 从网上找了一些随机壁纸,按需添加吧
3 | ---
4 |
5 | # 壁纸
6 |
7 | ```bash
8 | # 下面内容可以直接全复制到 内置应用 > 偏好设置
9 |
10 | 无背景,
11 | 跟随系统,跟随系统
12 | 明亮,https://64.media.tumblr.com/451bca19ad0b695c08b54b4287e4f935/tumblr_nb70h5f6XN1rnbw6mo2_r1_1280.gifv
13 | 暗黑,https://i.pinimg.com/originals/94/4a/85/944a85804c97622973fbae194ddc27ac.gif
14 | 手机妹子,http://api.btstu.cn/sjbz/zsy.php
15 | 手机美女,http://api.btstu.cn/sjbz/?m_lx=suiji
16 | 小姐姐,http://api.nmb.show/xiaojiejie1.php
17 | 小姐姐2,http://api.nmb.show/xiaojiejie2.php
18 | ```
19 |
20 |
--------------------------------------------------------------------------------
/base/tips.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: 本文将介绍一些使用 BoxJs 的小技巧
3 | ---
4 |
5 | # 一些技巧
6 |
7 | {% hint style="info" %}
8 | 本文始终介绍最新的版本版本特性
9 | {% endhint %}
10 |
11 | ### 主界面
12 |
13 | * 把页面添加到主屏幕,就可以像本地 App 一样使用 BoxJs了
14 | * 顶部的 **搜索栏** 可以搜索应用(那不是地址栏)
15 | * BoxJs 在加载数据的时候,**搜索栏** 左侧会有个加载动画
16 | * 点击底栏中的 **应用** 可以回到顶部,再点一次可以 **收缩** 所有面板
17 | * 点击底栏中的 **订阅** 可以回到顶部,再点一次可以 **刷新** 所有订阅
18 |
19 | #### 悬浮按钮
20 |
21 | * 双击悬浮按钮可以刷新页面
22 | * 悬浮按钮可以隐藏 (侧栏 > 隐藏悬浮按钮)
23 | * 悬浮按钮的位置可以设置 **靠左** 或 **靠右** (红色按钮)
24 | * 可以查看版本更新说明 (紫色按钮)
25 | * 可以查看使用手册(灰色按钮)
26 |
27 | #### 侧栏
28 |
29 | * 勿扰模式:打开后 BoxJs 不再发出系统消息(仍会记录日志)
30 | * 透明图标:明亮模式下,只有左上角的 APP 图标会变透明 (因为白色背景没法显示透明图标的)
31 | * 调试模式(页面):
32 | * 打开时:每次访问 BoxJs 都会请求新的页面
33 | * 关闭时:只有发现新版本时才会请求新的页面(推荐)
34 |
35 | #### 壁纸
36 |
37 | * 有些是随机壁纸,每次打开都不见
38 | * 如果你使用的是随机壁纸,点击 **底栏** 的 **首页** 菜单可以刷新壁纸
39 | * 如果你使用的是随机壁纸,在 **壁纸模式** 下可以像刷抖音那样上滑刷新壁纸
40 | * 侧栏中可以进入 **壁纸模式** ,下滑可退出 **壁纸模式**
41 | * 悬浮按钮下滑可进入 **壁纸模式**
42 |
43 | ### 主页
44 |
45 | * 可以设置主页壁纸(内置应用 > 偏好设置)
46 |
47 | ### 应用
48 |
49 | * 进入应用内,点击右上角的 :arrow\_forward: 按钮可以直接运行脚本
50 |
51 | ### 订阅
52 |
53 | * 点击 **订阅** 可以马上刷新这个订阅
54 | * 点击 **更多** 按钮可以访问作者仓库 (喜欢作者的作品,请 :star:支持一下)
55 | * 如果你不知道有哪些订阅链接,可以点击右上角那朵 :cloud:
56 |
57 | ### 我的
58 |
59 | * 右上角 :gear: 可以设置昵称和头像(头像可以通过长按自己的 Github 头像并复制链接获得)
60 | * 备份
61 | * 进入备份,可以把备份信息复制出来,拷到其他设备再 **导入** > **还原**
62 | * 每个备份都很占空间,尽量控制你的备份数量
63 | * 导入备份只是在当前设备导入一副本,并不会覆盖当前数据
64 | * 导入备份后你还需手动 **还原**(请谨慎操作)
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/base/upgrade.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: 建议使用 APP 内提供的一键更新功能
3 | ---
4 |
5 | # 如何升级
6 |
7 | {% hint style="info" %}
8 | 升级脚本后,最好重启一次代理(VPN)
9 | {% endhint %}
10 |
11 | ### Surge
12 |
13 | ```bash
14 | 首页 > Surge 图标 (左上角) > 外部资源 > 全部更新
15 | ```
16 |
17 | ### Quantumult X
18 |
19 | #### 一键升级
20 |
21 | 如果你使用的是 **v1.0.29 (670)** 及以上的版本,你可以直接: [一键升级](https://api.boxjs.app/quanx-update)
22 |
23 | #### 手动升级
24 |
25 | ```bash
26 | 长按风车 > 刷新 (左下角) > 重启代理 (VPN)
27 |
28 | # 如果,你是 QuanX 的新用户(购买一周内)
29 | 点击风车 > 重写 > 引用 > 点击重写 > 更新 > 重启代理 (VPN)
30 | ```
31 |
32 | ### Loon
33 |
34 | #### 一键升级
35 |
36 | 如果你使用的是 **v2.1.19 (386)** 及以上的版本,你可以直接: [一键升级](https://api.boxjs.app/loon-update)
37 |
38 | #### 手动升级
39 |
40 | ```bash
41 | 配置 > 插件 > 刷新 (右上角) > 重启代理 (VPN)
42 | ```
43 |
44 | ### Shadowrocket
45 |
46 | 如果你使用的是 **v2.2.8 (1658)** 及以上的版本,你可以直接: [一键升级](http://api.boxjs.app/shadowrocket-update)
47 |
48 | ```bash
49 | # 使用模块安装的用户
50 | 配置 > 模块 > 更新模块(或者找到Boxjs模块右划,点击更新)
51 |
52 | # 使用重写安装的用户
53 | 配置 > 点击Boxjs所在的配置文件 > 点击“使用配置”或“更新配置”均可更新配置文件引用的外部资源
54 | ```
55 |
56 | ### Stash
57 |
58 | ```
59 | 策略组 > 云 (左上角) > 全部更新
60 | ```
61 |
--------------------------------------------------------------------------------
/dev/env.md:
--------------------------------------------------------------------------------
1 | # 环境
2 |
3 |
--------------------------------------------------------------------------------
/dev/pei-zhi-wen-dang-.boxjs.json.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: 本文介绍如何配置 BoxJs 订阅文件
3 | ---
4 |
5 | # 配置文档 (\*.boxjs.json)
6 |
7 | ## 全量配置
8 |
9 | 待完善
10 |
11 | ## 场景介绍
12 |
13 | ### 安装事件 (onInstall)
14 |
15 | 如果希望用户在添加 BoxJs 订阅后,自动安装重写 (.plugin, .snippet, ...)
16 |
17 | {% hint style="info" %}
18 | **要求:**
19 |
20 | BoxJs: v0.12.0
21 |
22 | Loon: v2.1.19 (386)
23 |
24 | Quantumult X: v1.0.29 (670)
25 | {% endhint %}
26 |
27 |
28 |
29 | **实现原理**
30 |
31 | 根据配置,用户在添加订阅后会打开一个指定的 URL,你可以配置一个 URL Scheme 或一个普通 URL,来实现自动安装重写、更新资源……,如:
32 |
33 | ```
34 | loon://update?sub=all
35 | ```
36 |
37 | **配置方式**
38 |
39 | ```json
40 | {
41 | "id": "chavyleung.app.test.sub",
42 | ....
43 | "onInstall": {
44 | "title": "安装确认",
45 | "message": "本订阅包含重写资源, 是否需要自动安装?",
46 | "install": {
47 | "Surge": "",
48 | "QuanX": "quantumult-x:///add-resource?remote-resource=%7B%22rewrite_remote%22%3A%5B%22https%3A%2F%2Fgithub.com%2Fchavyleung%2Fscripts%2Fraw%2Fmaster%2Fbox%2Frewrite%2Fboxjs.rewrite.quanx.conf%2Ctag%3Dboxjs%22%5D%7D",
49 | "Loon": "loon://import?plugin=https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.loon.plugin",
50 | "Shadowrocket": "",
51 | "Stash": ""
52 | }
53 | },
54 | "apps": [
55 | {}, {}, ...
56 | ]
57 | }
58 |
59 | ```
60 |
--------------------------------------------------------------------------------
/dev/url-scheme.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: 收集已经知几个 App 的 URL Scheme
3 | ---
4 |
5 | # URL Scheme
6 |
7 | ## 公开接口
8 |
9 | 由于 URL Scheme 不能直接在部分 App (Telegram 等) 以超链接的形式显示
10 |
11 | 我们提供几个的自动重定向 (302) 接口,欢迎使用:
12 |
13 | ```properties
14 | # 前缀:
15 | https://api.boxjs.app/loon/…
16 | https://api.boxjs.app/quanx/…
17 | https://api.boxjs.app/surge/…
18 | https://api.boxjs.app/shadowrocket/…
19 | https://api.boxjs.app/stash/…
20 | https://api.boxjs.app/clash/…
21 |
22 | # 实例:
23 | loon://update?sub=all
24 | # 转换为:
25 | https://api.boxjs.app/loon/update?sub=all
26 |
27 | # 其他同理...
28 | # 注意 url-encode
29 |
30 | ```
31 |
32 | #### **Surge:**
33 |
34 | [https://manual.nssurge.com/others/url-scheme.html](https://manual.nssurge.com/others/url-scheme.html)
35 |
36 | #### **Quantumult X:**
37 |
38 | [https://github.com/crossutility/Quantumult-X/blob/master/url-scheme.md](https://github.com/crossutility/Quantumult-X/blob/master/url-scheme.md)
39 |
40 | #### **Loon:**
41 |
42 | ```properties
43 | # 安装插件
44 | loon://import?plugin=https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.loon.plugin
45 |
46 | # 更新资源
47 | loon://update?sub=all
48 |
49 | ```
50 |
51 | #### Shadowrocket
52 |
53 | ```properties
54 | # 安装 & 更新插件
55 | shadowrocket://install?module=https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.surge.sgmodule
56 |
57 | ```
58 |
59 | #### Stash
60 |
61 | [https://stash.wiki/qna/url-schema](https://stash.wiki/qna/url-schema)
62 |
--------------------------------------------------------------------------------