gately

module
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0

README

Website · Docs · Download · Changelog · 2-min tour · Discussions · Telegram
English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Español | Français | Deutsch | Русский | Português (Brasil)

Release License Docker pulls

Gately

A self-hosted gateway with a web UI: reverse proxy, automatic HTTPS, dynamic DNS, NAT traversal, WAF and fail2ban-style bans in one binary.

Gately sits at the edge of a home network or a server and handles the path from the internet to your services: it keeps your domain pointed at a changing IP, gets and renews certificates, routes every service through one port 443, puts sign-in and a WAF in front of them, and bans addresses that probe. Everything is configured in the browser. Apache-2.0, no telemetry, config stored as plain JSON on your own device.

Gately overview page

What it replaces

You run today In Gately
nginx or Nginx Proxy Manager Web services: reverse proxy, static sites, redirects, HTTP/3, per-site access rules; imports nginx config and imports Nginx Proxy Manager configs
certbot / acme.sh ACME certificates with DNS-01 and HTTP-01, wildcard, automatic renewal and deployment
ddns-go or DDNS scripts Dynamic DNS for 30+ providers, IPv4 and IPv6
haproxy SNI routing / sslh Protocol routing: HTTPS, SSH, RDP and more share one port
fail2ban Log jails, decoy ports and scan detection, bans dropped in nftables or iptables
ModSecurity / a separate WAF Coraza with OWASP CRS v4, per site
Authelia-style login in front of apps Built-in sign-in, TOTP, Passkeys and an OIDC provider; forward auth also supported
Hand-run frpc / cloudflared / tailscaled Managed frp, Cloudflare Tunnel, Tailscale, NetBird and EasyTier with install, update and rollback
Port-forwarding workarounds without a public IPv4 STUN traversal: TCP / UDP hole punching, address changes sync to DNS records, webhooks and scripts

You can turn off any module you do not need, or build a binary with only the modules you pick at build.gately.cn.

Try it

docker run -d --name gately --network host --cap-add NET_ADMIN \
  -v ./gately-data:/etc/gately \
  ghcr.io/wangwanjie/gately:latest

Open http://<device-ip>:16680, sign in as admin / gately.cn, and set your own password when prompted. Host networking lets Gately listen on the ports you configure; NET_ADMIN lets bans reach the host firewall (without it, bans still apply to Gately's own services). Add -v /var/run/docker.sock:/var/run/docker.sock if you want the Docker module. Images exist for amd64, arm64 and arm/v7 on GHCR and on Docker Hub as vanjayak/gately (same image; use it if GHCR is hard to reach).

Other ways to install: binary and system service · OpenWrt · fnOS · Docker Compose · all options

Forgot the password or lost the authenticator? Run gately reset-password or gately reset-totp on the server (docker exec -it gately gately reset-password in Docker); see Reset password and two-factor authentication. Short on storage, for example on a router? build.gately.cn builds a binary, OpenWrt or fnOS package, or a multi-arch Docker image with only the modules and UI languages you pick.

Why you can trust it at your network edge

  • Readable and quiet: Apache-2.0, no connection to any project-operated server by default and no device information reported; every outbound address (IP lookup, STUN, update check) is visible, editable and can be turned off. Third-party sign-in uses your own OAuth apps, with no relay in between.
  • Verifiable releases: cosign signatures, build provenance and SBOM for every artifact (how to verify); security fixes are published as GitHub advisories. checksums.txt is also signed with minisign, and online upgrades check that signature before installing.
  • Every change is recorded: audit log, config history with diff and one-click rollback, plain JSON you can keep in git.
  • Keeps up with haproxy + nginx: 26k req/s against 14.7k on the same 2 cores in a like-for-like setup (numbers and method).

Features

A quick tour of the admin UI. The full list of modules is at the end of this section.

Everything at a glance

The overview shows CPU, memory, disk and traffic, network interfaces with their public IPv4 and IPv6, and the state of every module, so you can tell in seconds whether anything needs attention.

Everything at a glance
Web services that can replace nginx

Reverse proxy, static files and redirects by domain, with HTTPS and HTTP/3. Each site gets its own WAF, IP rules and sign-in, and changes apply without dropping connections.

Web services that can replace nginx

Per-site statistics — requests, errors, backend health, top client IPs and countries, minute by minute.

Per-site statistics
Network topology

See how traffic flows from visitors through listeners and sites to backends, live. Pick a node for QPS, traffic and active IPs, filter by visitor IP, switch between seven layouts, and mask addresses before you share a screenshot.

Network topology
One port 443 for every service

Protocol routing lets several services share a single port by domain or protocol, passing TLS straight through and keeping the real client address with the PROXY protocol.

One port 443 for every service
Dynamic DNS for all the major providers

Cloudflare, Alibaba Cloud, DNSPod, Route 53 and more. IPv4 and IPv6, addresses from a URL, an interface or a command, and a notification when anything changes.

Dynamic DNS for all the major providers
Intrusion prevention

fail2ban-style jails read logs from files, journald and containers, while trap ports and scan detection catch probing. Bans sync to nftables and are dropped in the kernel.

Intrusion prevention
frp, Tailscale and Cloudflare Tunnel

Run several frpc and frps instances side by side, next to Tailscale and cloudflared tunnels. Gately installs, updates and rolls back these programs for you.

frp, Tailscale and Cloudflare Tunnel
And more

Docker
Containers, Compose, logs and terminals, with one-click image upgrades that roll back on failure.

Docker

Web terminal
SSH, Telnet and the local shell in the browser, with SFTP and split panes.

Web terminal

Config history
Every change keeps the previous version, with a diff and one-click rollback.

Config history

API, CLI and MCP
Per-module API tokens, built-in OpenAPI docs, gately ctl and an MCP server for AI assistants.

API, CLI and MCP
Full feature list

Several modules share the same building blocks. STUN traversal, port forwarding and protocol routing accept a source IP allowlist / blocklist and an always-deny list (which can reference subscribed IP lists) and open their ports in the local firewall automatically. Tailscale, NetBird, EasyTier, frp, Cloudflare Tunnel and File Browser run external programs that Gately installs, updates, rolls back and uninstalls online, and every one of them has a "restore default settings" action.

