@lucky_zone/net-proxy 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +32 -2
- package/client.js +747 -0
- package/cordis.patch.yml +4 -0
- package/icon.svg +11 -0
- package/index.js +522 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +45 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lucky_zone
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Network proxy
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Routes only the domains you list through one proxy server; every other host connects directly.
|
|
4
|
+
|
|
5
|
+
## Use
|
|
6
|
+
|
|
7
|
+
- **Left sidebar → Network proxy**: the panel shows what is routed and edits the same settings.
|
|
8
|
+
- **Plugins → Network proxy** (click the row title): the row's configuration page with the same fields.
|
|
9
|
+
|
|
10
|
+
Fill in **Proxy server** (for example `http://127.0.0.1:7890`), list the **Proxied domains** that must go through it, turn on **Use proxy**, and click **Save**. Turning it off, or disabling the plugin, returns the process to the launch environment's own proxy settings.
|
|
11
|
+
|
|
12
|
+
## How domains match
|
|
13
|
+
|
|
14
|
+
- One per line or comma-separated; blanks and repeats are dropped.
|
|
15
|
+
- An entry matches the host and every subdomain under it: `github.com` also covers `api.github.com` and `codeload.github.com`.
|
|
16
|
+
- An entry may carry a port, such as `example.com:8080`; `*` routes every host through the proxy.
|
|
17
|
+
- CIDR ranges are not matched.
|
|
18
|
+
- `localhost`, `127.0.0.0/8`, `::1`, and `0.0.0.0` always connect directly, so the Web UI and local services never enter the proxy.
|
|
19
|
+
|
|
20
|
+
## What the proxy covers
|
|
21
|
+
|
|
22
|
+
- The Host's own `fetch` traffic for listed hosts: model requests, web fetch, and HTTP MCP. If your model endpoint also needs the proxy, add its host to the list.
|
|
23
|
+
- Commands and terminals started after the change. A shell that was already running keeps the environment it started with.
|
|
24
|
+
- Unlisted hosts connect directly from the same process and shell.
|
|
25
|
+
|
|
26
|
+
The plugin runs a small router on loopback and points the harness's proxy policy at it, because an environment bypass list cannot express "only these hosts". The router tunnels a listed host through your proxy and reaches any other host directly.
|
|
27
|
+
|
|
28
|
+
## Limitations
|
|
29
|
+
|
|
30
|
+
- Only `http://` and `https://` proxy URLs are used; a SOCKS URL is refused and requests connect directly.
|
|
31
|
+
- A proxy URL that carries a username and password is stored in the profile's configuration file in plain text.
|
|
32
|
+
- While the proxy is on and unreachable, requests to the listed domains fail until you turn it off or remove them from the list.
|
|
33
|
+
- The router listens on loopback only; other machines cannot use it.
|