dsh-vpn 0.1.3 → 0.1.4
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/README.md +21 -10
- package/assets/vpn-ops.md +11 -7
- package/lib/client.js +2 -2
- package/lib/skill.js +1 -1
- package/package.json +9 -6
package/README.md
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
# dsh-vpn
|
|
2
2
|
|
|
3
|
-
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
3
|
+
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 插件:在**你自己的 VPS** 上一键部署加密的 VPN 服务,保护你的网络连接安全。在 dsh 里填好 VPS 的 IP、端口、用户名和密码,一键部署 sing-box,然后扫二维码导入手机或电脑上的客户端。
|
|
4
|
+
|
|
5
|
+
## 用途:保护你的网络安全
|
|
6
|
+
|
|
7
|
+
- **加密你的网络流量。** 在公共 Wi-Fi(咖啡馆、机场、酒店)等不可信网络上,你设备和服务器之间的全部流量都经过加密,别人无法窃听或篡改。
|
|
8
|
+
- **保护隐私。** 同一网络上的其他人和网络运营方看不到你访问的内容。
|
|
9
|
+
- **服务器由你自己掌控。** 服务部署在你自己的 VPS 上,不经过任何第三方 VPN 服务商,数据只在你的设备和你的服务器之间传输。
|
|
10
|
+
- **默认安全的配置。** 协议之间的密钥各自独立、随机生成;推荐的 IP 证书让客户端正常校验服务器身份,防止中间人攻击。
|
|
11
|
+
|
|
12
|
+
请在遵守所在地法律法规和服务器提供商服务条款的前提下使用。
|
|
13
|
+
|
|
14
|
+
## 特性
|
|
4
15
|
|
|
5
16
|
- **不依赖本机的 ssh 命令**:内置纯 JS 的 SSH 客户端([ssh2](https://github.com/mscdex/ssh2)),用密码登录。
|
|
6
17
|
- **两种用法**:在设置页点按钮,或者直接对 agent 说“帮我装个节点”。
|
|
@@ -101,20 +112,12 @@ DSH_SRC=/path/to/deepseek-harness pnpm typecheck # 对照 dsh 源码做宿主
|
|
|
101
112
|
|
|
102
113
|
npm 上的 `@deepseek-ai/*` 包版本过旧,所以 `build` 不做类型检查,类型检查对照 dsh 源码单独进行。
|
|
103
114
|
|
|
104
|
-
## 发布
|
|
105
|
-
|
|
106
|
-
推送与 `package.json` 版本号一致的标签,GitHub Actions 会先跑测试,再发布到 npm。需要在仓库 Secrets 里配置 `NPM_TOKEN`。仓库是私有的,npm 不支持为私有仓库生成来源证明(provenance),所以发布时不带来源证明:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
git tag v0.1.0 && git push origin v0.1.0
|
|
110
|
-
```
|
|
111
|
-
|
|
112
115
|
端到端测试会在目标机器上**安装再卸载**,并用 sing-box 客户端实测每种协议的连通性。本地可以用 [Lima](https://lima-vm.io) 虚拟机:
|
|
113
116
|
|
|
114
117
|
```bash
|
|
115
118
|
limactl start --name=vps --vm-type=vz --network=vzNAT --set '.mounts=[]' template:ubuntu-24.04
|
|
116
119
|
# 在虚拟机里开启 sshd 的密码登录并设置密码,然后:
|
|
117
|
-
DSH_VPN_E2E_HOST
|
|
120
|
+
DSH_VPN_E2E_HOST=<测试虚拟机 IP> DSH_VPN_E2E_USER=root DSH_VPN_E2E_PASSWORD=… pnpm test:e2e
|
|
118
121
|
```
|
|
119
122
|
|
|
120
123
|
防火墙测试会依次启用 ufw、firewalld、iptables、nftables,**只能在测试虚拟机上运行**:
|
|
@@ -132,6 +135,14 @@ DSH_VPN_E2E_ACME=https://localhost:14000/dir DSH_VPN_E2E_HOST=… pnpm test:e2e
|
|
|
132
135
|
|
|
133
136
|
在插件配置里设置 `acmeProvider`,就可以让插件改用 Pebble 或其他 ACME 服务器。
|
|
134
137
|
|
|
138
|
+
## 发布
|
|
139
|
+
|
|
140
|
+
推送与 `package.json` 版本号一致的标签,GitHub Actions 会先跑测试,再发布到 npm。需要在仓库 Secrets 里配置 `NPM_TOKEN`。仓库是私有的,npm 不支持为私有仓库生成来源证明(provenance),所以发布时不带来源证明:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
git tag v0.1.0 && git push origin v0.1.0
|
|
144
|
+
```
|
|
145
|
+
|
|
135
146
|
## TODO
|
|
136
147
|
|
|
137
148
|
- [ ] SSH 私钥登录
|
package/assets/vpn-ops.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# vpn-ops
|
|
2
2
|
|
|
3
|
-
Deploy and operate a personal sing-box
|
|
3
|
+
Deploy and operate a personal, encrypted VPN (sing-box) on the user's own VPS. The plugin logs in over SSH with the password saved in dsh Settings (bottom-left gear) → VPN 设置. No local ssh client is needed.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This is a security and privacy tool. It encrypts all traffic between the user's devices and a server they control, so connections stay private on untrusted networks such as public Wi-Fi, without relying on a third-party VPN provider. Describe it in those terms, and remind the user to use it in line with local laws and their server provider's terms of service.
|
|
4
8
|
|
|
5
9
|
## Workflow
|
|
6
10
|
|
|
@@ -19,11 +23,11 @@ The settings page offers **self-signed** (default) or **IP certificate** (recomm
|
|
|
19
23
|
|
|
20
24
|
| id | Name | Transport | Notes |
|
|
21
25
|
|---|---|---|---|
|
|
22
|
-
| `reality` | VLESS Reality | TCP | Default.
|
|
26
|
+
| `reality` | VLESS Reality | TCP | Default. Strong encryption; the handshake looks like ordinary HTTPS to a well-known website, which keeps usage private. |
|
|
23
27
|
| `hy2` | Hysteria2 | UDP | Default. Fast on lossy links; the link pins the certificate. |
|
|
24
28
|
| `tuic` | TUIC v5 | UDP | With a self-signed cert, clients skip verification; with an IP certificate, they verify normally. |
|
|
25
29
|
| `anytls` | AnyTLS | TCP | Same as TUIC. |
|
|
26
|
-
| `ss` | Shadowsocks 2022 | TCP+UDP | Widely supported
|
|
30
|
+
| `ss` | Shadowsocks 2022 | TCP+UDP | Widely supported, modern AEAD encryption, no TLS layer. |
|
|
27
31
|
|
|
28
32
|
## Troubleshooting
|
|
29
33
|
|
|
@@ -31,7 +35,7 @@ The settings page offers **self-signed** (default) or **IP certificate** (recomm
|
|
|
31
35
|
|---|---|---|
|
|
32
36
|
| `auth_failed` | Wrong username or password | User fixes it on the settings page |
|
|
33
37
|
| `host_key_mismatch` | Server reinstalled or replaced, or a man-in-the-middle | Ask whether the server was reinstalled. Only then may the user click 重置指纹 (Reset fingerprint) |
|
|
34
|
-
| `connect_failed` / `timeout` | Wrong IP or port, SSH
|
|
38
|
+
| `connect_failed` / `timeout` | Wrong IP or port, SSH not reachable, server down | Check the IP and SSH port on the settings page |
|
|
35
39
|
| `sudo_failed` | User is not root and lacks sudo, or the sudo password differs | Use root, or grant sudo |
|
|
36
40
|
| `no_systemd` | Container or OpenRC VPS | Not supported yet |
|
|
37
41
|
| `download_failed` | VPS cannot reach GitHub | Retry later |
|
|
@@ -39,8 +43,8 @@ The settings page offers **self-signed** (default) or **IP certificate** (recomm
|
|
|
39
43
|
| `port80_in_use` | Another program (nginx, …) holds port 80 | Stop it, or use self-signed |
|
|
40
44
|
| Status says the certificate expires within 24 h or has expired | Renewal failing | Open TCP 80; an expired certificate breaks every TLS protocol |
|
|
41
45
|
| Installed and active, but the client times out | Cloud security group (the VPS firewall is handled automatically) | Open the ports from `result.firewall.opened` in the cloud console |
|
|
42
|
-
| Reality fails, others work |
|
|
43
|
-
| UDP protocols fail, TCP works |
|
|
44
|
-
| Everything stopped after working | IP
|
|
46
|
+
| Reality fails, others work | The Reality handshake site (SNI) is unreachable from the server | Reinstall with another SNI (future option) |
|
|
47
|
+
| UDP protocols fail, TCP works | The current network drops or rate-limits UDP (common on some Wi-Fi and mobile networks) | Use Reality or AnyTLS |
|
|
48
|
+
| Everything stopped after working | The server IP or its ports are no longer reachable from the user's network | `vpn_install` with `regenerate: true` for new ports; if it is still unreachable, check with the server provider |
|
|
45
49
|
|
|
46
50
|
Never paste passwords, private keys or the state file into chat. Share links are secrets too: show them only to the user.
|
package/lib/client.js
CHANGED
|
@@ -63,7 +63,7 @@ var NS = "dsh-vpn";
|
|
|
63
63
|
var zh = {
|
|
64
64
|
title: "VPN \u8282\u70B9",
|
|
65
65
|
nav: "VPN \u8BBE\u7F6E",
|
|
66
|
-
description: "\u5728\u4F60\u7684 VPS \u4E0A\u4E00\u952E\u90E8\u7F72
|
|
66
|
+
description: "\u5728\u4F60\u81EA\u5DF1\u7684 VPS \u4E0A\u4E00\u952E\u90E8\u7F72\u52A0\u5BC6 VPN\uFF0C\u4FDD\u62A4\u4F60\u5728\u516C\u5171 Wi-Fi \u7B49\u7F51\u7EDC\u4E2D\u7684\u8FDE\u63A5\u5B89\u5168\u548C\u9690\u79C1\uFF1B\u626B\u7801\u5373\u53EF\u5BFC\u5165\u624B\u673A\u6216\u7535\u8111\u4E0A\u7684\u5BA2\u6237\u7AEF\u3002",
|
|
67
67
|
serverSection: "\u670D\u52A1\u5668",
|
|
68
68
|
host: "\u670D\u52A1\u5668 IP \u6216\u57DF\u540D",
|
|
69
69
|
hostHint: "\u4F60\u8D2D\u4E70\u7684 VPS \u7684\u516C\u7F51\u5730\u5740\u3002",
|
|
@@ -154,7 +154,7 @@ var zh = {
|
|
|
154
154
|
var en = {
|
|
155
155
|
title: "VPN node",
|
|
156
156
|
nav: "VPN",
|
|
157
|
-
description: "Deploy
|
|
157
|
+
description: "Deploy an encrypted VPN to your own VPS in one click to keep your connections private and secure on networks like public Wi-Fi; import it into client apps by scanning QR codes.",
|
|
158
158
|
serverSection: "Server",
|
|
159
159
|
host: "Server IP or domain",
|
|
160
160
|
hostHint: "Public address of your VPS.",
|
package/lib/skill.js
CHANGED
|
@@ -19,7 +19,7 @@ var RESOURCE_BASE = {
|
|
|
19
19
|
};
|
|
20
20
|
var CANDIDATE = {
|
|
21
21
|
name: "vpn-ops",
|
|
22
|
-
description: "Deploy, inspect and troubleshoot a personal
|
|
22
|
+
description: "Deploy, inspect and troubleshoot a personal encrypted VPN (sing-box) on the user's own VPS over ssh, to protect their connections on untrusted networks. Use when the user wants to set up a VPN/proxy node on a server, get node links, or fix a node that stopped working.",
|
|
23
23
|
invocation: { modelInvocable: true, userInvocable: true },
|
|
24
24
|
provider: PROVIDER_NAME,
|
|
25
25
|
source: "bundled",
|
package/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vpn",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "DeepSeek Harness plugin:
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "DeepSeek Harness plugin: deploy an encrypted VPN (sing-box) to your own VPS in one click, to protect your connections and privacy on untrusted networks",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"anytls",
|
|
6
7
|
"dsh-plugin",
|
|
7
|
-
"
|
|
8
|
-
"reality",
|
|
8
|
+
"encryption",
|
|
9
9
|
"hysteria2",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"privacy",
|
|
11
|
+
"reality",
|
|
12
|
+
"security",
|
|
12
13
|
"shadowsocks",
|
|
14
|
+
"sing-box",
|
|
15
|
+
"tuic",
|
|
13
16
|
"vpn"
|
|
14
17
|
],
|
|
15
18
|
"license": "MIT",
|