@jamiexiongr/panda 0.1.19 → 0.1.20
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 +41 -16
- package/dist/cli.mjs +18 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,20 +21,45 @@ For the complete Chinese install and usage guide in this repository, see `docs/p
|
|
|
21
21
|
npm install -g @jamiexiongr/panda@latest --registry=https://registry.npmjs.org/
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
## Usage
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
panda hub
|
|
28
|
-
panda hub tailscareserv
|
|
29
|
-
|
|
30
|
-
panda agent
|
|
31
|
-
panda agent tailscareserv
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
`tailscareserv` and `--tailscale-serve` both enable automatic `tailscale serve` publishing.
|
|
35
|
-
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
panda hub
|
|
28
|
+
panda hub tailscareserv
|
|
29
|
+
|
|
30
|
+
panda agent
|
|
31
|
+
panda agent tailscareserv
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`tailscareserv` and `--tailscale-serve` both enable automatic `tailscale serve` publishing.
|
|
35
|
+
|
|
36
|
+
## Windows Service
|
|
37
|
+
|
|
38
|
+
Windows only:
|
|
39
|
+
|
|
40
|
+
```powershell
|
|
41
|
+
panda hub service install --name=PandaHub tailscareserv
|
|
42
|
+
panda agent service install --name=PandaAgent --hub-url=http://127.0.0.1:4343
|
|
43
|
+
|
|
44
|
+
panda hub service status
|
|
45
|
+
panda agent service status
|
|
46
|
+
|
|
47
|
+
panda hub service restart
|
|
48
|
+
panda agent service restart
|
|
49
|
+
|
|
50
|
+
panda hub service uninstall
|
|
51
|
+
panda agent service uninstall
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Notes:
|
|
55
|
+
|
|
56
|
+
- `service install` registers the service for automatic startup.
|
|
57
|
+
- Extra startup args after `install` are remembered by the service and reused on restart.
|
|
58
|
+
- The current `PANDA_*` environment variables are captured when you run `service install`.
|
|
59
|
+
- If you change startup args or `PANDA_*` values later, run `service install` again to update the service definition.
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
|
|
63
|
+
- `panda hub tailscareserv` is the quickest path to a mobile-installable HTTPS PWA inside your tailnet.
|
|
64
|
+
- `panda agent tailscareserv` makes the agent register `https/wss` direct URLs when no explicit direct URL env vars are set.
|
|
40
65
|
- If `tailscale serve` says it is not enabled on your tailnet, open the approval link printed by the CLI and enable Serve for that node.
|
package/dist/cli.mjs
CHANGED
|
@@ -104,6 +104,10 @@ var printUsage = () => {
|
|
|
104
104
|
Commands:
|
|
105
105
|
agent [tailscareserv|tailscareserv-pub] [--hub-url=<url>] Start the Panda agent service
|
|
106
106
|
hub [tailscareserv|tailscareserv-pub] Start the Panda hub service with the bundled web UI
|
|
107
|
+
agent service <install|start|stop|restart|status|uninstall> [args...]
|
|
108
|
+
Manage the Panda Agent Windows service
|
|
109
|
+
hub service <install|start|stop|restart|status|uninstall> [args...]
|
|
110
|
+
Manage the Panda Hub Windows service
|
|
107
111
|
tip Set PANDA_GROUP_IP=<lan-ip> to auto-fill hub/direct/ws URLs for agent startup
|
|
108
112
|
help Show this message`);
|
|
109
113
|
};
|
|
@@ -138,7 +142,13 @@ var main = async () => {
|
|
|
138
142
|
return;
|
|
139
143
|
}
|
|
140
144
|
if (command === "agent") {
|
|
141
|
-
const { startJamiexiongrAgent } = await import("@jamiexiongr/panda-agent");
|
|
145
|
+
const { manageJamiexiongrAgentService, startJamiexiongrAgent } = await import("@jamiexiongr/panda-agent");
|
|
146
|
+
if (commandArgs[0]?.trim().toLowerCase() === "service") {
|
|
147
|
+
await manageJamiexiongrAgentService({
|
|
148
|
+
argv: commandArgs.slice(1)
|
|
149
|
+
});
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
142
152
|
await startJamiexiongrAgent({
|
|
143
153
|
tailscalePublicationMode: agentPublicationMode,
|
|
144
154
|
hubUrl: resolveCliOptionValue(commandArgs, [
|
|
@@ -154,7 +164,13 @@ var main = async () => {
|
|
|
154
164
|
return;
|
|
155
165
|
}
|
|
156
166
|
if (command === "hub") {
|
|
157
|
-
const { startJamiexiongrHub } = await import("@jamiexiongr/panda-hub");
|
|
167
|
+
const { manageJamiexiongrHubService, startJamiexiongrHub } = await import("@jamiexiongr/panda-hub");
|
|
168
|
+
if (commandArgs[0]?.trim().toLowerCase() === "service") {
|
|
169
|
+
await manageJamiexiongrHubService({
|
|
170
|
+
argv: commandArgs.slice(1)
|
|
171
|
+
});
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
158
174
|
await startJamiexiongrHub({
|
|
159
175
|
tailscalePublicationMode: hubPublicationMode
|
|
160
176
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamiexiongr/panda",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Panda combined installer",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"panda": "./bin/panda.cjs"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@jamiexiongr/panda-agent": "0.1.
|
|
12
|
-
"@jamiexiongr/panda-hub": "0.1.
|
|
11
|
+
"@jamiexiongr/panda-agent": "0.1.20",
|
|
12
|
+
"@jamiexiongr/panda-hub": "0.1.20"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"bin",
|