Skip to content

Commit 7834594

Browse files
committed
minor fixes
1 parent bad0fa2 commit 7834594

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@ It is a really simple project. Essentially, it is an HTTP server (Worker) + simp
44

55
The main limitation is that it does not stream neither the request nor the response. This means that the whole request and response body data has to fit in memory (and likely be under ~100MB to fit into CF workers memory limitations).
66

7+
## How to use
8+
9+
Create a [Cloudflare account](https://www.cloudflare.com/) on the Free plan, or if you plan to test thousands of tunnels try the [Workers Paid](https://developers.cloudflare.com/workers/platform/pricing/) plan.
10+
11+
[Install Node.js](https://nodejs.org/en/download). Tested on `v22.14.0`.
12+
13+
Clone the repo:
14+
15+
```bash
16+
git clone https://github.com/peter-leonov/webhooks-proxy-tunnel.git
17+
cd webhooks-proxy-tunnel
18+
# this step might ask you to log in
19+
( cd worker && npm i && npm run deploy )
20+
```
21+
22+
Then open the URL that the deploment gave you and follow the instructions.
23+
24+
## Monorepo layout
25+
726
The monorepo is:
827

928
- the CF [worker](./worker) that does most of the work

worker/README.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,3 @@ npm run deploy
99
```
1010

1111
Play with the protocol using [wscat](https://github.com/websockets/wscat).
12-
13-
## How to use
14-
15-
Create a [Cloudflare account](https://www.cloudflare.com/) on the Free plan, or if you plan to test thousands of tunnels try the [Workers Paid](https://developers.cloudflare.com/workers/platform/pricing/) plan.
16-
17-
[Install Node.js](https://nodejs.org/en/download). Tested on `v22.14.0`.
18-
19-
Clone the repo:
20-
21-
```bash
22-
git clone https://github.com/peter-leonov/webhooks-proxy-tunnel.git
23-
cd webhooks-proxy-tunnel
24-
# this step might ask you to log in
25-
( cd worker && npm i && npm run deploy )
26-
```
27-
28-
Then open the URL that the deploment gave you and follow the instructions.

worker/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,10 @@ function indexPage(origin: string): string {
211211
<p>Public URL: <code>${origin}/proxy/</code></p>
212212
<p>Tunnel URL: <code>${origin}/tunnel</code></p>
213213
<p>
214-
Local server URL: <input type="text" value="http://localhost:3000/" id="target-input" />
214+
Local server URL: <input type="text" value="http://localhost:3000" id="target-input" />
215215
Client command:
216216
<pre><code>cd webhooks-proxy-tunnel/client
217-
node src/client.js ${origin}/tunnel <span id="target-span">http://localhost:3000/</span>
217+
node src/index.js ${origin}/tunnel <span id="target-span">http://localhost:3000</span>
218218
</code></pre>
219219
Connecting a new client kicks out the currently connected one.
220220
</p>

0 commit comments

Comments
 (0)