{"id":26920416,"url":"https://github.com/chavyleung/boxjs-doc","last_synced_at":"2026-01-15T22:33:59.283Z","repository":{"id":40360217,"uuid":"285196393","full_name":"chavyleung/boxjs-doc","owner":"chavyleung","description":"BoxJs Docs","archived":false,"fork":false,"pushed_at":"2022-05-24T00:42:35.000Z","size":242,"stargazers_count":227,"open_issues_count":3,"forks_count":25,"subscribers_count":26,"default_branch":"master","last_synced_at":"2023-11-07T16:58:20.067Z","etag":null,"topics":["boxjs"],"latest_commit_sha":null,"homepage":"https://docs.boxjs.app","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chavyleung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-05T06:07:37.000Z","updated_at":"2023-10-30T09:07:50.000Z","dependencies_parsed_at":"2022-08-09T18:11:24.217Z","dependency_job_id":null,"html_url":"https://github.com/chavyleung/boxjs-doc","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chavyleung%2Fboxjs-doc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chavyleung%2Fboxjs-doc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chavyleung%2Fboxjs-doc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chavyleung%2Fboxjs-doc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chavyleung","download_url":"https://codeload.github.com/chavyleung/boxjs-doc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246723262,"owners_count":20823448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boxjs"],"created_at":"2025-04-01T22:36:58.653Z","updated_at":"2026-01-15T22:33:59.256Z","avatar_url":"https://github.com/chavyleung.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ndescription: BoxJs 是一款运行在 Surge、Quantumult X、Loon、Shadowrocket、Stash 环境下的脚本！\n---\n\n# 介绍\n\n## 安装\n\n### Surge\n\n{% code title=\"Surge Module\" %}\n```bash\n# 安装路径: \n ​ 首页 \u003e 模块 \u003e 安装新模块\n\n# 模块地址: \n  https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.surge.sgmodule\n```\n{% endcode %}\n\n### Quantumult X\n\n\u003e 在最新的版本，推荐只使用 **Rewrite** 安装，无特殊需要无必要配置 **HTTP Backend**。\n\n{% tabs %}\n{% tab title=\"Rewrite (推荐)\" %}\n**一键安装**\n\n如果你使用的是 **v1.0.29 (670)** 及以上版本: [一键安装](https://api.boxjs.app/quanx-install)\n\n\n\n#### 手动安装\n\n{% code title=\"QuanX Rewrite\" %}\n```bash\n# 安装路径: \n ​ 风车 \u003e 重写 \u003e 引用\n\n# 重写路径: \n  https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.quanx.conf\n  \n```\n{% endcode %}\n{% endtab %}\n\n{% tab title=\"HTTP Backend (不建议)\" %}\nHTTP Backend 需要通过 IP+端口 的形式访问\n\n如果你觉得这样不够优雅，可参考 \\`Rewrite + HTTP Backend (进阶)\\` 实现域名访问\n\n{% hint style=\"info\" %}\n添加 Backend 时不要填 \\`主机名\\`\n{% endhint %}\n\n{% code title=\"HTTP Backend\" %}\n```bash\n# 安装路径: \n ​ 风车 \u003e 工具\u0026分析\u003e HTTP Backend \u003e 添加\n\n# 标签: boxjs\n# 处理请求的路径: ^/\n\n# 脚本路径\n  https://raw.githubusercontent.com/chavyleung/scripts/master/box/chavy.boxjs.js\n\n# 访问地址:\n  http://127.0.0.1:9999\n\n# 注意事项\n  注意配置 HTTP Backend 的地址为 0.0.0.0 端口为 9999\n  配置完成后确保打开了 HTTP Backend 的开关\n  然后 全部更新 \u003e 重启代理\n```\n{% endcode %}\n{% endtab %}\n\n{% tab title=\"Rewrite + HTTP Backend ( 新手不建议)\" %}\n```bash\n# 第一步\n同时配置 HTTP Backend 和 Rewrite \n全部更新 \u003e 重启代理\n配置后应该通过 http://127.0.0.1:9999 访问下页面后是否正常\n\n# 第二步\n# http://boxjs.com\n# http://boxjs.net \n# http://127.0.0.1:9999\n进入 BoxJs \u003e 应用(底栏) \u003e 内置应用 \u003e 偏好设置\n\n# 第三步\n在 `HTTP Backend (Quantumult X)` 中填入 HTTP Backend 的地址\n如: http://127.0.0.1:9999\n\n# 然后就可以通过`域名`的方式访问 BoxJs 了\n\n# 原理\n通过 Rewrite 可以实现域名的形式访问 BoxJs\n通过 偏好设置 可以让 BoxJs 的数据请求走 HTTP Backend\n\n# 感谢 https://github.com/chouchoui PR\n# 详见 https://github.com/chavyleung/scripts/pull/327\n```\n{% endtab %}\n{% endtabs %}\n\n### Loon\n\n#### 一键安装\n\n如果你使用的是 **v2.1.19 (385)** 及以上的版本，你可以直接: [一键安装](https://api.boxjs.app/loon-install)\n\n#### 手动安装\n\n{% code title=\"Loon Plugin\" %}\n```bash\n# 安装路径: \n ​ 配置 \u003e 插件 \u003e 插件\n \n# 插件地址: \n ​ https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.loon.plugin\n```\n{% endcode %}\n\n### Shadowrocket\n\n#### 一键安装\n\n如果你使用的是 **v2.2.8 (1658)** 及以上的版本，你可以直接: [一键安装](http://api.boxjs.app/shadowrocket-install)\n\n#### 手动安装\n\n{% tabs %}\n{% tab title=\"Module (推荐)\" %}\n{% code title=\"Shadowrocket Module\" %}\n```bash\n# 安装路径: \n ​ 配置 \u003e 模块 \u003e 右上角加号\n\n# 模块地址: \n  https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.surge.sgmodule\n\n# 感谢\n  @JOJOforshaun PR\n```\n{% endcode %}\n{% endtab %}\n\n{% tab title=\"Rewrite\" %}\n{% code title=\"Shadowrocket Rewrite\" %}\n```bash\n# 安装路径:\n  配置 \u003e 点击使用中的配置文件 \u003e 编辑纯文本\n  \n# 在 [Script] 标签下增加以下内容，如果没有 [Script]，可自行增加\n\n# 重写地址:\n  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\n  \n```\n{% endcode %}\n{% endtab %}\n{% endtabs %}\n\n{% hint style=\"warning\" %}\n安装完成后，最好重启一次代理\n{% endhint %}\n\n### Stash\n\n{% code title=\"Stash stoverride\" %}\n```bash\n# 安装路径: \n  首页 \u003e 覆写 \u003e 安装覆写\n  \n​# 覆写地址: \n  https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.stash.stoverride\n```\n{% endcode %}\n\n## 访问\n\n[http://boxjs.com](http://boxjs.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchavyleung%2Fboxjs-doc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchavyleung%2Fboxjs-doc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchavyleung%2Fboxjs-doc/lists"}