asyx 0.2.0 → 0.2.1
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 +10 -39
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Want to share your Minecraft server with friends? It's literally one command:
|
|
|
43
43
|
# 2. Run this:
|
|
44
44
|
asyx tunnel --minecraft
|
|
45
45
|
|
|
46
|
-
# 3. Share the hostname shown (e.g.,
|
|
46
|
+
# 3. Share the hostname shown (e.g., example.tunnel.asyx.ai)
|
|
47
47
|
# Your friends connect using just the hostname—no port needed!
|
|
48
48
|
```
|
|
49
49
|
|
|
@@ -65,8 +65,8 @@ That's it! No firewall configuration, no port forwarding, no DNS setup. The `--m
|
|
|
65
65
|
- **One command** to expose your local Minecraft server to the internet.
|
|
66
66
|
- Automatically configures port 25565 (override with `--port` if needed).
|
|
67
67
|
- Creates an SRV record so players can connect using just the hostname—**no port number needed**.
|
|
68
|
-
- **Example**: Run `asyx tunnel --minecraft`, then share `
|
|
69
|
-
- Optional `--name` flag for a custom subdomain (e.g., `--name my-server` → `my-server.
|
|
68
|
+
- **Example**: Run `asyx tunnel --minecraft`, then share `example.tunnel.asyx.ai` with your friends. They connect in Minecraft using just that hostname.
|
|
69
|
+
- Optional `--name` flag for a custom subdomain (e.g., `--name my-server` → `my-server.example.tunnel.asyx.ai`).
|
|
70
70
|
- That's it! No firewall rules, no port forwarding, no DNS configuration.
|
|
71
71
|
|
|
72
72
|
**TCP tunnel (for other services):**
|
|
@@ -77,7 +77,7 @@ That's it! No firewall configuration, no port forwarding, no DNS setup. The `--m
|
|
|
77
77
|
- `--port`: Local target port on `127.0.0.1` (e.g., `25565` for Minecraft on `127.0.0.1:25565`).
|
|
78
78
|
- `--name`: Optional service name; if provided, creates a CNAME alias `<name>.<subdomain>.tunnel.asyx.ai`; otherwise only `host:port` form is used.
|
|
79
79
|
- The CLI prints the assignment: `fqdn:publicPort` (alias if `--name` provided, otherwise `host:port`).
|
|
80
|
-
- Uses binary
|
|
80
|
+
- Uses Asyx binary framing over WebSocket (no user action needed; handled automatically).
|
|
81
81
|
- The relay URL in assignments uses `/tcp` endpoint (configured automatically).
|
|
82
82
|
|
|
83
83
|
3. **Clean up (optional)**
|
|
@@ -86,12 +86,12 @@ That's it! No firewall configuration, no port forwarding, no DNS setup. The `--m
|
|
|
86
86
|
```
|
|
87
87
|
Removes local device material; re-run `asyx setup` afterwards to restore access.
|
|
88
88
|
|
|
89
|
-
## What's New in v0.2.
|
|
89
|
+
## What's New in v0.2.1
|
|
90
90
|
|
|
91
91
|
- **Minecraft tunnels made easy**: New `--minecraft` verb—just run `asyx tunnel --minecraft` and share your server instantly. No port numbers, no configuration, no hassle.
|
|
92
92
|
- **SRV record support**: Minecraft clients automatically discover the correct port via DNS SRV records—players just enter the hostname.
|
|
93
93
|
- **TCP tunnel support**: Expose raw TCP services (game servers, databases, SSH) with `asyx tunnel --tcp --port <n>`
|
|
94
|
-
- **
|
|
94
|
+
- **Asyx binary framing**: Automatic protocol handling for multi-stream TCP tunneling
|
|
95
95
|
- **Coordinator-based assignments**: TCP tunnels use the same assignment system as HTTP tunnels; no additional configuration needed
|
|
96
96
|
- **Service aliases**: Optional `--name` flag for friendly service names (when aliases are provisioned)
|
|
97
97
|
|
|
@@ -114,7 +114,6 @@ asyx tunnel --http --port <n> # Start HTTP tunnel for local port <n>
|
|
|
114
114
|
asyx tunnel --minecraft # Start Minecraft tunnel (easiest way!)
|
|
115
115
|
asyx tunnel --minecraft --name <svc> # Start Minecraft tunnel with custom name
|
|
116
116
|
asyx tunnel --tcp --port <n> [--name <service>] # Start TCP tunnel for local port <n>
|
|
117
|
-
asyx mqtt ... # Development MQTT utilities (NODE_ENV=dev)
|
|
118
117
|
```
|
|
119
118
|
|
|
120
119
|
Use `asyx help` or `asyx <command> --help` for details.
|
|
@@ -134,34 +133,6 @@ ASYX_LOG_LEVEL=debug asyx tunnel --http --port 3000 # full verbosity for engine
|
|
|
134
133
|
- Structured logs (JSON) are emitted to stdout/stderr; by default, debug is suppressed.
|
|
135
134
|
- User-facing banners remain visible regardless of log level.
|
|
136
135
|
|
|
137
|
-
## MQTT Connection Mode
|
|
138
|
-
|
|
139
|
-
Control MQTT client ID generation and reconnect behavior with the `ASYX_MQTT_CLIENTID_MODE` environment variable:
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
# Modes: legacy | unique
|
|
143
|
-
# Default: unique
|
|
144
|
-
ASYX_MQTT_CLIENTID_MODE=unique asyx tunnel --http --port 3000 # unique client IDs, clean sessions (default)
|
|
145
|
-
ASYX_MQTT_CLIENTID_MODE=legacy asyx tunnel --http --port 3000 # persistent client IDs, mqtt.js auto-reconnect
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
**`unique` mode (default):**
|
|
149
|
-
- Generates a unique client ID for each CLI invocation using ULID suffixes (e.g., `baseClientId_01ABC...XYZ`)
|
|
150
|
-
- Uses clean MQTT sessions (`clean: true`) so AWS IoT doesn't retain session state between reconnects
|
|
151
|
-
- Implements manual reconnect loop with jittered exponential backoff (300ms → 600ms → 1.2s → max 5s)
|
|
152
|
-
- Immediately reconnects on `ECONNRESET` errors
|
|
153
|
-
- Prevents "identifier in use" errors from lingering AWS IoT sessions
|
|
154
|
-
|
|
155
|
-
**`legacy` mode:**
|
|
156
|
-
- Uses persistent client ID from device configuration
|
|
157
|
-
- Uses persistent MQTT sessions (`clean: false`) allowing AWS IoT to retain session state
|
|
158
|
-
- Relies on mqtt.js built-in auto-reconnect behavior
|
|
159
|
-
- Useful for compatibility with older deployments or debugging
|
|
160
|
-
|
|
161
|
-
**When to use each mode:**
|
|
162
|
-
- Use `unique` (default) for production deployments to avoid lingering session issues
|
|
163
|
-
- Use `legacy` only if you need to maintain session state across reconnects or are debugging specific MQTT behavior
|
|
164
|
-
|
|
165
136
|
## Heartbeat Behavior
|
|
166
137
|
|
|
167
138
|
The CLI manages heartbeats automatically to keep idle sessions stable without user tuning.
|
|
@@ -181,7 +152,7 @@ HTTP tunnels support per-guest authentication via Asyx Quickpass security groups
|
|
|
181
152
|
|
|
182
153
|
TCP tunnels in v4.1 do not enforce per-guest authentication. Access is owner-only via JWT validation; guests connecting to the public port are anonymous (no per-connection auth). TCP tunnels honor relay-level limits:
|
|
183
154
|
|
|
184
|
-
**Minecraft Tunnels (v0.2.
|
|
155
|
+
**Minecraft Tunnels (v0.2.1+):**
|
|
185
156
|
|
|
186
157
|
The `--minecraft` verb makes sharing your Minecraft server incredibly simple:
|
|
187
158
|
|
|
@@ -190,7 +161,7 @@ The `--minecraft` verb makes sharing your Minecraft server incredibly simple:
|
|
|
190
161
|
asyx tunnel --minecraft
|
|
191
162
|
|
|
192
163
|
# Share the hostname with friends (no port needed!)
|
|
193
|
-
# Example:
|
|
164
|
+
# Example: example.tunnel.asyx.ai
|
|
194
165
|
```
|
|
195
166
|
|
|
196
167
|
**How it works:**
|
|
@@ -201,12 +172,12 @@ asyx tunnel --minecraft
|
|
|
201
172
|
**With a custom name:**
|
|
202
173
|
```bash
|
|
203
174
|
asyx tunnel --minecraft --name my-server
|
|
204
|
-
# Share: my-server.
|
|
175
|
+
# Share: my-server.example.tunnel.asyx.ai
|
|
205
176
|
```
|
|
206
177
|
|
|
207
178
|
**Technical details:**
|
|
208
179
|
- **SRV-aware clients (Minecraft)**: Use the hostname directly (with or without `--name`). The Minecraft launcher automatically discovers the port via the SRV record.
|
|
209
|
-
- **Non-SRV-aware clients**: Use the `hostname:port` format (e.g., `
|
|
180
|
+
- **Non-SRV-aware clients**: Use the `hostname:port` format (e.g., `example.tunnel.asyx.ai:10000`).
|
|
210
181
|
- **SRV record format**: `_minecraft._tcp.<host>` → target `<fqdn>`, port `<publicPort>`
|
|
211
182
|
- With `--name`: `_minecraft._tcp.<name>.<subdomain>.tunnel.asyx.ai`
|
|
212
183
|
- Without `--name`: `_minecraft._tcp.<subdomain>.tunnel.asyx.ai`
|