@easytunnel/et-sdk 1.1.0 → 1.2.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/README.md +4 -4
- package/etunnel.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Expose a local service through an etunnel reverse-tunnel server. Zero dependenci
|
|
|
6
6
|
|
|
7
7
|
Zero registration: every SDK client speaks the same tiny wire protocol
|
|
8
8
|
([PROTOCOL.md](../../PROTOCOL.md)) against any etunnel server
|
|
9
|
-
(default `wss://t.
|
|
9
|
+
(default `wss://t.etun.uk/tunnel`).
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -22,14 +22,14 @@ Requires Node >= 22.
|
|
|
22
22
|
npx @easytunnel/et-sdk 3000
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Prints `TUNNEL_URL: https://<subdomain>.t.
|
|
25
|
+
Prints `TUNNEL_URL: https://<subdomain>.t.etun.uk` — that URL now routes to
|
|
26
26
|
your local service. Ctrl-C closes the tunnel.
|
|
27
27
|
|
|
28
28
|
## Embed
|
|
29
29
|
|
|
30
30
|
```js
|
|
31
31
|
const { connect } = require('@easytunnel/et-sdk');
|
|
32
|
-
const t = await connect('wss://t.
|
|
32
|
+
const t = await connect('wss://t.etun.uk/tunnel', 3000);
|
|
33
33
|
console.log(t.url);
|
|
34
34
|
```
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ console.log(t.url);
|
|
|
37
37
|
|
|
38
38
|
| Variable | Meaning | Default |
|
|
39
39
|
|---|---|---|
|
|
40
|
-
| `ETUNNEL_SERVER` | tunnel server WebSocket URL | `wss://t.
|
|
40
|
+
| `ETUNNEL_SERVER` | tunnel server WebSocket URL | `wss://t.etun.uk/tunnel` |
|
|
41
41
|
| `ETUNNEL_LOCAL` | local port or `host:port` (or 1st CLI arg) | `3000` |
|
|
42
42
|
| `ETUNNEL_TOKEN` | paid-plan API key (optional) | - |
|
|
43
43
|
| `ETUNNEL_SUBDOMAIN` | custom subdomain (paid plans) | random |
|
package/etunnel.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// forwarded — use the Go SDK for full streaming/upgrades).
|
|
7
7
|
//
|
|
8
8
|
// const { connect } = require('./etunnel');
|
|
9
|
-
// const t = await connect('wss://t.
|
|
9
|
+
// const t = await connect('wss://t.etun.uk/tunnel', 3000);
|
|
10
10
|
// console.log(t.url);
|
|
11
11
|
|
|
12
12
|
const MAXP = 32768;
|
|
@@ -130,7 +130,7 @@ async function connect(server, local, opts = {}) {
|
|
|
130
130
|
module.exports = { connect };
|
|
131
131
|
|
|
132
132
|
if (require.main === module) {
|
|
133
|
-
const server = process.env.ETUNNEL_SERVER || 'wss://t.
|
|
133
|
+
const server = process.env.ETUNNEL_SERVER || 'wss://t.etun.uk/tunnel';
|
|
134
134
|
const local = process.env.ETUNNEL_LOCAL || process.argv[2] || '3000';
|
|
135
135
|
connect(server, local, { token: process.env.ETUNNEL_TOKEN, subdomain: process.env.ETUNNEL_SUBDOMAIN })
|
|
136
136
|
.then((t) => { console.log('TUNNEL_URL: ' + t.url); })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easytunnel/et-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Expose local services to the internet in one line of code: instant public HTTPS URLs with automatic TLS, through NAT and firewalls, no signup. Webhook-friendly ngrok-style reverse tunnel, with SDKs in 20 languages and a single-binary Go server.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|