explaingit

chavyleung/scripts

Analysis updated 2026-07-03

5,511JavaScriptAudience · generalComplexity · 3/5LicenseSetup · moderate

TLDR

This repo contains BoxJs, a browser-based settings panel for managing scripts inside iOS proxy apps like Surge and Shadowrocket, and Env.js, a helper library that makes your scripts work the same way across different proxy apps.

Mindmap

mindmap
  root((repo))
    BoxJs
      Browser settings panel
      Proxy app plugin
      Visit boxjs.com
    Env.js
      Cross-app helper
      HTTP client
      Persistent storage
    Supported apps
      Surge
      Shadowrocket
      Quantumult X
      Loon and Stash
    Tech stack
      JavaScript
    License
      GPL open source
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Install BoxJs to get a graphical interface in your browser for managing scripts running inside your iOS proxy app.

USE CASE 2

Use Env.js in your own scripts so the same script works identically in Surge, Shadowrocket, and Quantumult X without changes.

USE CASE 3

Write a proxy script that saves and retrieves data between runs using the persistent storage functions in Env.js.

What is it built with?

JavaScript

How does it compare?

chavyleung/scriptscallmecavs/layzr.jsfreestylefly/awesome-gpt-image-2
Stars5,5115,5085,508
LanguageJavaScriptJavaScriptJavaScript
Setup difficultymoderateeasyeasy
Complexity3/52/51/5
Audiencegeneraldevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires an iOS proxy app like Surge or Quantumult X, BoxJs is installed by adding a rewrite module URL to your proxy app's settings.

Licensed under the GPL, which means you can use and modify the code freely, but any changes you distribute must also be shared as open source under the same license.

In plain English

This repository contains two related projects used with network proxy tools on iOS: BoxJs and Env.js. The README is written primarily in Chinese, so this explanation is based on the portions that are in English and the context provided by the code structure. BoxJs is a single-page web application that acts as a management interface for scripts running inside iOS proxy apps such as Shadowrocket, Surge, Quantumult X, Loon, and Stash. These are apps that intercept and modify network traffic on an iPhone or iPad. BoxJs adds a settings panel accessible through the browser at boxjs.com after you install the corresponding plugin for your proxy app. It gives you a graphical way to configure scripts that would otherwise require editing text files. Env.js is a JavaScript helper library included in this repository. Script authors embed it at the bottom of their scripts to get a consistent set of utilities across different proxy apps. The library provides an HTTP client that supports GET, POST, PUT, DELETE, and other request methods. It also provides functions for reading and writing persistent data, meaning a script can save values between runs. The same script can then work identically whether it is running inside Surge, Quantumult X, or another supported app, because Env.js handles the differences between those environments. To use BoxJs, you install the appropriate rewrite module for your proxy app using the installation links in the README, then visit boxjs.com in a browser while the proxy is active. To use Env.js in your own scripts, you include the minified version at the end of your script file and call its functions from the top. The project is licensed under the GPL and has a Telegram group for discussion.

Copy-paste prompts

Prompt 1
How do I install BoxJs in Surge on iOS to get a settings panel for my scripts? Walk me through the rewrite module installation and how to open the interface.
Prompt 2
Show me how to include Env.js at the bottom of an iOS proxy script and use it to make an HTTP GET request that works in both Surge and Quantumult X.
Prompt 3
Using Env.js, write a proxy script that reads a stored value, increments it, and saves it back, compatible with Shadowrocket and Surge.
Prompt 4
How do I visit boxjs.com to access the BoxJs management interface after I have installed the rewrite module for my proxy app?
Prompt 5
What is the difference between BoxJs and Env.js in this repo, and when would I use each one?

Frequently asked questions

What is scripts?

This repo contains BoxJs, a browser-based settings panel for managing scripts inside iOS proxy apps like Surge and Shadowrocket, and Env.js, a helper library that makes your scripts work the same way across different proxy apps.

What language is scripts written in?

Mainly JavaScript. The stack also includes JavaScript.

What license does scripts use?

Licensed under the GPL, which means you can use and modify the code freely, but any changes you distribute must also be shared as open source under the same license.

How hard is scripts to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is scripts for?

Mainly general.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub chavyleung on gitmyhub

Verify against the repo before relying on details.