Help us shape the future of Go! Take the 2026 Go Developer Survey

loft

module
v1.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: Apache-2.0

README

English · Русский · 中文

A private overlay is described which is carried inside TLS 1.3. Application streams are multiplexed over GET, WebSocket, HTTP/2, QUIC, or HTTP/3 and are sealed with ChaCha20-Poly1305. On the public path the session is ordinary HTTPS, and may therefore be passed through a CDN, reverse proxy, or TLS terminator. Short disconnects and packet loss are tolerated: the mux is parked and later resumed, so that inner TCP is not torn down.

The protocol is loft/1.0. Connections are shared as loft://. YAML kind: loft.

This repository is the specification together with a reference node, a web panel, and clients (a macOS application and CLI tools for Linux and macOS). Software 1.0.24. A third party may implement loft from docs/protocol.md.

Contents

Operators

The intended use is operator access: a laboratory LAN reached from outside, a server fleet, or a site-to-site path. Members present a browser-shaped ClientHello. Should a middlebox rewrite the handshake, the session is not established.

Download

Binaries are published in the latest GitHub Release. Dist uploads these names on every v* tag, so that the links follow the current release.

Apple Silicon / arm64 Intel / amd64
macOS app DMG DMG
macOS CLI tar.gz tar.gz
Linux CLI tar.gz tar.gz
Node tar.gz · deb tar.gz · deb
Panel tar.gz · deb tar.gz · deb

Checksums: clients · node · panel. The macOS DMG is the menu-bar application (ad-hoc signed). CLI archives contain loft, loft-front, loft-probe, and loft-bench.

App

The macOS client is a menu-bar application. The overlay is opened from it; several named connections may be kept; a loft:// link or a .loft file may be imported. SOCKS5 and TUN remain local.

Status Connections
loft status window Named connections

Panel

Web administration of one loft server: the node, its networks and members, IP addresses and upstream channels, domains with DNS records and certificates, mail, packages, and panel users. The aim is that a loft server may be installed and configured without files being edited by hand. Spec: server/panel.

loft-panel overview

How it works

flowchart LR
    subgraph Client["loft client"]
        App["SSH · browser · curl"] --> In["SOCKS5 / TUN"]
        In --> Mux["mux Open / Data / Close / Dgram"]
        Mux --> Seal["ChaCha20-Poly1305"]
        Seal --> Front["get · ws · h2 · quic · h3"]
    end
    Front -->|"TLS 1.3 HTTPS"| Edge["CDN / reverse proxy"]
    Edge --> Node["loft-node"]
    Node --> Dest["lab · fleet · site"]
  1. Applications speak to a local SOCKS5 or TUN listener. That listener is held by Holder while the front is rotated.
  2. Streams are carried on one mux and are sealed with ChaCha20-Poly1305.
  3. On the public path the session is ordinary HTTPS, so that a CDN or reverse proxy may sit in front of the node.
  4. A short disconnect causes the mux to be parked for gap_hold_ms (8 s by default). Resume is performed with a fresh 0x02 and the same instance_id; inner TCP is left standing.
docs/protocol.md The wire protocol. A third-party client or node may be implemented from it.
docs/architecture.md Layout of this tree.
docs/guide.md Build, configuration, operation, Debian.
docs/yandex-cdn_ru.md Yandex Cloud CDN operator guide (RU).
docs/keenetic.md KeeneticOS Entware client (OpkgTun). Catalog: clients/Keenetic/.
docs/mikrotik.md RouterOS 7 container client. Catalog: clients/MikroTik/.
docs/ios.md iOS Packet Tunnel client. Catalog: clients/iOS/.
docs/android.md Android VpnService client. Catalog: clients/Android/.
docs/aurora.md Aurora OS ConnMan client. Catalog: clients/Aurora/.
docs/share.md Import URI loft:// and .loft files (one or several connections).

Repository

docs/             protocol, architecture, guide
docs/brand        mark and icons
internal/         wire, mux, crypto, transport, overlay
server/           loft-node (controller or relay)
server/panel      loft-panel web admin
clients/go        loft, loft-front, loft-probe
clients/macOS     menu-bar app (launches loft-front)
clients/Keenetic  Entware / OpkgTun (plan and mock)
clients/MikroTik  RouterOS 7 container (image + .rsc)
clients/iOS       Packet Tunnel (thin host + appex)
clients/Android   VpnService (thin Java host)
clients/Aurora    ConnMan overlay (thin QML host)
clients/mobile    shared Go engine (gomobile bind)

Build

Go 1.24+. From the repository root:

make test
make node       # ./loft-node
make client     # dist/clients/go/loft
make macos      # dist/clients/macOS/loft.app
make macos-dmg  # dist/clients/macOS/loft-*-macos-<arch>.dmg
make macos-dmgs # both arm64 and x86_64 DMGs (CI)
make dist       # node tarballs/.deb + CLI archives

