Giter VIP home page Giter VIP logo

boxjs-doc's Introduction

description
BoxJs 是一款运行在 Surge、QuanX、Loon 环境下的脚本!

介绍

安装

Surge

{% code title="Surge Module" %}

# 安装路径: 
 ​ 首页 > 模块 > 安装新模块

# BoxJs 稳定版
  https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.surge.sgmodule

# BoxJs 测试版
  https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.surge.tf.sgmodule

{% endcode %}

QuanX

2021.3.25 发现通过 Rewrite 的方式访问 BoxJs 会导致无法删除备份, 建议改用 HTTP Backend

HTTP Backend 需要通过 IP+端口 的形式访问,如果你觉得这样不够优雅,可参考 `Rewrite + HTTP Backend (进阶)` 实现域名访问

{% tabs %} {% tab title="HTTP Backend (推荐)" %} {% code title="HTTP Backend" %}

# 安装路径: 
 ​ 风车 > 工具&分析> HTTP Backend > 添加

# 标签: boxjs
# 处理请求的路径: ^/

# 脚本路径 (稳定版)
https://raw.githubusercontent.com/chavyleung/scripts/master/chavy.box.js
# 脚本路径 (测试版)
https://raw.githubusercontent.com/chavyleung/scripts/master/box/chavy.boxjs.js

# 访问地址:
http://127.0.0.1:9999

# 注意事项
注意配置 HTTP Backend 的地址为 0.0.0.0 端口为 9999
配置完成后确保打开了 HTTP Backend 的开关
然后 全部更新 > 重启代理

{% endcode %} {% endtab %}

{% tab title="Rewrite" %} {% code title="QuanX Rewrite" %}

# 安装路径: 
 ​ 风车 > 重写 > 引用

# BoxJs 稳定版
  https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.quanx.conf

# BoxJs 测试版
  https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.quanx.tf.conf

{% endcode %} {% endtab %}

{% tab title="Rewrite + HTTP Backend (进阶)" %}

# 第一步
同时配置 HTTP Backend 和 Rewrite 
全部更新 > 重启代理
配置后应该通过 http://127.0.0.1:9999 访问下页面后是否正常

# 第二步
# http://boxjs.com
# http://boxjs.net 
# http://127.0.0.1:9999
进入 BoxJs > 应用(底栏) > 内置应用 > 偏好设置

# 第三步`HTTP Backend (Quantumult X)` 中填入 HTTP Backend 的地址
如: http://127.0.0.1:9999

# 然后就可以通过`域名`的方式访问 BoxJs 了

# 原理
通过 Rewrite 可以实现域名的形式访问 BoxJs
通过 偏好设置 可以让 BoxJs 的数据请求走 HTTP Backend

# 感谢 https://github.com/chouchoui PR
# 详见 https://github.com/chavyleung/scripts/pull/327

{% endtab %} {% endtabs %}

Loon

{% code title="Loon Plugin" %}

# 安装路径: 
 ​ 配置 > 插件 > 插件
 
# BoxJs 稳定版
 ​ https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.loon.plugin

# BoxJs 测试版
  https://raw.githubusercontent.com/chavyleung/scripts/master/box/rewrite/boxjs.rewrite.loon.tf.plugin

{% endcode %}

Shadowrocket

{% code title="Shadowrocket Rewrite" %}

# 安装路径
  配置 > 点击使用中的配置文件 > 编辑纯文本
  
# 在 [Script] 标签下增加以下内容,如果没有 [Script],可自行增加
  
# BoxJs 稳定版
  Rewrite: BoxJs = type=http-request,pattern=^https?://boxjs.com,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/chavy.box.js, requires-body=true, timeout=120

# BoxJs 测试版
  Rewrite: BoxJs = type=http-request,pattern=^https?://boxjs.net,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/box/chavy.boxjs.js, requires-body=true, timeout=120

{% endcode %}

{% hint style="warning" %} 安装完成后,请重启一次代理 {% endhint %}

访问

商店版: http://boxjs.com

测试版: http://boxjs.net

boxjs-doc's People

Contributors

chavyleung avatar gideonsenku avatar gitbook-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.