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

  1. Install the agent

    irm http://127.0.0.1:4590/install.ps1 | iex

    Check that the install landed. A version line should come back:

    tunl version

    To 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, run xattr -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.exe aside as tunl.exe.old and 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 = 1 before the command.

  2. Start the server

    The listener the agent connects to stays in a separate terminal.

    aditd --token bir-belirtec

    The token is required. If it is empty, the server does not start. The same value can be passed with ADIT_TOKEN. Defaults: control 127.0.0.1:7000, HTTP 127.0.0.1:8080, HTTPS 127.0.0.1:8443, panel 127.0.0.1:4590. On first start a self-signed adit-cert.pem is written. The browser warns about that certificate.

  3. 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)
    }

    First open http://127.0.0.1:3000 in the browser. Do not open the tunnel until you see merhaba.

  4. Open the tunnel

    tunl http 3000

    The 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 stop

    Open the public address in the browser. The request goes to 127.0.0.1:3000. The same terminal prints a line like amber-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.

  5. 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.

  6. 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:password

    The 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.

What is next