Module Capabilities
Dynamic DNS Alibaba Cloud, Cloudflare, Tencent Cloud, DNSPod, Huawei Cloud, GoDaddy, Porkbun, dynv6, DuckDNS, Amazon Route 53, OVHcloud, Gandi, NS1, Bunny DNS, Namecheap, Tencent Cloud EdgeOne, Alibaba Cloud ESA, Baidu AI Cloud, Volcano Engine, DNS.LA, Rainyun, Now.cn, Eranet, Tnet.hk, HiPM DNSMgr, Vercel, NameSilo, Dynadot, Spaceship, Name.com, Gcore, ClouDNS, deSEC, DynDNS2 (No-IP, Dynu, …), custom callbacks
Dynamic DNS: tasks IP discovery via URL, network interface or command; IPv4/IPv6; webhooks; groups, sorting and search; remarks written to the provider; deleting a task can also delete the record at the provider
STUN traversal TCP/UDP, keep-alive, UPnP/NAT-PMP, built-in forwarding; webhooks and scripts triggered on address change
Port forwarding TCP/UDP, IPv4/IPv6, port ranges, multi-target failover, connection limits, traffic statistics, PROXY protocol v1/v2; groups, sorting and search; per-source connection limits and a timeout for connections that never send data
Protocol routing Several services share one port such as 443, passed through without decryption: TLS by SNI and ALPN, HTTP by Host, Minecraft by server address, plus SSH, RDP, SOCKS, OpenVPN, RTSP, SIP, XMPP, MQTT, AMQP, PostgreSQL, Redis, SMB, Git, IRC, ADB, BitTorrent, and a wait-timeout route for server-first protocols such as VNC; a default target and PROXY protocol per route
SSL certificates Automatic ACME issuance and renewal via DNS-01 (wildcard; DNS zone of delegated subdomains detected via SOA) or HTTP-01 (no DNS provider needed); EAB, upload, read from file, map to a directory and run a script
SSL certificates: IP and short-lived Short-lived certificates and certificates for public IP addresses (Let's Encrypt shortlived profile)
SSL certificates: deployment After renewal, push certificates to other hosts over SSH and run a command, or restart the Docker containers that use them
Tailscale Managed tailscaled (userspace networking, container-friendly) or an existing system daemon; auth keys / login links, Headscale, subnet routes, exit nodes, peer list, SOCKS5 proxy, fixed port, extra arguments and environment variables; online install on Linux
NetBird NetBird Cloud or a self-hosted management server; managed netbird daemon (userspace networking, lets other peers reach local services) or an existing system service; setup keys / login links, routes, routing peer, DNS, block inbound, peer list (direct / relayed, latency), SOCKS5 proxy; online install on Linux, macOS and Windows
EasyTier Managed easytier-core: P2P hole punching first, self-hosted or chosen relay nodes, userspace networking with port forwarding, subnet proxy, exit nodes, KCP / QUIC proxy
frp Multiple frpc and frps instances: frpc (tcp/udp/http/https/stcp/xtcp proxies, changes apply instantly, access addresses to click or copy) and frps (port allowlist, subdomains, dashboard, source IP limits for frpc logins); one-click import of legacy ini and new toml configs; frps KCP and QUIC ports, QUIC tuning on both ends, and frps ports opened in the local firewall automatically
Cloudflare Tunnel cloudflared token tunnels and trycloudflare quick tunnels, multiple tunnels, automatic restart, public address display; edit the routes of token tunnels through the Cloudflare API and create their DNS records
WAF Coraza + OWASP CRS v4, per-file rule toggles, custom SecLang, block or detection-only mode; can also send requests to a self-hosted SafeLine detection engine; admin sessions of this instance bypass the WAF; can trust signed-in users
WAF: large requests Adjustable request body inspection limit that can inspect only the first part or skip by path, so cloud drives, WebDAV and other upload sites can sit behind the WAF
Intrusion Prevention: jails fail2ban-style log jails (log files, systemd journal, command output, Docker container logs, failed admin logins, WAF blocks, rejected port knocks) with templates for SSH, Nginx, Vaultwarden and more
Intrusion Prevention: probes Trap ports and port-scan detection (recognizes the open ports of Gately's modules, including remote ports requested by frpc; IPv6 strict mode bans per /64; ban reasons list the ports hit); web path probing bans by listener (decoy paths such as /.env and /.git, unknown-domain scans, repeated 404s); TLS handshake failure bans by failure type (aborted, reset, timeout, not TLS and more) and listener
Intrusion Prevention: bans One ban list with manual CIDR and permanent bans, escalating durations and a whitelist; synced to the system firewall (nftables / iptables + ipset) and dropped in the kernel, or applied to Gately's own services where nftables is unavailable
Port Knocking Single packet authorization (SPA) compatible with fwknop clients: AES-256 encryption, HMAC authentication, replay protection and a time window; protected ports are blocked in the system firewall (nftables / iptables + ipset) and a knocking address is let through for a limited time, established connections unaffected
Port Knocking: integrations Port Forwarding, Protocol Routing (per route) and STUN can "Require knock" without firewall privileges; Protocol Routing can receive knock packets over TCP so only one port is open; release after web login grants the visitor's IP (IPv6 per /64, can be written to the system firewall), no client needed; rejected knocks can be handed to Intrusion Prevention
Docker management Create and edit containers, logs and terminal, Compose, image update checks with one-click upgrade (automatic rollback on failure), networks and volumes; background tasks such as pulls, builds, Compose and batch upgrades can be stopped midway
Docker: self upgrade Upgrade the container Gately itself runs in through a temporary helper container, restoring the old container on failure
Web terminal SSH (trust host key on first use), Telnet, local shell (off by default); proxies, persistent sessions, SFTP file manager, 2FA and protocol confirmation, quick commands, split panes; long-press select and copy on phones, paste panel and clipboard history
Network diagnostics Ping, traceroute, port probe, DNS lookup, speed test, LAN scan
Notification center Webhook, Telegram, Bark, ntfy, Gotify, Pushover, Discord, Slack, ServerChan, PushPlus, WeCom, DingTalk, Feishu, email; severity levels, wildcard, and silencing / dedup rules; global or per-channel proxy (HTTP and SOCKS5); built-in rule templates (critical failures, certificate expiry, address changes, sign-ins, configuration changes, version updates); alerts for admin sign-ins from new addresses
Config backup Encrypted backups (scrypt + AES-GCM), retention policy, scheduled backups to a local directory or storage mount
CLI and MCP gately ctl talks to a running instance; gately mcp serves MCP over stdio (read-only by default)
Wake-on-LAN Magic packet broadcast, online detection; Bemfa voice control (Xiao AI, Xiaodu, Google Assistant)
Wake-on-LAN: shutdown Remote shutdown, reboot and sleep through an agent on the device (Windows/Linux/macOS/OpenWrt, connects out, no open port needed), a Web terminal SSH command or an HTTP request
WebDAV, FTP, SMB Multiple users, per-user directories, read-only mode; shared users common to the three services; FTP adds FTPS and passive port ranges; SMB adds per-user shares backed by one or more directories, SMB 2/3, encryption and Bonjour discovery
File Browser Hosts the FileBrowser Quantum web file manager: multiple instances, several shared directories with read-only mode, password or reverse proxy auth
Storage mounts Local directories, remote WebDAV mounts and SMB shares, online file manager
Scheduled tasks Cron expressions, commands or HTTP requests, run history
List management Rules, instances, certificates, DNS records, terminal connections, API tokens and other lists share grouping, manual sorting (drag or arrows, with multi-select) and search, with bulk enable, disable and delete; Web service sites also support bulk adding, removing or replacing domains, bulk option changes and moving to another listener (by editing, in bulk or by dragging); most lists switch between card and compact views; reordering or regrouping never restarts a service, and it all works on phones; most entries can be duplicated as a starting point, reusing their saved secrets
Admin sign-in Passkey (WebAuthn) sign-in, two-factor authentication (TOTP), read-only accounts, login rate limiting (escalating lockout), unfamiliar-address failure budget (against brute force spread across many addresses), weak password detection with forced password change, password login can be turned off (Passkey only), security score
Admin access Secure entry path, LAN-only access, a configurable response for unauthorized requests that hides the admin port (plain 404, blank page, closed connection, no response or a custom page), HTTPS for the admin UI, real client address from trusted local reverse proxies
Settings Multiple API tokens (per-module read/write grants), saved passwords and keys shown on request (write permission required), custom DNS (DoH supported), time zone, config backup and restore, turn feature modules on or off (disabled modules start no services and serve no API), log level (GATELY_LOG_LEVEL)
Admin UI Global search (Ctrl/⌘+K) for pages, tabs, site domains, port forwarding rules, DDNS records and certificates; a first-run scene picker with a Getting started checklist; a three-step quick site wizard that tests the backend address; scenario templates on empty port forwarding and DDNS lists; read-only public demo mode (-demo)
Update checks Automatic checks for new releases and security advisories (anonymous GitHub requests, can be turned off), with a prominent alert and a notification when a published security issue affects the running version
fnOS native app Offline .fpk packages (x86 / ARM); integrated with the fnOS unified gateway, opens from the fnOS desktop icon and works over your remote fnOS domain; fnOS administrators can sign in with their fnOS session (off by default); runs as root to listen on 80/443 and manage Docker
Audit and history Audit log of sign-ins, configuration changes and access to sensitive content (never records request bodies or secrets); every overwritten config file keeps its previous versions with diff and one-click rollback; declarative config directory (-apply) for GitOps
Monitoring Performance dashboard with 60 second / 1 hour / 24 hour trends for the host, the Gately process and sites, including time to first byte P50 / P95; CPU and memory of managed processes (frp, Tailscale, NetBird, cloudflared, File Browser); threshold alerts (metric + threshold + duration) with firing and recovery notices through the notification center
Metrics and self-check Global Prometheus endpoint /api/metrics (certificates, DDNS, STUN, port forwarding, web services) with a ready-made Grafana dashboard; one-click network self-check (public IP, CGNAT, clock, ports 80/443, DDNS resolution, certificate expiry, HTTPS sites missing a certificate, frp proxy conflicts)
Migration Import nginx config (including nginx -T output): reverse proxies and upstreams, static directories, redirects, per-path backends, access control, with auth_request converted to forward auth; Nginx Proxy Manager configs import directly (set variables substituted into proxy_pass); Sun-Panel 1.x / 2.x exports convert into navigation panels
Web services

Per-feature details are in the Web services documentation.

Area Capabilities
Site types Reverse proxy, redirect, static files (clean URLs, custom 404 page), fixed text, close connection (like nginx return 444), navigation panel
Listeners and protocols HTTPS, HTTP/3 (QUIC), HTTP and HTTPS on one port (redirect or serve), an extra HTTP port per listener (such as 80 next to 443), WebSocket, cleartext HTTP/2 (h2c) backends for gRPC, PROXY protocol in and out, ports opened in the local firewall automatically
Backends Per-path backends, per-user backends for signed-in users (like nginx map $remote_user, also for redirect, static file, navigation panel and fixed text sites), weights / standby / load-balancing policies, active and passive health checks, retry on the next backend when connecting fails, connect / TLS handshake / response header timeouts, visitor read/write idle timeouts, HTTPS backends that receive the visited domain as SNI, path rewriting and prefix stripping
Sign-in Basic auth, web auth, GitHub / Google / QQ / OIDC sign-in, shared users with TOTP two-step verification, Passkeys and self-service password change, single sign-on across subdomains, a built-in OIDC identity provider for Gitea, Grafana and other OpenID Connect apps, forward auth to an external service such as Authelia, a public Gately forwarding its sign-in cookies to a LAN Gately, request headers with the signed-in user's username, email, display name and groups, admin sign-in bypass (administrators signed in to the admin UI reach sites without authenticating again, also across parent domains), trust signed-in users (skip the WAF and path probing)
Access control IP allow / deny lists, subscribed IP lists refreshed on a schedule (such as province or city IP ranges), an always-deny list checked before the allowlist (suited to malicious-IP feeds), GeoIP country filtering, path rules, temporary share links, automatic ban on failed auth, knock admission (sources without a knock release cannot reach the site) and release after login, close the connection instead of answering 403 when access is denied
Performance Compression, rate limiting, response caching with per-path rules (off / own duration / force) and cache purge
Error pages 404 and 5xx pages in 10 built-in styles or your own HTML (uploaded or a server file, checked and sandboxed), optionally replacing backend errors (like nginx proxy_intercept_errors)
Visibility Per-minute access statistics and Prometheus metrics, live connections per site with close or ban, topology view of live QPS, traffic and active IPs from listeners through sites to backends (per-IP path highlighting, address masking, "Active only" focus, replay of recorded snapshots kept in memory by size, off by default), visitor audit per address (sites, paths, identities, blocked share, retention), daily compressed access log archives and export
Navigation panels A links page served as a site: LAN visitors get LAN addresses, built-in icons, other access methods, themes matching the admin UI, search engines, background image, sign-in-only links, card sizes, visitor language menu, custom footer; link styles (cards or app icons) and layout (icon size, links per row, spacing, width); an address chooser for links with several addresses; optional group counts and address badges
Operations Changes apply without dropping open connections, site groups, sorting and search, real visitor IP from the headers of trusted proxies (CDN, WAF), domains open on click and copy as full addresses, HTTPS site rows show the matched certificate and its remaining days

Install

Docker is the quickest way (see Try it). The other ways:

Binary

Download the archive for your platform from Releases (Linux amd64/arm64/arm/mips/mipsle/riscv64, macOS, Windows, FreeBSD), extract it, and run:

./gately -c /etc/gately

Flags: -c sets the config directory (the GATELY_CONFIG_DIR environment variable also works), -listen overrides the admin UI listen address, -apply applies <name>.json files from a directory to the config directory on every start (GATELY_APPLY_DIR, handy for GitOps and Kubernetes; the account and token files cannot be overwritten), and -version prints the version. For unattended installs, set GATELY_INITIAL_PASSWORD to choose the initial admin password instead of the default gately.cn.

Start at boot: after extracting, run sudo ./gately service install (Windows: .\gately.exe service install in an administrator terminal). It registers a systemd unit on Linux, a launchd daemon on macOS (add -user for a login item without sudo) and a Windows service, starts Gately and brings it back after a crash; the config directory defaults to /etc/gately, /usr/local/etc/gately or %ProgramData%\Gately and -c and -listen override it. Keep the binary at its final location first, because the service points at that path. Use gately service uninstall|start|stop|restart|status to manage it afterwards; the config directory is kept when uninstalling.

Service templates: systemd and OpenWrt procd. To verify downloaded archives and images (cosign signatures, build provenance, SBOM), see Verifying release artifacts.

fnOS native app

Each Release ships offline .fpk packages for fnOS: gately_<version>_fnos_x86.fpk (Intel/AMD) and gately_<version>_fnos_arm.fpk (ARM). They are not in the official App Center, so install them manually: open App Center → Manual install (the button at the bottom-left), pick the file, and finish the wizard.

  • Works with the fnOS unified gateway: click the Gately icon on the fnOS desktop and the admin UI opens through the fnOS unified gateway under /app/gately/, sharing the entry point you already use for fnOS. Both the LAN address and your remote fnOS domain work, with no need to open or forward port 16680. Access through the gateway is controlled by fnOS (only fnOS administrators can open it), so the safe entry and LAN-only settings apply only to direct access on port 16680.
  • Signs fnOS administrators in with their fnOS session: turn on Settings → Access control → Sign in with fnOS and fnOS administrators who are signed in to fnOS enter Gately from the desktop icon without a password or two-step code; regular fnOS users still sign in. After you sign out, the login page offers a "Sign in as fnOS user <name>" button instead of signing you back in silently. The setting is off by default and only shown in the fnOS package.
  • On the LAN the admin UI is also at http://<NAS address>:16680. The default account is admin and the default password is gately.cn.
  • The app runs as root, so it can listen on 80/443, manage Docker through docker.sock, and open a real Web terminal. Install it only on a NAS you control.
  • Config lives in the app's var directory and is kept on uninstall unless you choose "delete all" in the uninstall wizard. Upgrading is another manual install of the newer .fpk.
  • The package also adds a gately command (/usr/local/bin/gately) for gately ctl and gately mcp.
  • Port 16680 is shared with the Docker image. Stop the gately container before starting the native app.
  • Verify the download as described in Verifying release artifacts; .fpk files are listed in checksums.txt.
OpenWrt

Each Release ships OpenWrt packages: gately_<version>_openwrt_<arch>.ipk for OpenWrt 24.10 and earlier (including iStoreOS), installed with opkg install, and .apk for OpenWrt 25.12 and later, installed with apk add --allow-untrusted. Packages cover amd64 / arm64 / arm / mipsle / mips / riscv64; pick one by DISTRIB_ARCH in /etc/openwrt_release (see the table in the install guide).

  • The service is enabled and started on install; the admin UI is at http://<router address>:16680, and the default account is admin with the password gately.cn.
  • Config lives in /etc/gately and is kept across upgrades, uninstalls and firmware upgrades (sysupgrade). To upgrade, install the newer package; the online upgrade on the About page points you to the package manager instead.
  • The binary is about 32 MB, so the packages suit x86 OpenWrt boxes, ARM64 boxes and other devices with ample storage; the arm package needs ARMv7 with hardware floating point.
  • An architecture-independent LuCI app, luci-app-gately_<version>_openwrt_all.ipk / .apk, adds Services → Gately to LuCI: service state, start / stop, start at boot, the admin port and a one-click link to the admin interface.

Operations

Monitoring, the API and the managed programs have their own pages in the documentation; the essentials are here.

Monitoring

Create an API token with only the metrics:read permission and point Prometheus at /api/metrics. Metrics, alert examples and the Grafana dashboard are described in Monitoring.

API usage

Create a token on the "API Tokens" page of the admin console. You can create several, grant each read-only or read-write access per module, set an expiry, and the plaintext is shown only once, right after creation. Scripts can then call the admin API in bulk:

curl -H "Authorization: Bearer gtl_xxxx" http://localhost:16680/api/ddns/tasks

Account, two-factor authentication, and token management, as well as the backup, restore, restart, and system settings endpoints, accept login sessions only. All endpoints, required permissions, and data schemas are listed on the "API Docs" page of the admin console. You can also export them to docs/api/en (openapi.json and API.md) with make api-docs; the website https://gately.cn references them directly when published.

When upgrading from an older version, the previous global API token becomes a "legacy token" automatically (same value, full access to every module). Tighten its permissions or replace it with a new token on the API Tokens page.

Tailscale, NetBird, EasyTier, frp, cloudflared

These five modules manage the official external programs (automatic restart, logs aggregated in the UI). Gately does not bundle them. The "online install" card on each module page downloads the latest stable release or a specific version from upstream, verifies its SHA-256, installs it into bin/ under the config directory and restarts the processes that use it; each program can have its own download proxy, and when it is empty the update proxy from Settings is used. The last 3 replaced versions are kept, so you can roll back with one click if a new version has problems, and a program you no longer need can be uninstalled. "Restore defaults" in the page header is separate from uninstalling: it stops the processes, resets the module settings and deletes the files Gately generated for it (frp config files, File Browser instance data, Tailscale and NetBird login state); the old settings can be restored from the config history. Tailscale only publishes ready-to-run packages for Linux; on other systems use the official installer and enter its path. Programs are located in this order: the path set in the module settings, bin/ under the config directory, then PATH. You can also put the binary into the config directory yourself, for example ./gately-data/bin/frpc in Docker deployments; Tailscale needs both tailscale and tailscaled. Tokens and keys in config files are stored with 0600 permissions, and the cloudflared token is passed via an environment variable so it never appears in the process list.

The File Browser module hosts FileBrowser Quantum (the original filebrowser is archived and no longer receives security fixes) with the same lookup order and the same online install, update and rollback as above, installed as bin/filebrowser. The admin password is passed via an environment variable and never written to the config file.

Performance

Protocol routing by SNI plus Web Services can replace the common haproxy (TCP routing by SNI) + nginx (TLS and reverse proxy) pair. The numbers below compare the two on the same machine with the configuration of a real server: 90 domains routed by SNI, PROXY protocol v2 between the two hops, and an ECDSA P-256 certificate with TLS 1.3.

Scenario haproxy + nginx Gately
HTTPS reverse proxy, keep-alive, 1 KB responses, 64 connections 14,767 req/s (p99 35.9 ms) 26,434 req/s (p99 5.7 ms)
The same over HTTP/2 not tested (the nginx config used HTTP/1.1) 27,795 req/s
A new TLS connection for every request, 32 at a time 2,557 req/s 3,448 req/s
1 MB responses, 16 connections 1,053 MB/s 1,585 MB/s
SNI passthrough of a TLS stream, 4 connections 2,927 MB/s 4,962 MB/s
SNI passthrough, new connections per second, 64 at a time 6,334 /s 6,266 /s (on par)
Memory under load haproxy ≈ 21 MB + nginx ≈ 21 MB ≈ 110 MB (one process with every module)
How it was measured
  • Host: Intel Core i5-13500T. Each stack was limited to 2 CPU cores (haproxy and nginx in Docker with --cpuset-cpus, Gately pinned with taskset) to match a small cloud server. Backends and the load generator ran on other cores.
  • haproxy used mode tcp with req_ssl_sni rules and send-proxy-v2. nginx used worker_processes 2 and the proxy settings of the production site, which send Connection: upgrade and therefore open a new backend connection per request; a tuned nginx with upstream keep-alive would narrow the gap on small responses.
  • Gately's path was the SNI rule, PROXY v2, then a Web Services listener, the same number of hops as haproxy → nginx.
  • Each case ran for 10 seconds, and the cases that were repeated agreed within 3%. On a real 2 vCPU cloud host the static site served 5.5k req/s against 3.4k req/s. New TLS connections were on par (about 480–550 per second for both) when the client used X25519; with the post-quantum hybrid key exchange that Go clients and recent browsers offer, Gately completed about 13% fewer handshakes in that run.
  • Results depend on hardware, configuration and traffic. Treat them as a sanity check that Gately keeps up with haproxy and nginx, and measure with your own workload.

Development

Requirements: Go 1.26+, Node.js 24+, pnpm.

make web      # build the frontend (outputs to web/dist, embedded via go:embed)
make build    # compile bin/gately
make test     # go test -race ./...
make lint     # gofmt, go vet, frontend type check

Custom build tags, the tests that need extra setup, module requirements and the i18n workflow are in CONTRIBUTING.md. The directory layout and technology choices are in docs/en/ROADMAP.md. The website (gately.cn) source lives in website/ and is built with VitePress: cd website && pnpm install && pnpm dev.

Release policy

  • Gately is below 1.0. Version numbers have up to four parts (for example v0.6.6.6); the last part increases for follow-up releases of a minor version.
  • Every v* tag runs the release workflow, which builds the binaries, OpenWrt and fnOS packages and the multi-arch Docker image, and signs the artifacts. Images are tagged with the version and with latest, which always points to the newest release.
  • Releases are frequent: 56 version tags between October 17 and November 17, 2026. GitHub Releases group the notes by module and call out upgrade notes; the changelog on the website has the announcements.
  • Security fixes ship for the latest version only (SECURITY.md). For production, pin an image tag such as ghcr.io/wangwanjie/gately:v0.6.8, read the release notes before upgrading, and use config history to roll a setting back.

Contributing

Issues and pull requests are welcome. The checklist for code, modules, tests and translations is in CONTRIBUTING.md, and everyone taking part follows the Code of Conduct.

Community

Ask questions in GitHub Discussions Q&A so the answers stay searchable, and share your setup in Discussions; the Telegram group is for instant chat: t.me/gately_chat.

Please report bugs in GitHub Issues and attach a diagnostics bundle (Settings → Diagnostics); it is generated locally and contains no passwords, tokens, domains or real IPs. Report security problems privately as described in SECURITY.md.

Sponsor

Every Gately feature is free. If it helps you, you can sponsor development with USDT, Afdian or WeChat Pay; addresses and QR codes are on the sponsor page.

License

Apache License 2.0

Directories

Path Synopsis
cmd
gately command
Gately 是开源的网络网关工具集,适用于家庭网络、NAS 与各类服务器:端口转发、DDNS、STUN 穿透、反向代理与证书管理。
Gately 是开源的网络网关工具集,适用于家庭网络、NAS 与各类服务器:端口转发、DDNS、STUN 穿透、反向代理与证书管理。
deploy
openwrt/luci/po2lmo command
po2lmo 把 luci-app-gately 的翻译(po/<语言>/gately.po)编译为 LuCI 使用的 LMO 文件 (root/usr/lib/lua/luci/i18n/gately.<语言>.lmo)。
po2lmo 把 luci-app-gately 的翻译(po/<语言>/gately.po)编译为 LuCI 使用的 LMO 文件 (root/usr/lib/lua/luci/i18n/gately.<语言>.lmo)。
internal
acmehttp
Package acmehttp 实现 ACME HTTP-01 验证的应答:登记 token 对应的密钥授权, 并在 /.well-known/acme-challenge/<token> 上返回。
Package acmehttp 实现 ACME HTTP-01 验证的应答:登记 token 对应的密钥授权, 并在 /.well-known/acme-challenge/<token> 上返回。
apitoken
Package apitoken 实现可多个、可限定权限的 API 令牌。
Package apitoken 实现可多个、可限定权限的 API 令牌。
app
Package app 负责组装配置、认证、模块与管理 HTTP 服务。
Package app 负责组装配置、认证、模块与管理 HTTP 服务。
audit
Package audit 记录管理后台的操作审计日志:谁、何时、从哪个 IP、做了什么。
Package audit 记录管理后台的操作审计日志:谁、何时、从哪个 IP、做了什么。
auth
Package auth 实现管理员账号、会话令牌与登录限流。
Package auth 实现管理员账号、会话令牌与登录限流。
backup
Package backup 负责配置备份的打包、加密、解析与保留策略,供手动导出、定时备份与恢复共用。
Package backup 负责配置备份的打包、加密、解析与保留策略,供手动导出、定时备份与恢复共用。
banlist
Package banlist 是进程内共享的 IP 封禁表:入侵防护模块、Web 服务认证等来源往里写入封禁, 端口转发、Web 服务、STUN、WebDAV、FTP 与管理后台在接受连接或处理请求时查询它。
Package banlist 是进程内共享的 IP 封禁表:入侵防护模块、Web 服务认证等来源往里写入封禁, 端口转发、Web 服务、STUN、WebDAV、FTP 与管理后台在接受连接或处理请求时查询它。
binstall
Package binstall 为托管的外部程序(frp、cloudflared、tailscale、FileBrowser Quantum)提供在线安装、 更新与回滚:从上游下载指定或最新版本并校验 SHA-256,安装到配置目录的 bin 下; 替换前把旧版本移入 bin/.versions/<程序>/,最多保留 MaxBackups 个,可随时切回。
Package binstall 为托管的外部程序(frp、cloudflared、tailscale、FileBrowser Quantum)提供在线安装、 更新与回滚:从上游下载指定或最新版本并校验 SHA-256,安装到配置目录的 bin 下; 替换前把旧版本移入 bin/.versions/<程序>/,最多保留 MaxBackups 个,可随时切回。
config
Package config 提供按模块划分的明文 JSON 配置存储。
Package config 提供按模块划分的明文 JSON 配置存储。
crashlog
Package crashlog 把进程崩溃时 Go 运行时输出的 panic / fatal error 与堆栈保存到配置目录, 下次启动时整理进 crash.log,并判断上次运行是否异常结束。
Package crashlog 把进程崩溃时 Go 运行时输出的 panic / fatal error 与堆栈保存到配置目录, 下次启动时整理进 crash.log,并判断上次运行是否异常结束。
crud
Package crud 为"有序规则列表"类配置提供通用的增删改查、启停与排序接口。
Package crud 为"有序规则列表"类配置提供通用的增删改查、启停与排序接口。
ctl
Package ctl 实现 Gately 的命令行客户端与 MCP 服务器:二者都通过 HTTP + API 令牌调用运行中的实例, 不重复任何业务逻辑,接口清单直接来自实例的 OpenAPI 文档。
Package ctl 实现 Gately 的命令行客户端与 MCP 服务器:二者都通过 HTTP + API 令牌调用运行中的实例, 不重复任何业务逻辑,接口清单直接来自实例的 OpenAPI 文档。
demo
Package demo 实现在线演示模式:访客可以只读浏览一个带演示数据的实例。
Package demo 实现在线演示模式:访客可以只读浏览一个带演示数据的实例。
diag
Package diag 生成可安全提交到 issue 的诊断包:对配置与日志做脱敏,只保留定位问题所需的结构信息。
Package diag 生成可安全提交到 issue 的诊断包:对配置与日志做脱敏,只保留定位问题所需的结构信息。
dnsprovider
Package dnsprovider 封装各 DNS 服务商的记录更新接口。
Package dnsprovider 封装各 DNS 服务商的记录更新接口。
events
Package events 提供进程内事件总线:各模块在状态变化时发布事件,通知中心等订阅者异步消费。
Package events 提供进程内事件总线:各模块在状态变化时发布事件,通知中心等订阅者异步消费。
fileusers
Package fileusers 保存 WebDAV、FTP、SMB 共用的文件服务共享用户。
Package fileusers 保存 WebDAV、FTP、SMB 共用的文件服务共享用户。
fsperm
Package fsperm 在创建文件和目录后显式设置权限。
Package fsperm 在创建文件和目录后显式设置权限。
fsperm/fspermtest
Package fspermtest 为各文件服务的测试建立同一种目录布局:整个数据盘被共享,Gately 的配置目录就在其中。
Package fspermtest 为各文件服务的测试建立同一种目录布局:整个数据盘被共享,Gately 的配置目录就在其中。
fwopen
Package fwopen 在系统防火墙中自动放行 Gately 自身监听的端口(STUN 穿透、Web 服务监听、端口转发与协议分流使用)。
Package fwopen 在系统防火墙中自动放行 Gately 自身监听的端口(STUN 穿透、Web 服务监听、端口转发与协议分流使用)。
geoip
Package geoip 读取 MaxMind 格式(GeoLite2 / DB-IP 等)的国家或城市库,按 IP 查询国家代码。
Package geoip 读取 MaxMind 格式(GeoLite2 / DB-IP 等)的国家或城市库,按 IP 查询国家代码。
gosamba/bounds
Package bounds 提供与平台字长无关的报文区间边界判断。
Package bounds 提供与平台字长无关的报文区间边界判断。
gosamba/discovery
Package discovery provides mDNS/Bonjour service advertisement so Apple clients (macOS Finder, iOS) can auto-discover the gosamba SMB server.
Package discovery provides mDNS/Bonjour service advertisement so Apple clients (macOS Finder, iOS) can auto-discover the gosamba SMB server.
gosamba/inotify
Package inotify is a thin recursive-watch wrapper over Linux inotify.
Package inotify is a thin recursive-watch wrapper over Linux inotify.
gosamba/ntlm
Package ntlm implements the NTLMSSP message types and NTLMv2 verification needed for SMB3 SESSION_SETUP.
Package ntlm implements the NTLMSSP message types and NTLMv2 verification needed for SMB3 SESSION_SETUP.
gosamba/parent
Package parent contains the privileged SMB-server bootstrap.
Package parent contains the privileged SMB-server bootstrap.
gosamba/smb2
Package smb2 implements the SMB2/3 wire protocol.
Package smb2 implements the SMB2/3 wire protocol.
gosamba/smb3
Package smb3 implements SMB 3.x crypto primitives: SP800-108 KDF, AES-CMAC.
Package smb3 implements SMB 3.x crypto primitives: SP800-108 KDF, AES-CMAC.
gosamba/transport
Package transport implements the NetBIOS Session Service framing (RFC 1002 §4.3.1) used to carry SMB over TCP.
Package transport implements the NetBIOS Session Service framing (RFC 1002 §4.3.1) used to carry SMB over TCP.
gosamba/vfs
Package vfs handles share-relative path resolution and filesystem-info helpers for the SMB protocol.
Package vfs handles share-relative path resolution and filesystem-info helpers for the SMB protocol.
hostname
Package hostname 规范化与校验按 Host 头或 TLS SNI 匹配的域名。
Package hostname 规范化与校验按 Host 头或 TLS SNI 匹配的域名。
httpcompress
Package httpcompress 为 HTTP 响应提供 br / gzip 压缩,供 Web 服务站点与管理端共用。
Package httpcompress 为 HTTP 响应提供 br / gzip 压缩,供 Web 服务站点与管理端共用。
httpx
Package httpx 提供管理 API 共用的 JSON 读写与错误响应。
Package httpx 提供管理 API 共用的 JSON 读写与错误响应。
i18n
Package i18n 为后端运行时文案提供多语言:源码中的中文字面量即键,译文放在 locales/<语言>.json。
Package i18n 为后端运行时文案提供多语言:源码中的中文字面量即键,译文放在 locales/<语言>.json。
i18n/cmd/i18nsync command
i18nsync 把源码里的中文字面量同步到 internal/i18n/locales/<语言>.json: 新增的键写入空值等待翻译,已有译文保持不变,源码里已不存在的键默认保留(加 -prune 删除)。
i18nsync 把源码里的中文字面量同步到 internal/i18n/locales/<语言>.json: 新增的键写入空值等待翻译,已有译文保持不变,源码里已不存在的键默认保留(加 -prune 删除)。
i18n/extract
Package extract 扫描 Go 源码,收集所有含中文的字符串字面量,作为运行时翻译的键。
Package extract 扫描 Go 源码,收集所有含中文的字符串字面量,作为运行时翻译的键。
iplist
Package iplist 解析 IP 列表文本(每行一个 IP、CIDR 或地址范围),合并为有序区间后按二分查找判断地址是否在列表中, 供 Web 服务站点与 frps 实例的访问控制引用订阅的省市、运营商或黑名单 IP 列表。
Package iplist 解析 IP 列表文本(每行一个 IP、CIDR 或地址范围),合并为有序区间后按二分查找判断地址是否在列表中, 供 Web 服务站点与 frps 实例的访问控制引用订阅的省市、运营商或黑名单 IP 列表。
ipsource
Package ipsource 获取本机公网 IP,支持查询 URL、读取网卡和执行命令三种方式。
Package ipsource 获取本机公网 IP,支持查询 URL、读取网卡和执行命令三种方式。
knockgate
Package knockgate 是端口敲门(SPA)授权的进程内登记表,供其他模块按敲门结果放行连接。
Package knockgate 是端口敲门(SPA)授权的进程内登记表,供其他模块按敲门结果放行连接。
l4proxy
Package l4proxy 是四层(TCP/UDP)中转的公共部分:端口表达式、目标选择与故障转移、PROXY 协议头、 带连接数限制的 TCP 监听与流量统计,供端口转发与协议分流模块共用。
Package l4proxy 是四层(TCP/UDP)中转的公共部分:端口表达式、目标选择与故障转移、PROXY 协议头、 带连接数限制的 TCP 监听与流量统计,供端口转发与协议分流模块共用。
logbuf
Package logbuf 提供带序号的内存环形日志缓冲,供前端增量拉取。
Package logbuf 提供带序号的内存环形日志缓冲,供前端增量拉取。
loginips
Package loginips 记录管理后台登录成功过的来源地址,用于发现“从没见过的地址登录”。
Package loginips 记录管理后台登录成功过的来源地址,用于发现“从没见过的地址登录”。
luckyimport
Package luckyimport 解析 Lucky 的 .lkcf 配置文件,用于迁移到 Gately。
Package luckyimport 解析 Lucky 的 .lkcf 配置文件,用于迁移到 Gately。
minisign
Package minisign 实现 minisign(https://jedisct1.github.io/minisign/)公钥、签名与私钥文件格式, 算法为 Ed25519。
Package minisign 实现 minisign(https://jedisct1.github.io/minisign/)公钥、签名与私钥文件格式, 算法为 Ed25519。
module
Package module 定义功能模块的统一接口。
Package module 定义功能模块的统一接口。
modules/backup
Package backup 实现定时配置备份:按 cron 表达式打包全部配置,写入本地目录或存储挂载中的挂载点 (本地目录、WebDAV),支持口令加密与按数量保留,并在成功或失败时发布通知事件。
Package backup 实现定时配置备份:按 cron 表达式打包全部配置,写入本地目录或存储挂载中的挂载点 (本地目录、WebDAV),支持口令加密与按数量保留,并在成功或失败时发布通知事件。
modules/cloudflared
Package cloudflared 托管 cloudflared 隧道: 使用 Cloudflare Zero Trust 的隧道令牌运行已配置的隧道,或创建无需账号的临时公网隧道。
Package cloudflared 托管 cloudflared 隧道: 使用 Cloudflare Zero Trust 的隧道令牌运行已配置的隧道,或创建无需账号的临时公网隧道。
modules/cron
Package cron 实现计划任务模块:按 cron 表达式定时执行命令或 HTTP 请求,并保留最近的执行记录。
Package cron 实现计划任务模块:按 cron 表达式定时执行命令或 HTTP 请求,并保留最近的执行记录。
modules/ddns
Package ddns 实现动态域名解析模块。
Package ddns 实现动态域名解析模块。
modules/docker
Package docker 实现 Docker 管理模块:查看容器、启停、日志,以及检查镜像更新并按原配置重建容器。
Package docker 实现 Docker 管理模块:查看容器、启停、日志,以及检查镜像更新并按原配置重建容器。
modules/easytier
Package easytier 托管 EasyTier 的 easytier-core 进程,并通过 easytier-cli 读取节点状态, 把本机加入 EasyTier 组网(P2P 打洞优先,必要时经公共节点或自建节点中继)。
Package easytier 托管 EasyTier 的 easytier-core 进程,并通过 easytier-cli 读取节点状态, 把本机加入 EasyTier 组网(P2P 打洞优先,必要时经公共节点或自建节点中继)。
modules/filebrowser
Package filebrowser 托管 FileBrowser Quantum(gtsteffaniak/filebrowser)文件管理器: 在界面中维护实例(监听地址、共享目录、登录方式、管理员账号),生成配置文件并守护外部进程。
Package filebrowser 托管 FileBrowser Quantum(gtsteffaniak/filebrowser)文件管理器: 在界面中维护实例(监听地址、共享目录、登录方式、管理员账号),生成配置文件并守护外部进程。
modules/frp
Package frp 托管 frpc(内网穿透客户端)与 frps(服务端): 在界面中维护多个 frpc / frps 实例与代理列表,生成配置文件并守护外部 frp 进程。
Package frp 托管 frpc(内网穿透客户端)与 frps(服务端): 在界面中维护多个 frpc / frps 实例与代理列表,生成配置文件并守护外部 frp 进程。
modules/ftp
Package ftp 实现 FTP 文件服务:多用户、每个用户映射到一个或多个目录,可设为只读,支持 FTPS 与被动端口范围。
Package ftp 实现 FTP 文件服务:多用户、每个用户映射到一个或多个目录,可设为只读,支持 FTPS 与被动端口范围。
modules/guard
Package guard 实现入侵防护模块(类似 fail2ban):按日志规则、诱饵端口与端口扫描检测发现恶意 IP, 写入共享封禁表(internal/banlist),并同步到系统防火墙(nftables)在内核层丢弃其全部流量。
Package guard 实现入侵防护模块(类似 fail2ban):按日志规则、诱饵端口与端口扫描检测发现恶意 IP, 写入共享封禁表(internal/banlist),并同步到系统防火墙(nftables)在内核层丢弃其全部流量。
modules/knock
Package knock 实现端口敲门模块:接收与 fwknop 兼容的单包授权(SPA)报文,认证通过后在限定时间内 为来源地址放行受保护的端口。
Package knock 实现端口敲门模块:接收与 fwknop 兼容的单包授权(SPA)报文,认证通过后在限定时间内 为来源地址放行受保护的端口。
modules/netbird
Package netbird 托管 NetBird 守护进程并通过 netbird 命令完成登录与状态展示, 把本机加入 NetBird 官方云或自建管理服务的组网。
Package netbird 托管 NetBird 守护进程并通过 netbird 命令完成登录与状态展示, 把本机加入 NetBird 官方云或自建管理服务的组网。
modules/nettools
Package nettools 提供网络诊断工具:Ping、Traceroute、TCP 端口探测、DNS 查询、测速与局域网扫描。
Package nettools 提供网络诊断工具:Ping、Traceroute、TCP 端口探测、DNS 查询、测速与局域网扫描。
modules/notify
Package notify 实现通知中心:订阅进程内事件,按规则经 Webhook、Telegram、Bark、企业微信、钉钉、飞书、邮件等渠道推送。
Package notify 实现通知中心:订阅进程内事件,按规则经 Webhook、Telegram、Bark、企业微信、钉钉、飞书、邮件等渠道推送。
modules/perf
Package perf 提供性能监控:后台定时采样主机、Gately 进程与各站点的指标,保留 24 小时分钟级历史, 并按告警规则(指标 + 阈值 + 持续时长)在条件持续满足时发布性能告警事件,恢复时发布恢复事件, 事件经通知中心送达各渠道。
Package perf 提供性能监控:后台定时采样主机、Gately 进程与各站点的指标,保留 24 小时分钟级历史, 并按告警规则(指标 + 阈值 + 持续时长)在条件持续满足时发布性能告警事件,恢复时发布恢复事件, 事件经通知中心送达各渠道。
modules/portforward
Package portforward 实现 TCP/UDP 端口转发模块。
Package portforward 实现 TCP/UDP 端口转发模块。
modules/protoroute
Package protoroute 实现协议分流模块:多个服务共用一个 TCP 端口,按客户端最先发送的数据识别协议 (TLS 再看 SNI 与 ALPN,HTTP 再看 Host),把整条连接透传给对应的后端。
Package protoroute 实现协议分流模块:多个服务共用一个 TCP 端口,按客户端最先发送的数据识别协议 (TLS 再看 SNI 与 ALPN,HTTP 再看 Host),把整条连接透传给对应的后端。
modules/registry
Package registry 集中创建全部功能模块,供主程序、文档导出与测试共用。
Package registry 集中创建全部功能模块,供主程序、文档导出与测试共用。
modules/smb
Package smb 实现 SMB 文件服务:多用户,每个用户映射到一个或多个目录,每个目录作为一个共享,可设为只读。
Package smb 实现 SMB 文件服务:多用户,每个用户映射到一个或多个目录,每个目录作为一个共享,可设为只读。
modules/ssl
Package ssl 实现证书管理模块:ACME 自动签发与续期、上传证书、读取文件证书, 并可把证书写到目录供其他服务使用,同时为 Web 服务模块提供按 SNI 选择证书的能力。
Package ssl 实现证书管理模块:ACME 自动签发与续期、上传证书、读取文件证书, 并可把证书写到目录供其他服务使用,同时为 Web 服务模块提供按 SNI 选择证书的能力。
modules/storage
Package storage 实现存储挂载与文件管理:登记本地目录、远程 WebDAV 或 SMB 共享作为挂载点, 并提供浏览器内的文件浏览、上传、下载、新建目录、重命名与删除。
Package storage 实现存储挂载与文件管理:登记本地目录、远程 WebDAV 或 SMB 共享作为挂载点, 并提供浏览器内的文件浏览、上传、下载、新建目录、重命名与删除。
modules/stun
Package stun 实现 STUN 内网穿透模块:在 NAT1(全锥形)网络下获取公网映射端口, 并通过保活与内置转发把外部访问引到内网服务。
Package stun 实现 STUN 内网穿透模块:在 NAT1(全锥形)网络下获取公网映射端口, 并通过保活与内置转发把外部访问引到内网服务。
modules/tailscale
Package tailscale 托管 tailscaled 并通过 tailscale 命令完成登录与状态展示, 把本机加入 Tailscale 或 Headscale 组网,可发布子网路由与出口节点。
Package tailscale 托管 tailscaled 并通过 tailscale 命令完成登录与状态展示, 把本机加入 Tailscale 或 Headscale 组网,可发布子网路由与出口节点。
modules/waf
Package waf 实现基于 Coraza 与 OWASP 核心规则集(CRS)的 Web 应用防火墙, 以实例形式供 Web 服务的站点引用。
Package waf 实现基于 Coraza 与 OWASP 核心规则集(CRS)的 Web 应用防火墙, 以实例形式供 Web 服务的站点引用。
modules/webdav
Package webdav 实现 WebDAV 文件服务:多用户、每个用户映射到一个或多个目录,可设为只读。
Package webdav 实现 WebDAV 文件服务:多用户、每个用户映射到一个或多个目录,可设为只读。
modules/webservice
Package webservice 实现 Web 服务模块:按域名把请求分发到反向代理、重定向、静态文件或固定文本, 支持 HTTPS(证书来自证书模块)、PROXY 协议、基本认证、网页认证与 IP 访问控制。
Package webservice 实现 Web 服务模块:按域名把请求分发到反向代理、重定向、静态文件或固定文本, 支持 HTTPS(证书来自证书模块)、PROXY 协议、基本认证、网页认证与 IP 访问控制。
modules/webterminal
Package webterminal 实现 Web 终端:通过 WebSocket 在浏览器中使用 SSH、Telnet 或本机 Shell, 会话由服务端持久保存,浏览器断开后可按设置保留并重新附着。
Package webterminal 实现 Web 终端:通过 WebSocket 在浏览器中使用 SSH、Telnet 或本机 Shell, 会话由服务端持久保存,浏览器断开后可按设置保留并重新附着。
modules/wol
Package wol 实现网络唤醒模块:向局域网发送魔术包唤醒设备,并可通过 TCP 端口探测设备是否在线; 远程关机有三种方式:经 Web 终端的 SSH 连接执行命令、由设备上运行的客户端执行(客户端主动连接, 还支持重启与睡眠)、向设备或其他服务发送 HTTP 请求;并可接入巴法云,用小爱同学、小度等语音助手开关设备。
Package wol 实现网络唤醒模块:向局域网发送魔术包唤醒设备,并可通过 TCP 端口探测设备是否在线; 远程关机有三种方式:经 Web 终端的 SSH 连接执行命令、由设备上运行的客户端执行(客户端主动连接, 还支持重启与睡眠)、向设备或其他服务发送 HTTP 请求;并可接入巴法云,用小爱同学、小度等语音助手开关设备。
mountfs
Package mountfs 把多个本地目录组合成一个虚拟文件系统:根目录只读,按挂载名称列出各目录, 每个挂载可单独设为只读。
Package mountfs 把多个本地目录组合成一个虚拟文件系统:根目录只读,按挂载名称列出各目录, 每个挂载可单独设为只读。
netpipe
Package netpipe 提供两个连接之间的双向转发。
Package netpipe 提供两个连接之间的双向转发。
openports
Package openports 登记各模块临时打开、不一定随时处于监听状态的端口(如 FTP 被动模式的数据端口)。
Package openports 登记各模块临时打开、不一定随时处于监听状态的端口(如 FTP 被动模式的数据端口)。
outbound
Package outbound 统一管理员配置的出站 HTTP 请求(Webhook、通知、IP 列表订阅、DDNS 回调与查询地址、 更新检查与程序下载、第三方登录等)的拨号层限制。
Package outbound 统一管理员配置的出站 HTTP 请求(Webhook、通知、IP 列表订阅、DDNS 回调与查询地址、 更新检查与程序下载、第三方登录等)的拨号层限制。
proc
Package proc 托管外部可执行文件(frpc、cloudflared、tailscaled 等): 查找二进制、后台运行、异常退出自动重启、把输出写入模块日志。
Package proc 托管外部可执行文件(frpc、cloudflared、tailscaled 等): 查找二进制、后台运行、异常退出自动重启、把输出写入模块日志。
proxyx
Package proxyx 统一处理出站代理设置:通知渠道、Webhook、订阅下载等访问外部服务时, 可以按配置走指定代理、复用全局「更新代理」或强制直连。
Package proxyx 统一处理出站代理设置:通知渠道、Webhook、订阅下载等访问外部服务时, 可以按配置走指定代理、复用全局「更新代理」或强制直连。
releasesig
Package releasesig 保存 Gately 发布签名的受信公钥,并验证发布中 checksums.txt 的 minisign 签名。
Package releasesig 保存 Gately 发布签名的受信公钥,并验证发布中 checksums.txt 的 minisign 签名。
resolver
Package resolver 让程序的出站域名解析使用自定义 DNS 服务器,支持普通 DNS 与 DNS over HTTPS。
Package resolver 让程序的出站域名解析使用自定义 DNS 服务器,支持普通 DNS 与 DNS over HTTPS。
reuseport
Package reuseport 提供可复用端口的监听与拨号,使同一本地端口既能监听入站连接, 又能主动连接 STUN 服务器与保活服务器(STUN 穿透的关键)。
Package reuseport 提供可复用端口的监听与拨号,使同一本地端口既能监听入站连接, 又能主动连接 STUN 服务器与保活服务器(STUN 穿透的关键)。
script
Package script 执行用户配置的 Shell 脚本,变量通过环境变量传入以避免注入。
Package script 执行用户配置的 Shell 脚本,变量通过环境变量传入以避免注入。
service
Package service 把 Gately 注册为系统服务,实现开机自启与异常退出后自动拉起: Linux 使用 systemd,macOS 使用 launchd,Windows 使用服务控制管理器(SCM)。
Package service 把 Gately 注册为系统服务,实现开机自启与异常退出后自动拉起: Linux 使用 systemd,macOS 使用 launchd,Windows 使用服务控制管理器(SCM)。
spa
Package spa 实现与 fwknop 兼容的单包授权(Single Packet Authorization,SPA)报文的解析与生成。
Package spa 实现与 fwknop 兼容的单包授权(Single Packet Authorization,SPA)报文的解析与生成。
stun
Package stun 实现 RFC 5389 的 Binding 请求与响应,用于获取 NAT 映射后的公网地址。
Package stun 实现 RFC 5389 的 Binding 请求与响应,用于获取 NAT 映射后的公网地址。
stunaddr
Package stunaddr 保存各条 STUN 穿透规则当前的公网地址, 供 Web 服务的重定向目标、动态域名的记录值与 Webhook 等按规则名引用({STUN_规则名_PORT} 等变量)。
Package stunaddr 保存各条 STUN 穿透规则当前的公网地址, 供 Web 服务的重定向目标、动态域名的记录值与 Webhook 等按规则名引用({STUN_规则名_PORT} 等变量)。
sysstat
Package sysstat 采集概览页展示的主机与进程信息:CPU、内存、磁盘、网卡与实时速率。
Package sysstat 采集概览页展示的主机与进程信息:CPU、内存、磁盘、网卡与实时速率。
systz
Package systz 在系统没有标准时区文件时,从 OpenWrt 的配置中识别本机时区。
Package systz 在系统没有标准时区文件时,从 OpenWrt 的配置中识别本机时区。
thirdauth
Package thirdauth 实现自建的第三方登录(GitHub、Google、QQ 与通用 OIDC)。
Package thirdauth 实现自建的第三方登录(GitHub、Google、QQ 与通用 OIDC)。
trustsrc
Package trustsrc 登记各模块确认过身份的来源地址(如用正确令牌登录 frps 的 frpc), 入侵防护的诱饵端口与扫描检测不统计这些来源。
Package trustsrc 登记各模块确认过身份的来源地址(如用正确令牌登录 frps 的 frpc), 入侵防护的诱饵端口与扫描检测不统计这些来源。
upnp
Package upnp 实现 UPnP IGD 端口映射(SSDP 发现 + SOAP 控制)与 NAT-PMP 端口映射。
Package upnp 实现 UPnP IGD 端口映射(SSDP 发现 + SOAP 控制)与 NAT-PMP 端口映射。
version
Package version 保存构建时注入的版本信息。
Package version 保存构建时注入的版本信息。
visitors
Package visitors 实现访客审计:按访客地址聚合 Web 服务收到的请求,记录谁在何时访问了哪些站点与路径、 以什么身份访问、被拦截了多少次。
Package visitors 实现访客审计:按访客地址聚合 Web 服务收到的请求,记录谁在何时访问了哪些站点与路径、 以什么身份访问、被拦截了多少次。
webauthn
Package webauthn 实现 Passkey(WebAuthn)登录所需的最小协议:注册(attestation 为 none)与断言校验。
Package webauthn 实现 Passkey(WebAuthn)登录所需的最小协议:注册(attestation 为 none)与断言校验。
webauthn/webauthntest
Package webauthntest 提供软件模拟的 WebAuthn 验证器,仅供测试使用。
Package webauthntest 提供软件模拟的 WebAuthn 验证器,仅供测试使用。
webhook
Package webhook 实现带变量替换的 HTTP 回调,供 DDNS、STUN 等模块在状态变化时通知外部系统。
Package webhook 实现带变量替换的 HTTP 回调,供 DDNS、STUN 等模块在状态变化时通知外部系统。
webpage
Package webpage 渲染访客直接看到的独立页面:Web 服务的登录页、404/502 等错误页、管理后台的安全入口提示。
Package webpage 渲染访客直接看到的独立页面:Web 服务的登录页、404/502 等错误页、管理后台的安全入口提示。
webprobe
Package webprobe 把 Web 服务处理完的请求交给入侵防护,按路径探测规则计数封禁。
Package webprobe 把 Web 服务处理完的请求交给入侵防护,按路径探测规则计数封禁。
tools
custombuild command
custombuild 按仓库根目录的 modules.json 做定制构建:校验模块、语言档位与构建目标,补齐依赖的模块, 计算 go build 的 build tags、前端构建的 GATELY_LOCALES 与组合键(profile),并可直接构建安装包。
custombuild 按仓库根目录的 modules.json 做定制构建:校验模块、语言档位与构建目标,补齐依赖的模块, 计算 go build 的 build tags、前端构建的 GATELY_LOCALES 与组合键(profile),并可直接构建安装包。
demo command
命令 demo 生成在线演示实例的配置目录,用法:go run ./tools/demo -out /tmp/gately-demo
命令 demo 生成在线演示实例的配置目录,用法:go run ./tools/demo -out /tmp/gately-demo
demo/gen
Package gen 生成在线演示实例使用的配置目录:覆盖各模块的逼真数据。
Package gen 生成在线演示实例使用的配置目录:覆盖各模块的逼真数据。
sign command
sign 是发布签名工具:生成 minisign 格式的密钥对、给文件签名、验证签名,纯 Go 实现,CI 中不需要安装 minisign。
sign 是发布签名工具:生成 minisign 格式的密钥对、给文件签名、验证签名,纯 Go 实现,CI 中不需要安装 minisign。
Package web 嵌入前端构建产物。
Package web 嵌入前端构建产物。

Jump to

Keyboard shortcuts

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