A tag vX.Y.Z matching VERSION runs GitHub Actions: tests, make dist, macOS DMGs for arm64 and x86_64 (ad-hoc), a Release, and a pkg.go.dev ping. The same Dist workflow may be started by hand from Actions.

export LOFT_TOKEN='change-me-long-random'
./loft-node -c server/configs/server.yaml -dir /var/lib/loft
./dist/clients/go/loft -c clients/go/configs/client.yaml
ALL_PROXY=socks5://127.0.0.1:1080 curl https://example.com

Debian package and installer: server/debian/README.md.

Support

Work on an open internet is not free. Sponsorship is accepted so that the protocol, the node, and the clients may be kept independent.

Network Address
Bitcoin Bitcoin bc1q3q8vzxta0yegvwkgth44a0n2ee8d9kjtjs738t
Ethereum Ethereum 0xEfBF2e1C8B76B6033ab00199Bdf36671ed0Dba3A
Tether Ethereum (USDT ERC-20) 0xEfBF2e1C8B76B6033ab00199Bdf36671ed0Dba3A
TRON TRON TQq2CGEZ7rTE7RqA6rhh2H8j24qdUqd5Jx
Tether TRON (USDT TRC20) TQq2CGEZ7rTE7RqA6rhh2H8j24qdUqd5Jx
Litecoin Litecoin ltc1qq93zr9pjst9fy732qjuy0pltze4x4llcv30w79
Zcash Zcash (transparent) t1RCtApkwLxjuG2dmR7SdnHSVR1Xrx2c6Bk

ETH and USDT ERC-20 are received at the same Ethereum address. TRX and USDT TRC20 are received at the same TRON address. USDT must be sent on the network of that row. Details are given in SUPPORT.md.

License

Apache License 2.0. loft/1.0 may be implemented from docs/protocol.md without a fee.

Directories

