English · 简体中文
Open Linux localhost web apps from Windows through Tailscale and a locked-down OpenSSH tunnel.
No fixed Tailscale IPs, hand-edited SSH keys, or Linux-side daemon.
Download · Quick start · Installation guide · Troubleshooting · Security model
Note
The latest stable release is v2.3.1, available as an unsigned per-user
Windows installer and a verified portable ZIP. It adds per-service restart
actions with confirmation and audit, an optional Linux control daemon
(jkbridge-ctl) for restart, logs, and status, desktop alerts when a service
breaks, a configurable health-check interval, and restart tokens kept in the
Windows credential store. The recommended Linux setup and recovery path
remains the one-shot jkbridge-linux.py helper.
Overleaf, GPU dashboards, Jupyter, and other self-hosted tools are often safest when they listen only on Linux 127.0.0.1. That also makes them inconvenient to open from a Windows computer.
JK Bridge turns those services into ordinary Windows-local URLs while preserving the loopback boundary. It saves the Linux node's stable Tailscale MagicDNS name—not its changeable 100.x.y.z address—then supervises one strict SSH tunnel for every enabled service.
Windows browser Linux host
http://127.0.0.1:8080/project 127.0.0.1:80
│ ▲
└── JK Bridge ── OpenSSH local forward ── Tailscale ──────────┘
The normal first run is: start the temporary Linux helper, paste its one-time code into the Windows app, and select Pair and connect. The helper exits after pairing; daily use happens entirely from JKBridge.exe.
| File or component | Run it on | Purpose |
|---|---|---|
JKBridge.exe |
Windows 11 x64 | Desktop UI, setup, tunnel supervision, health checks, tray, and startup |
jkbridge-linux.py |
Linux | One-shot pairing, managed SSH-key status, and revocation |
| Tailscale | Both devices | Encrypted device-to-device network and stable MagicDNS identity |
| OpenSSH Client | Windows only | Creates the dedicated key and runs the local-forward tunnel |
| OpenSSH Server | Linux only | Accepts the restricted key and terminates the tunnel |
Important
Windows does not need OpenSSH Server, and Linux does not need the JK Bridge desktop app.
| Device | Requirement | Official install/download | Quick verification |
|---|---|---|---|
| Windows | Windows 11 x64 | Built into the operating system | winver |
| Windows | Tailscale, running and signed in | Windows download · install guide | tailscale status |
| Windows | OpenSSH Client (ssh.exe and ssh-keygen.exe) |
Microsoft installation guide | Get-Command ssh, ssh-keygen |
| Linux | Tailscale, running and signed in | Linux install guide · manual packages | tailscale status |
| Linux | Python 3.9 or later | Your distribution package, or python.org | python3 --version |
| Linux | OpenSSH Server with an Ed25519 host key | Ubuntu Server guide | sudo sshd -t |
| Linux | Each target web app on loopback | The web app's own documentation | curl -I http://127.0.0.1:<port>/ |
Both devices must appear in the same tailnet, or the tailnet policy must explicitly allow them to communicate. The login email addresses may differ; tailnet membership is what matters.
The app checks these prerequisites but intentionally does not install operating-system packages, elevate itself, change sshd_config, or start your web apps. See the step-by-step installation guide for GUI and command-line installation methods.
Complete the table above on both devices. On Windows, install OpenSSH Client, not OpenSSH Server. On Linux, confirm SSH and the target web service are already running.
From the latest Release, download these two assets from the same version:
JKBridge-win-x64.zipJKBridge-win-x64.zip.sha256
In PowerShell, from the download directory:
Get-FileHash .\JKBridge-win-x64.zip -Algorithm SHA256
Get-Content .\JKBridge-win-x64.zip.sha256The two hashes must match. Extract the ZIP to a permanent folder. Releases are not currently code-signed, so Windows may show an unknown-publisher warning; verify the hash before choosing to run the app.
Open Device setup in the Windows app and select Copy one-line pairing
command. Paste that command into a Linux terminal as the ordinary account that
JK Bridge should use for SSH—never with sudo. Python 3 is the only requirement;
there is no repository clone, download directory, or cd step.
The command carries the compressed jkbridge-linux.py embedded in the Windows
build, verifies its pinned SHA-256, and only then executes pair. Linux does
not need internet access. Keep the terminal open. The helper prints a
jkbridge://... code that expires after 10 minutes and one successful use.
If the helper has already been copied manually, the traditional recovery path remains available:
chmod 700 ~/jkbridge-linux.py
python3 ~/jkbridge-linux.py status
python3 ~/jkbridge-linux.py pair- Start
JKBridge.exe. - Open Device setup if it is not already visible.
- Paste the complete
jkbridge://...code. - Select Pair and connect.
The app creates a dedicated Ed25519 key, restricts its Windows file permissions, pins the Linux SSH host key, and asks the helper to install one exact loopback-only authorization. It never asks for the Linux password and never sends a private key.
Use the Overview page or tray menu. The browser URL remains a Windows URL such as http://127.0.0.1:8080/project; do not replace it with the Linux Tailscale IP.
Default examples:
| Service | Open on Windows | Forwarded to Linux |
|---|---|---|
| Overleaf | http://127.0.0.1:8080/project |
127.0.0.1:80 |
| GPU Dashboard | http://127.0.0.1:8765/ |
127.0.0.1:8765 |
| Investment News | http://127.0.0.1:8793/ |
127.0.0.1:8793 |
These entries are editable. Nothing is bound to the public internet or ordinary LAN.
Each service's SSH forward, browser URL, health target, and Linux authorization port come from one loopback route. For self-signed HTTPS, choose TCP connect health in the Services editor. Health warnings remain visible, but they no longer block browser launch after the SSH forward exists.
Choose Services → Windows local → Scan this PC. JK Bridge reads only TCP
listeners that are already bound to literal 127.0.0.1 or ::1, then sends
short, body-free HTTP/HTTPS HEAD probes to those candidates:
- it does not scan disks or iterate across the
1–65535port range; - it uses no proxy or cookies, follows no redirects, and reads no response body;
- the overall scan is capped at eight seconds, with bounded per-probe time and concurrency;
- ports already used by JK Bridge Linux tunnels are labeled but cannot be saved again;
- “TCP only” means a listener exists, not that a web page was confirmed;
- self-signed HTTPS is labeled as certificate-unverified and defaults to TCP status when saved.
Confirmed pages can be saved as independent Windows-local cards. They never join SSH forwarding or Linux port authorization, and removing a card does not stop its Windows process. A stopped potential service cannot be reliably found from the active listener table; saved cards remain and show offline until a later scan sees them again.
The Windows and Linux ports do not have to match. In this example, JK Bridge
listens only on Windows loopback port 8080 and forwards it to Linux loopback
port 80:
browser opens http://127.0.0.1:8080/project
Windows localPort 8080
-> Linux remotePort 80
The browser URL always uses the Windows local port. Its scheme and path may
be different service choices, such as https and /login, but the host remains
exactly 127.0.0.1. JK Bridge is a TCP forward: it does not rewrite redirects
returned by the web app or make a certificate issued for another hostname valid
for 127.0.0.1.
In stable v2.2.1, review the Windows port, Linux destination port, and loopback URL together in the Services editor. Simple mode derives the URL from protocol
- Windows port + launch path and previews the complete mapping; advanced mode keeps an explicit validated loopback URL.
| Situation | What to do |
|---|---|
| Normal Windows reboot | Start JKBridge.exe, or enable Start with Windows once |
| Linux Tailscale IP changes | Nothing; JK Bridge resolves the saved MagicDNS identity |
| Add a web app using an already-authorized Linux port | Add or edit it on the Services page |
| Add a new Linux destination port | Enable the service, run pair again on Linux, and re-pair with the existing Windows key |
| Linux is reinstalled or its SSH host key is intentionally rotated | Verify the change locally, then re-pair |
| A Windows device/key is lost | Run Linux status, then remove --fingerprint 'SHA256:...' |
| Upgrade from v2.0.x to v2.1 | Start the new app and re-pair once when prompted to establish a verifiable port-authorization receipt |
Pairing updates only the JK Bridge-managed line in ~/.ssh/authorized_keys and first backs up the file under ~/.ssh/jkbridge-backups/.
| File | Use |
|---|---|
JKBridge.exe |
Portable, self-contained Windows x64 app |
jkbridge-linux.py |
Standalone Python 3 Linux helper |
Setup-JKBridge.ps1 |
Advanced V1/manual recovery path; not needed for normal one-click pairing |
Add-Investment-News.ps1 |
Safely add or update Investment News in an existing configuration |
Verify-JKBridge.ps1 |
Windows environment and runtime diagnostics |
README*.md, docs/ |
English and Chinese setup, troubleshooting, security, and architecture |
SHA256SUMS, *.sha256 |
Release integrity records |
| Symptom | First check |
|---|---|
| Linux device is not found | Run tailscale status on both devices and confirm they share a tailnet |
| Pairing code times out | Keep pair running, generate a fresh code, and check tailnet ACLs/firewall |
| “OpenSSH needs attention” | Install Windows OpenSSH Client, then verify both ssh and ssh-keygen |
| Tunnel starts but a page fails | On Linux, curl the exact configured 127.0.0.1:<port> URL |
| “Host key mismatch” | Stop; verify a legitimate Linux reinstall/key rotation, then re-pair—never disable checking |
| Local port is occupied | Close the known owner or choose another Windows local port |
| New service says forwarding is prohibited | Re-pair after enabling its new Linux destination port |
| Self-signed HTTPS shows a certificate health error | Select TCP connect health; the browser can still open so you can decide whether to trust the certificate |
See Troubleshooting for exact commands, restart behavior, duplicate-key migration, and safe diagnostics.
- Pairing is reachable only on the Linux Tailscale IPv4 and additionally requires a random, short-lived 256-bit token.
- The Linux host key is read locally during pairing and pinned; subsequent SSH connections use strict verification.
- The dedicated Windows private key is limited to the current user and SYSTEM.
- The Linux key cannot open a shell or run commands and can reach only explicitly enabled Linux
127.0.0.1ports. - Windows records the paired client fingerprint and exact port set, then requires re-pairing before SSH when enabled routes drift beyond that grant.
- Every Windows listener and Linux destination is fixed to
127.0.0.1. - Configuration writes are atomic; diagnostics are redacted; the public-release scanner blocks common credentials and machine identities.
Read the full security design and pairing protocol. To report a vulnerability privately, follow SECURITY.md.
| Document | Audience |
|---|---|
| Installation · 中文 | First-time users and administrators |
| Troubleshooting · 中文 | Users diagnosing setup, tunnel, or web-service failures |
| Architecture | Maintainers and security reviewers |
| Security design | Administrators and reviewers |
| Pairing protocol | Implementers and protocol reviewers |
| Development guide | Contributors building and releasing the project |
| Windows acceptance checklist | Release testers |
The desktop app targets .NET 10 and Avalonia 12.1. With the .NET 10 SDK installed:
dotnet test JKBridge.slnx -c Release
python3 -m unittest discover -s tests/linux -p 'test_*.py'
./scripts/check-public-release.sh
./scripts/check-doc-links.sh
./scripts/publish-win-x64.shThe last command creates the tested Windows package under artifacts/. Start with the development guide before changing pairing, authorization, process supervision, or release code.
- For a reproducible bug or feature request, open an issue. Remove hostnames, tailnet names, usernames, public keys, tokens, and personal paths first.
- For code or documentation changes, read CONTRIBUTING.md.
- For vulnerabilities, use the private process in SECURITY.md, not a public issue.
JK Bridge is currently tested as a portable Windows 11 x64 client. The executable is not yet commercially code-signed, and the project does not install Tailscale/OpenSSH, manage tailnet policy, expose public URLs, or start the underlying Linux web services.
