Quick start
This page publishes a local HTTP application through the tunl.surf server on this machine. The last step puts a password on the public endpoint. There is no Google account and no hosted session.
What you need
aditdrunning on this machine.- The agent. The install script downloads it, checks the SHA256, and puts it on PATH.
- The local port you want to open. The examples use
3000.
-
Install the agent
irm http://127.0.0.1:4590/install.ps1 | iexcurl -fsSL http://127.0.0.1:4590/install.sh | shcurl -fsSL http://127.0.0.1:4590/install.sh | shCheck that the install landed. A version line should come back:
tunl versionTo update from the same panel, run
tunl update --url http://127.0.0.1:4590. To take a zip without the script, see the Download page. If the checksum does not match, the file is not put on PATH.macOS 13 or newer is required; on an older system the script stops without downloading anything. A file downloaded by the browser gets a quarantine flag and can be blocked on first launch because it is not notarized by Apple. The script fetches the file with
curl, so that flag is not set. If you downloaded the zip by hand, runxattr -d com.apple.quarantine tunl. If your shell is zsh, the script also writes a PATH line into~/.zshrc.The Windows script moves a running
tunl.exeaside astunl.exe.oldand puts the new file in its place. It adds the folder to your user PATH; it does not touch%VARIABLE%entries that are already there, or the value type. If you do not want it to touch PATH at all, set$env:ADIT_NO_PATH = 1before the command. -
Start the server
The listener the agent connects to stays in a separate terminal.
aditd --token bir-belirtecThe token is required. If it is empty, the server does not start. The same value can be passed with
ADIT_TOKEN. Defaults: control127.0.0.1:7000, HTTP127.0.0.1:8080, HTTPS127.0.0.1:8443, panel127.0.0.1:4590. On first start a self-signedadit-cert.pemis written. The browser warns about that certificate. -
Run the local application
tunl.surf does not start the application. If you do not already have a server, run one of the files below on
127.0.0.1:3000.package main import ( "fmt" "net/http" ) func main() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "merhaba") }) http.ListenAndServe("127.0.0.1:3000", nil) }const http = require("http"); http.createServer((req, res) => { res.writeHead(200, { "Content-Type": "text/plain; charset=utf-8" }); res.end("merhaba\n"); }).listen(3000, "127.0.0.1");from http.server import BaseHTTPRequestHandler, HTTPServer class Handler(BaseHTTPRequestHandler): def do_GET(self): body = b"merhaba\n" self.send_response(200) self.send_header("Content-Type", "text/plain; charset=utf-8") self.send_header("Content-Length", str(len(body))) self.end_headers() self.wfile.write(body) HTTPServer(("127.0.0.1", 3000), Handler).serve_forever()First open
http://127.0.0.1:3000in the browser. Do not open the tunnel until you seemerhaba. -
Open the tunnel
tunl http 3000The output looks like this. The address on the left is your public address. The one on the right is the local application.
online http://amber-gate-k4w7zq.127.0.0.1.sslip.io:8080 → 127.0.0.1:3000 panel http://127.0.0.1:4590/panel local http://127.0.0.1:4040 Ctrl+C to stopOpen the public address in the browser. The request goes to
127.0.0.1:3000. The same terminal prints a line likeamber-gate-k4w7zq GET / 200 12ms. The name at the front shows which tunnel it belongs to. A WebSocket upgrade goes through the same tunnel. The name is temporary, because you did not pass--name, and it is not written to disk. -
See the request in the panel
Open the panel. The request is on the left, the detail on the right. Replay sends the same request to the local endpoint again. Filters and tabs are on the inspector page.
-
Put a password on the public endpoint
Stop the tunnel with Ctrl+C. Open the same port again with a password.
tunl http 3000 --auth user:passwordThe browser asks for a user name and a password. A pair that matches is passed to the application. A pair that does not match returns
401. This password is only for the HTTP endpoint. The token the agent uses to reach the server is separate; that is on the token page.