Path Synopsis
clients
go/cmd/loft command
Command loft is the CLI client: config-driven GET/WS/QUIC outbound, SOCKS5, and optional TUN with kill-switch.
Command loft is the CLI client: config-driven GET/WS/QUIC outbound, SOCKS5, and optional TUN with kill-switch.
go/cmd/loft-bench command
Command loft-bench repeats the macOS app connect path (front, SOCKS5, TCP probe) and measures mux/SOCKS throughput for GET and WS.
Command loft-bench repeats the macOS app connect path (front, SOCKS5, TCP probe) and measures mux/SOCKS throughput for GET and WS.
go/cmd/loft-front command
Command loft-front is the GUI helper: GET/WS/H2/QUIC/H3 front, SOCKS5, and in-process or loft-priv TUN.
Command loft-front is the GUI helper: GET/WS/H2/QUIC/H3 front, SOCKS5, and in-process or loft-priv TUN.
go/cmd/loft-probe command
Command loft-probe sends ICMP, TCP, UDP, DNS, HTTP, and HTTPS through loft mux or SOCKS5 without rewriting system routes or opening utun.
Command loft-probe sends ICMP, TCP, UDP, DNS, HTTP, and HTTPS through loft mux or SOCKS5 without rewriting system routes or opening utun.
go/inbound
Package inbound is the loft client listener: SOCKS5, userspace TUN (ICMP/UDP/TCP), Darwin/Linux DNS and routes, optional overlay IPv6.
Package inbound is the loft client listener: SOCKS5, userspace TUN (ICMP/UDP/TCP), Darwin/Linux DNS and routes, optional overlay IPv6.
go/lanui
Package lanui is the LAN operator page for loft (MikroTik :8090).
Package lanui is the LAN operator page for loft (MikroTik :8090).
go/tools/wsprobe command
Command wsprobe is a one-shot HTTP GET through a loft GET front.
Command wsprobe is a one-shot HTTP GET through a loft GET front.
mobile
Package mobile is the shared Go session for iOS Packet Tunnel and Android VpnService.
Package mobile is the shared Go session for iOS Packet Tunnel and Android VpnService.
internal
cdn
Package cdn holds vendor edge profiles on top of protocol fronts get/ws.
Package cdn holds vendor edge profiles on top of protocol fronts get/ws.
config
Package config loads client.yaml and node config (YAML or switch-style commands).
Package config loads client.yaml and node config (YAML or switch-style commands).
crypto
Package crypto seals mux with ChaCha20-Poly1305, proves membership with clockless HMAC (0x02) bound to a client X25519 pub, and derives the session key from the DH secret (HKDF info "loft-v1").
Package crypto seals mux with ChaCha20-Poly1305, proves membership with clockless HMAC (0x02) bound to a client X25519 pub, and derives the session key from the DH secret (HKDF info "loft-v1").
egress
Package egress decides how a member's traffic leaves the node: directly (the server's own route), through a kernel interface (a WireGuard, OpenVPN or ZeroTier channel), through a SOCKS5 or HTTP(S) proxy, or through an SSTP session the node holds itself.
Package egress decides how a member's traffic leaves the node: directly (the server's own route), through a kernel interface (a WireGuard, OpenVPN or ZeroTier channel), through a SOCKS5 or HTTP(S) proxy, or through an SSTP session the node holds itself.
identity
Package identity is the member key: lt_ plus 48 hex characters (24 bytes).
Package identity is the member key: lt_ plus 48 hex characters (24 bytes).
mux
Package mux multiplexes streams and datagrams over AEAD-protected frames after Status.
Package mux multiplexes streams and datagrams over AEAD-protected frames after Status.
netconf
Package netconf is Loft overlay 1.0 network.conf: members, overlay IPs, leases, Cisco-style ACL, IPAM, DNS policy, session timers, managed routes and VLANs.
Package netconf is Loft overlay 1.0 network.conf: members, overlay IPs, leases, Cisco-style ACL, IPAM, DNS policy, session timers, managed routes and VLANs.
protect
Package protect marks VPN process sockets so they use the physical path (Android VpnService.protect).
Package protect marks VPN process sockets so they use the physical path (Android VpnService.protect).
startup
Package startup scans loft node and overlay config written as switch-style commands (Keenetic / D-Link / Cisco extended ACL).
Package startup scans loft node and overlay config written as switch-style commands (Keenetic / D-Link / Cisco extended ACL).
testcfg
Package testcfg loads hostnames for tests.
Package testcfg loads hostnames for tests.
transport
Package transport implements Loft 1.0 fronts, TLS camouflage, decoy splice, borrowed-cert mask, CONNECT splice, and client dialing.
Package transport implements Loft 1.0 fronts, TLS camouflage, decoy splice, borrowed-cert mask, CONNECT splice, and client dialing.
version
Package version holds the program release (injected from VERSION, currently 1.0.24 when built) distinct from protocol 1.0 (0x0100).
Package version holds the program release (injected from VERSION, currently 1.0.24 when built) distinct from protocol 1.0 (0x0100).
wire
Package wire is loft overlay protocol 1.0 (0x0100): Hello/Status handshake, mux frames, signed roster/lists, and fleet control.
Package wire is loft overlay protocol 1.0 (0x0100): Hello/Status handshake, mux frames, signed roster/lists, and fleet control.
server
cmd/loft-node command
Command loft-node is the overlay node daemon: controller or relay.
Command loft-node is the overlay node daemon: controller or relay.
cmd/loft-panel command
Command loft-panel is the web admin for one loft server.
Command loft-panel is the web admin for one loft server.
cmd/loft-panel-adm command
Command loft-panel-adm is the root helper of loft-panel.
Command loft-panel-adm is the root helper of loft-panel.
origin
Package origin serves the node's public HTTPS origin.
Package origin serves the node's public HTTPS origin.
origin/cover
Package cover serves the embedded TLS/QUIC cover site shown to ordinary browsers.
Package cover serves the embedded TLS/QUIC cover site shown to ordinary browsers.
panel/adm
Package adm is what loft-panel-adm does as root: read and replace the node's network.conf with rollback, issue member keys, restart loft-node.
Package adm is what loft-panel-adm does as root: read and replace the node's network.conf with rollback, issue member keys, restart loft-node.
panel/admproto
Package admproto is the wire between loft-panel (no privileges) and loft-panel-adm (root).
Package admproto is the wire between loft-panel (no privileges) and loft-panel-adm (root).
panel/auth
Package auth is panel sign-in: argon2id password hashes, sessions, and a per-address limit on failed logins.
Package auth is panel sign-in: argon2id password hashes, sessions, and a per-address limit on failed logins.
panel/backup
Package backup is the panel's backup format: a tar.gz of the server's parts with a manifest of SHA-256 sums, encrypted to a public key.
Package backup is the panel's backup format: a tar.gz of the server's parts with a manifest of SHA-256 sums, encrypted to a public key.
panel/catalog
Package catalog is the closed list of packages the panel can put on the server.
Package catalog is the closed list of packages the panel can put on the server.
panel/devstand command
Command devstand runs the real panel and the real adm ops on a laptop: node files live in a temp directory and systemctl is faked (the "node" accepts any config unless it contains "# crash").
Command devstand runs the real panel and the real adm ops on a laptop: node files live in a temp directory and systemctl is faked (the "node" accepts any config unless it contains "# crash").
panel/store
Package store keeps panel users in one JSON file, written atomically.
Package store keeps panel users in one JSON file, written atomically.
panel/web
Package web is loft-panel's HTTP side: sign-in, the JSON API under /api/, and the embedded UI.
Package web is loft-panel's HTTP side: sign-in, the JSON API under /api/, and the embedded UI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL