tnmn-cli 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.
Files changed (3) hide show
  1. package/README.md +103 -0
  2. package/dist/tnmn.js +8210 -0
  3. package/package.json +42 -0
package/README.md ADDED
@@ -0,0 +1,103 @@
1
+ # tnmn-cli
2
+
3
+ > TNMN Tunnel CLI — expose local services to the internet via secure WebSocket tunnels.
4
+ > Built on HashiCorp Yamux stream multiplexing over WebSocket.
5
+
6
+ ## Requirements
7
+
8
+ - Node.js ≥ 18
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ # Install globally
14
+ npm install -g tnmn-cli
15
+
16
+ # Or build from source
17
+ npm install
18
+ npm run build
19
+ ```
20
+
21
+ ## Quick Start
22
+
23
+ ```bash
24
+ # Authenticate
25
+ tnmn login
26
+
27
+ # Create an HTTP tunnel
28
+ tnmn http -l 3000
29
+
30
+ # Create a TCP tunnel (SSH, etc.)
31
+ tnmn tcp -l 22
32
+
33
+ # Create a UDP tunnel (DNS, etc.)
34
+ tnmn udp -l 53
35
+
36
+ # Create an RDP tunnel (Remote Desktop)
37
+ tnmn rdp -l 3389
38
+ ```
39
+
40
+ ## Commands
41
+
42
+ | Command | Description |
43
+ |---------|-------------|
44
+ | `tnmn http -l <addr>` | HTTP tunnel |
45
+ | `tnmn tcp -l <addr>` | TCP tunnel |
46
+ | `tnmn udp -l <addr>` | UDP tunnel |
47
+ | `tnmn rdp -l <addr>` | RDP tunnel |
48
+ | `tnmn login` | Authenticate interactively |
49
+ | `tnmn register` | Create a new account |
50
+ | `tnmn status` | Show tunnel metrics |
51
+ | `tnmn logout` | Remove stored token |
52
+
53
+ ## Global Flags
54
+
55
+ | Flag | Default | Description |
56
+ |------|---------|-------------|
57
+ | `--server` | `connect.tnmn.click` | TNMN server URL |
58
+ | `--token` | from config | Auth token |
59
+ | `--insecure` | `false` | Skip TLS verification (dev only) |
60
+
61
+ ## Configuration
62
+
63
+ On first run, `tnmn` stores config in:
64
+
65
+ - **Windows:** `%APPDATA%\tnmn\config.json`
66
+ - **Unix:** `~/.tnmn/config.json`
67
+
68
+ You can also set the token via the `TNMN_TOKEN` environment variable.
69
+
70
+ ## Protocol Support
71
+
72
+ | Protocol | Use case |
73
+ |----------|----------|
74
+ | `http` | Web apps, REST APIs |
75
+ | `tcp` | SSH, game servers, databases |
76
+ | `udp` | DNS, VoIP, streaming |
77
+ | `rdp` | Windows Remote Desktop |
78
+
79
+ ## Architecture
80
+
81
+ ```
82
+ CLI → REST API (auth) → WebSocket + Yamux → TNMN Server → Public URL
83
+
84
+ Your local service
85
+ ```
86
+
87
+ - **WebSocket** carries the Yamux session
88
+ - **Yamux** multiplexes multiple streams over a single connection
89
+ - **4-byte big-endian prefix** frames UDP packets (exact Go protocol convention)
90
+
91
+ ## Development
92
+
93
+ ```bash
94
+ # Run tests
95
+ npm test
96
+
97
+ # Build distributable
98
+ npm run build
99
+ ```
100
+
101
+ ## License
102
+
103
+ ISC