From ee458e28b65d9853405dbe22e77857e0df153438 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 19 Nov 2025 15:13:32 +0530 Subject: [PATCH 1/6] Docs: Update JT docs to add a section about performance --- tools/docker/README.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index fbb87f1511246..33cd065a75e15 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -269,7 +269,7 @@ define( 'JETPACK__SANDBOX_DOMAIN', '{your sandbox}.wordpress.com' ); ## Jurassic Tube Tunneling Service -This is for Automatticians only. More information: PCYsg-snO-p2. +This is for Automatticians only. More information: PCYsg-GJ2-p2. If you have persistent trouble with the `jetpack docker jt-*` commands complaining that "Tunneling scripts are not installed", it could be because Docker wasn't running properly when you ran the installer. @@ -363,6 +363,41 @@ You should now be able to configure [Jetpack Backup & Scan](https://jetpack.com/ - Server password: `wordpress` - WordPress installation path: `/var/www/html` +### Improved performance when tunneling + +Loading tunnelled local sites like Jurassic Tube or ngrok can sometimes be needlessly slow. ngrok and JT add a significant overhead. Depending on where you live, there can be a considerable delay for most browser requests. + +**Solution**: Make the site reachable from the outside world, but _when working locally, load everything locally_ without tunneling using reverse proxy. + +#### Setup +1. Install [Caddy](https://formulae.brew.sh/formula/caddy) + + Why Caddy? The hosts file can’t include ports – it only maps `your-test-site.example.com` to `127.0.0.1`. Caddy’s reverse proxy shuttles HTTP(S) traffic from the Jurassic Tube site to the local Docker address, including the port. + + ```sh + brew install caddy + ``` + +2. Edit hosts file + + Add this line: + + ``` + 127.0.0.1 localhost your-test-site.example.com + ``` + +3. Start Jurassic Tube tunnel or ngrok + +4. Run Caddy + + ```sh + caddy reverse-proxy --from your-test-site.example.com --to localhost:80 --internal-certs --disable-redirects + ``` + + `--internal-certs` and `--disable-redirects` is needed if you want to use HTTPS. More about it [here](https://caddyserver.com/docs/command-line#caddy-reverse-proxy). + +That’s it! + ## Custom plugins & themes in the container Jetpack Docker environment can be wonderful for developing your own plugins and themes, too. From bc8d9a87a16114af285f8fca9372b84b3af367d8 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 19 Nov 2025 16:04:53 +0530 Subject: [PATCH 2/6] Apply suggestion from @simison Co-authored-by: Mikael Korpela --- tools/docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index 33cd065a75e15..5647acf3105d9 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -365,7 +365,7 @@ You should now be able to configure [Jetpack Backup & Scan](https://jetpack.com/ ### Improved performance when tunneling -Loading tunnelled local sites like Jurassic Tube or ngrok can sometimes be needlessly slow. ngrok and JT add a significant overhead. Depending on where you live, there can be a considerable delay for most browser requests. +Loading tunnelled local sites like Jurassic Tube or Ngrok can sometimes be needlessly slow. Ngrok and JT add a significant overhead. Depending on where you live, there can be a considerable delay for most browser requests. **Solution**: Make the site reachable from the outside world, but _when working locally, load everything locally_ without tunneling using reverse proxy. From 7db4851674d615b5491abda3ec9326d38474fffc Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 19 Nov 2025 16:05:00 +0530 Subject: [PATCH 3/6] Apply suggestion from @simison Co-authored-by: Mikael Korpela --- tools/docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index 5647acf3105d9..c2c7d15bee946 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -386,7 +386,7 @@ Loading tunnelled local sites like Jurassic Tube or Ngrok can sometimes be needl 127.0.0.1 localhost your-test-site.example.com ``` -3. Start Jurassic Tube tunnel or ngrok +3. Start Jurassic Tube tunnel or Ngrok 4. Run Caddy From e9939614b9c2da330d80ea806dee3639adba2e17 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 19 Nov 2025 16:05:13 +0530 Subject: [PATCH 4/6] Apply suggestion from @simison Co-authored-by: Mikael Korpela --- tools/docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index c2c7d15bee946..e80f154b0be5a 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -394,7 +394,7 @@ Loading tunnelled local sites like Jurassic Tube or Ngrok can sometimes be needl caddy reverse-proxy --from your-test-site.example.com --to localhost:80 --internal-certs --disable-redirects ``` - `--internal-certs` and `--disable-redirects` is needed if you want to use HTTPS. More about it [here](https://caddyserver.com/docs/command-line#caddy-reverse-proxy). + `--internal-certs` and `--disable-redirects` is needed if you want to use HTTPS. [Read more](https://caddyserver.com/docs/command-line#caddy-reverse-proxy). That’s it! From 9a729d2bc4b3e3f663050c7e5e1fad273782a6fc Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 19 Nov 2025 16:05:48 +0530 Subject: [PATCH 5/6] Fix language --- tools/docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index e80f154b0be5a..2b28c0c0dae4f 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -394,7 +394,7 @@ Loading tunnelled local sites like Jurassic Tube or Ngrok can sometimes be needl caddy reverse-proxy --from your-test-site.example.com --to localhost:80 --internal-certs --disable-redirects ``` - `--internal-certs` and `--disable-redirects` is needed if you want to use HTTPS. [Read more](https://caddyserver.com/docs/command-line#caddy-reverse-proxy). + `--internal-certs` and `--disable-redirects` are needed if you want to use HTTPS. [Read more](https://caddyserver.com/docs/command-line#caddy-reverse-proxy). That’s it! From 3bcedd61478cee461d2cb67d3df9b5cf923bc8be Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Thu, 20 Nov 2025 10:02:14 +0530 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: Brad Jorsch Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- tools/docker/README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/docker/README.md b/tools/docker/README.md index 2b28c0c0dae4f..e5a8001cc54d9 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -365,21 +365,26 @@ You should now be able to configure [Jetpack Backup & Scan](https://jetpack.com/ ### Improved performance when tunneling -Loading tunnelled local sites like Jurassic Tube or Ngrok can sometimes be needlessly slow. Ngrok and JT add a significant overhead. Depending on where you live, there can be a considerable delay for most browser requests. +Loading tunnelled local sites like Jurassic Tube or Ngrok can sometimes be slow due to all traffic having to go to the server and back. Depending on where you live, there can be a considerable delay for most browser requests. -**Solution**: Make the site reachable from the outside world, but _when working locally, load everything locally_ without tunneling using reverse proxy. +**Solution**: Make the site reachable from the outside world, but _when working locally, load everything locally_, without tunneling, using a reverse proxy. #### Setup 1. Install [Caddy](https://formulae.brew.sh/formula/caddy) - Why Caddy? The hosts file can’t include ports – it only maps `your-test-site.example.com` to `127.0.0.1`. Caddy’s reverse proxy shuttles HTTP(S) traffic from the Jurassic Tube site to the local Docker address, including the port. + Why Caddy? The developer environment only listens for HTTP traffic, not HTTPS traffic. Caddy accepts the HTTPS connection and proxies the request to the developer environment. ```sh brew install caddy ``` -2. Edit hosts file +2. Edit the hosts file (`/etc/hosts` on macOS/Linux) as an administrator (requires `sudo` privileges) + For example, you can run: + + ```sh + sudo nano /etc/hosts + ``` Add this line: ``` @@ -394,7 +399,7 @@ Loading tunnelled local sites like Jurassic Tube or Ngrok can sometimes be needl caddy reverse-proxy --from your-test-site.example.com --to localhost:80 --internal-certs --disable-redirects ``` - `--internal-certs` and `--disable-redirects` are needed if you want to use HTTPS. [Read more](https://caddyserver.com/docs/command-line#caddy-reverse-proxy). + `--internal-certs` and `--disable-redirects` are needed for HTTPS. [Read more](https://caddyserver.com/docs/command-line#caddy-reverse-proxy). That’s it!