localhostforonline 1.0.1 → 1.0.2
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 +136 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# localhostforonline
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/localhostforonline)
|
|
4
|
+
[](https://github.com/oismaelash/localhostfor.online)
|
|
5
|
+
|
|
6
|
+
**Expose your local development server to the internet in seconds.**
|
|
7
|
+
No configuration, no DNS setup, no TLS certificates — just a single command.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx localhostforonline tunnel --port 3000
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## How it works
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Visitor → localhostfor.online → secure tunnel → your machine (localhost:3000)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
1. You start a tunnel from your machine to `localhostfor.online`
|
|
22
|
+
2. The platform generates a unique public URL: `https://localhostfor.online/project-<uuid>`
|
|
23
|
+
3. Anyone with that URL can access your local server through the tunnel
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Quick start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Expose a local HTTP server on port 3000
|
|
31
|
+
npx localhostforonline tunnel --port 3000
|
|
32
|
+
|
|
33
|
+
# Output:
|
|
34
|
+
# Tunnel created!
|
|
35
|
+
# ✓ Your URL: https://localhostfor.online/project-abc123
|
|
36
|
+
# ✓ Local: localhost:3000
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Open the generated URL in your browser — your local app is now online.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
### 🔒 Secure tunnels
|
|
46
|
+
All traffic is encrypted end-to-end. Your local server is never directly exposed.
|
|
47
|
+
|
|
48
|
+
### 📊 Live dashboard
|
|
49
|
+
Monitor every request in real time:
|
|
50
|
+
- Request count, methods, paths, status codes
|
|
51
|
+
- Response time and bandwidth
|
|
52
|
+
- Full request history per tunnel
|
|
53
|
+
|
|
54
|
+
[Access the dashboard](https://localhostfor.online/dashboard)
|
|
55
|
+
|
|
56
|
+
### 🔑 Account & history
|
|
57
|
+
Link your tunnels to an account to keep permanent history:
|
|
58
|
+
1. Log in at [https://localhostfor.online/login](https://localhostfor.online/login) with your WhatsApp (via SMS OTP)
|
|
59
|
+
2. Get your personal API key
|
|
60
|
+
3. Run the tunnel with your key:
|
|
61
|
+
```
|
|
62
|
+
npx localhostforonline tunnel --port 3000 --api-key lf_sk_xxx
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 📁 Tunnel history
|
|
66
|
+
Every tunnel you create appears in the dashboard.
|
|
67
|
+
Click on any tunnel to see its full request log.
|
|
68
|
+
|
|
69
|
+
### 👤 Anonymous access
|
|
70
|
+
Even without an account, anyone with a tunnel URL can view its request history:
|
|
71
|
+
```
|
|
72
|
+
https://localhostfor.online/dashboard?token=<project-id>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## CLI usage
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
localhostforonline tunnel --port <port> # Expose a local port
|
|
81
|
+
localhostforonline tunnel --port 3000 --api-key x # Link to your account
|
|
82
|
+
localhostforonline register # Generate an auth token
|
|
83
|
+
localhostforonline login <token> # Save auth token
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Options
|
|
87
|
+
|
|
88
|
+
| Flag | Description |
|
|
89
|
+
|------|-------------|
|
|
90
|
+
| `--port` | Local port to expose |
|
|
91
|
+
| `--api-key` | API key to link tunnel to your account |
|
|
92
|
+
| `--url` | Full local URL (alternative to --port) |
|
|
93
|
+
|
|
94
|
+
### Environment variables
|
|
95
|
+
|
|
96
|
+
| Variable | Default | Description |
|
|
97
|
+
|----------|---------|-------------|
|
|
98
|
+
| `LOCALHOSTFOR_SERVER` | `localhostfor.online` | Server URL (for self-hosted or local dev) |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Platform
|
|
103
|
+
|
|
104
|
+
### Website
|
|
105
|
+
[https://localhostfor.online](https://localhostfor.online)
|
|
106
|
+
|
|
107
|
+
Endpoints:
|
|
108
|
+
- `/dashboard` — Tunnel list and request history
|
|
109
|
+
- `/dashboard?token=<id>` — Request log for a specific tunnel
|
|
110
|
+
- `/login` — Sign in with WhatsApp to get an API key
|
|
111
|
+
- `/account` — Your account details
|
|
112
|
+
|
|
113
|
+
### Infrastructure
|
|
114
|
+
- **Server**: Go (chi router + gorilla/websocket)
|
|
115
|
+
- **Database**: PostgreSQL
|
|
116
|
+
- **Tunnels**: WebSocket-based reverse proxy
|
|
117
|
+
- **Auth**: WhatsApp OTP (powered by Pilot Status)
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Self-hosting
|
|
122
|
+
|
|
123
|
+
The full stack is available on [GitHub](https://github.com/oismaelash/localhostfor.online).
|
|
124
|
+
Run your own tunnel server with Docker:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
docker compose -f docker/docker-compose.yml up -d
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Requires: Go 1.22+, PostgreSQL, Docker
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "localhostforonline",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Expose your localhost to the internet",
|
|
5
5
|
"bin": {
|
|
6
6
|
"localhostforonline": "cli.js"
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"postinstall": "node install.js"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
|
+
"cli.js",
|
|
12
13
|
"install.js",
|
|
13
|
-
"binaries/"
|
|
14
|
-
"package.json"
|
|
14
|
+
"binaries/"
|
|
15
15
|
],
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"repository": {
|