Teleport is a macOS menu bar client for the Xray proxy core. It keeps a list of VLESS, Trojan, Shadowsocks, Hysteria 2 and WireGuard connections, imports them from subscription URLs, and sends traffic through the selected one either by setting the macOS system proxy or by routing the whole machine through a TUN interface.
- Connections from
vless://,trojan://,ss://,hysteria2://(hy2://) andwireguard://links and from WireGuard[Interface]configuration files. - Subscriptions from
http://andhttps://URLs, with periodic refresh and duplicate filtering. - Composite Xray portals with automatic server selection, XHTTP extra settings and explicit Mux. Supported settings and limits are in docs/composite-profiles.md.
- Two connection modes: System Proxy (no administrator rights) and TUN (the whole machine is routed through a tunnel interface; needs a root helper).
- Split routing: rules by domain, IP range, geosite category or geoip country, grouped in named profiles. A rule can send its traffic through a different saved connection, so one session can dial several servers.
- Geodata (
geoip.dat,geosite.dat) bundled, with optional downloads from a source of your choice. - An optional pf-based leak guard (off by default) that keeps traffic off the physical network while a TUN session is being rebuilt.
- TCP latency checks for every connection, shown in the menu bar picker.
- macOS 15 or later. Tested on macOS 27.
- Apple Silicon or Intel.
- To build: Xcode 26 or later, and optionally just for the command-line recipes.
- TUN mode asks for an administrator password to install the helper and approve a changed build.
There is no signed or notarized download yet. Build from source:
just install # builds Release, installs Teleport.app into /ApplicationsOr open teleport.xcodeproj in Xcode and run the teleport scheme.
Without a DEVELOPMENT_TEAM the build is signed ad hoc. Both System Proxy and TUN modes work. TUN mode asks an administrator to approve the app and helper build; updating either can require approval again.
On first launch the app has no connections. Add a link or a subscription URL in Settings > Connections. The same page can add two community subscription lists that ship with the app (packaging/bundled-connections.json, from igareck/vpn-configs-for-russia). They are not added on their own: the servers in those lists are run by people nobody here knows, and everything sent through them can be read or altered by whoever operates them.
Portal order defaults to Original, matching each subscription's entry order. Name and Latency remain available in General settings. Previously saved sort choices are preserved; select Original and refresh an existing subscription once to restore the provider's order.
Subscriptions can refresh while connected. Portal lists update immediately; the running connection keeps its configuration until the next connection. Imported routing rules and geodata changes also wait until then.
Subscription responses can deliver a Happ/INCY routing profile in the HTTP routing
header. Teleport imports it into Settings > Split Tunneling as soon as the
subscription is added, and updates that subscription's profile on refresh.
The header accepts raw base64 JSON, happ://routing/onadd/<base64>,
incy://routing/onadd/<base64> and the scheme-less ://routing/onadd/<base64> form.
onadd (and raw base64) selects the profile and enables split tunneling;
add stores it without changing the selected profile; off or
<scheme>://routing/off disables split tunneling while keeping profiles.
The imported fields are Name, GlobalProxy, RouteOrder, and the
DirectSites/DirectIp, ProxySites/ProxyIp, BlockSites/BlockIp lists.
Rules support domains (including domain: and full:), IP/CIDR, geosite: and
geoip:. They apply in TUN mode on the next connection. HTTPS GeositeURL and
GeoipURL sources are saved with the routing profile and downloaded when that
profile is imported, without replacing the active session’s data. Refreshing a profile also updates its
sources, including routing/add. A missing URL uses bundled data for that kind;
an omitted or invalid source pair on refresh preserves the previous sources.
Profile DNS settings, FakeDNS, chunk files and DomainStrategy are not transferred;
Teleport reports these in the subscription's status and uses its own settings.
Invalid routing leaves existing profiles intact and does not prevent server
imports. Routing links in the response body and the separate autorouting
header are not imported.
Each routing profile keeps its own geodata sources. Downloaded categories take precedence over bundled categories with the same name; categories missing from the download remain available from bundled data. Source downloads and their caches stay separate from the combined files used by Xray. An incomplete profile blocks TUN split routing until its data is ready; System Proxy and TUN with split routing disabled remain available.
Enable Settings → Advanced → AI assistants → MCP access, then copy the MCP client configuration. Local assistants can inspect and edit split routing and subscriptions, check routes for batches of destinations, inspect and refresh geodata, and explicitly apply deferred subscription routing through the running app. Changes support previews and revision checks; live routing changes require explicit reconnect permission. See MCP setup and tools.
Starts the bundled Xray as the current user, listens on local HTTP and SOCKS5 ports (8080 and 1080 by default) and enables the macOS system proxy for the active network service. Applications that ignore the system proxy are not routed. No root access is involved, and the proxy settings are restored on disconnect, on quit, and on the next launch if the app did not get to it.
Starts Xray as root through Teleport's privileged helper with a TUN inbound, and routes the machine through it:
0.0.0.0/1, 128.0.0.0/1 -> Teleport's utun (IPv4)
::/1, 8000::/1 -> Teleport's utun (IPv6, only when the uplink has global IPv6)
<each proxy server>/32 -> the original gateway (so Xray's own connection stays outside the tunnel)
DNS is answered by Xray inside the tunnel; the helper publishes a resolver entry for it (State:/Network/Service/dev.x.teleport/DNS) and removes it on stop. Split routing rules with the direct action leave through the physical interface. When the machine wakes from sleep or the network changes, the session is torn down and rebuilt on the new uplink.
If another VPN owns the default utun route, Teleport refuses to start TUN mode. Disconnect it first, or use System Proxy mode.
Settings > General > Leak guard. When on, a pf ruleset (anchor com.apple/dev.x.teleport) drops any outbound traffic that would bypass the tunnel.
- Allowed: loopback, the tunnel interface, DHCP, local and link-local destinations, DNS (ports 53 and 853), the servers of the current session, and root processes (Xray's
directoutbound runs as root). - Everything else outbound, IPv4 and IPv6, is dropped. Inbound traffic is not filtered.
- The guard is held on a lease: the app renews it every 45 seconds, the helper releases it after 180 seconds without renewal. A crashed app leaves the machine offline for at most three minutes. The helper also releases a guard it finds at its own start.
If a connection fails, the guard keeps direct traffic blocked while Connect retries the portal. To stop trying and restore direct traffic, choose Allow direct traffic in the menu bar or Settings. This action stays available after dismissing the error.
TUN mode installs a LaunchDaemon (dev.x.teleport.PrivilegedHelper) that runs as root and stays resident. Source: TeleportPrivilegedHelper/.
- It can only: report status, start or stop a session, read its own logs, engage or release the leak guard.
- Starting a session runs the root copy of Xray with the configuration the app sends, installs the routes above and publishes the DNS entry. The app passes data, never commands.
- The caller must be the user at the console and match the app code-signing hash approved during installation. Approval is stored in a root-owned manifest; a changed build needs approval again.
Connection links, which contain credentials, are stored encrypted under ~/Library/Application Support/teleport/sealed/, with the key in the login Keychain (service dev.x.teleport.configuration). Logs are written under ~/Library/Application Support/teleport/ and, for the helper, under /var/db/dev.x.teleport/.
- If you used TUN mode, remove the helper in Settings > General > TUN mode helper > Uninstall... It asks for an administrator password and also drops the leak guard rules.
- Quit Teleport and delete
/Applications/Teleport.app.
If the app is already gone, run scripts/uninstall.sh from a checkout (or just uninstall-helper). It removes the same files and lists what Teleport keeps in your home folder: ~/Library/Application Support/teleport/ and the dev.x.teleport.configuration item in Keychain.
If the machine has no network after a crash, the leak guard is still loaded. It expires within three minutes, or drop it now with sudo pfctl -a com.apple/dev.x.teleport -F all.
- No signed download yet, build from source.
- Another VPN that owns the default
utunroute blocks TUN mode entirely. - The leak guard lets DNS queries reach any resolver, and during a session it passes traffic of any root process, not only Xray.
Bug reports: https://github.com/bespoke-org/Teleport/issues
No Apple account or Team ID is required for local TUN mode. The installer verifies the app and helper code signatures and the pinned Xray digest, then repeats verification during administrator-authorized installation. The helper accepts only the approved app build running as the active console user. Approval does not notarize the app for distribution.
To use an Apple signing certificate, copy Config/Local.xcconfig.example to Config/Local.xcconfig and set DEVELOPMENT_TEAM. The optional file is ignored by git and applies to both targets. Ad hoc and Apple-signed builds use the same approval mechanism.
just --list # all recipes
just build-debug # Debug build into build/DerivedData
just build-release # Release build into build/DerivedData
just install # Release build, installed into /Applications
just package # Release build plus a .dmg in build/dist
just cleanTo replace the bundled Xray with the official release build for a given version:
scripts/fetch-xray.sh v26.11.9The script downloads the arm64 and x86_64 release archives, checks each against the digest XTLS publishes, joins them with lipo into one universal executable and compares it with the pin in BundledArtifactPolicy.swift; when upgrading, update the pin to the digest it prints and run it again. scripts/bump-xray.sh vX.Y.Z does the whole update: it fetches the release, writes the new pin and puts the version into this README, THIRD_PARTY_NOTICES.md and CHANGELOG.md. The .github/workflows/xray-update.yml workflow runs it through Updatecli once a day and opens a pull request when XTLS publishes a new stable release. The executable is not kept in git: just build runs the script when teleport/Resources/xray is missing or does not match the pin, and a build from Xcode fails until the script has been run once. Release builds are universal (just build-release), Debug builds are host-only. Licenses of the bundled components are in THIRD_PARTY_NOTICES.md.
Formatting follows .swift-format (four-space indent, 160 columns). Check with swift format lint -r teleport Shared TeleportPrivilegedHelper teleportTests TeleportPrivilegedHelperTests.
just testChecks are XCTest cases in teleportTests/ (app and shared code) and TeleportPrivilegedHelperTests/ (helper code); both bundles compile the sources they test, so no app or helper process runs. Run one class or method with just test-case <Class>[/<method>], e.g. just test-case CoreTests, or press Cmd-U in Xcode. just coverage prints line coverage. Connecting, helper installation and the leak guard on a real network are tested by hand.
For UI responsiveness regressions, match the app's default main-actor isolation:
XCODE_XCCONFIG_FILE="$PWD/Config/AppActorIsolationTests.xcconfig" just test-case AppViewModelSubscriptionRefreshTests
XCODE_XCCONFIG_FILE="$PWD/Config/AppActorIsolationTests.xcconfig" just test-case ConnectionHealthTestsThese cover subscription processing, asynchronous persistence, and probe runtime setup/cleanup. Without the override, the hostless tests can miss work that hops onto the main actor only in the app build.
Each Xray run owns a capture that drains its pipe on a dedicated serial IO queue. Read readiness is coalesced; reads and writes are inline in 16 KiB pieces, not enqueued per output chunk. After the child exits, stop drains the remaining pipe bytes, cancels the read source and waits for descriptor closure before a new run opens the log. Diagnostics retain up to 256 KiB of raw bytes (64 KiB startup context plus recent output and an omission marker); malformed or split UTF-8 is decoded lossily rather than hiding the error. Disk failure disables disk logging for that run, while bounded diagnostic capture and pipe draining continue.
The log viewer reads ~/Library/Application Support/teleport/xray.log. Xray logs rotate at 5 MiB or on the first write or startup after a local day change. Teleport keeps up to seven archives plus the active file, for at most 40 MiB of log data with default settings. On startup and each rotation, Teleport removes the oldest excess archives. It also removes archives older than seven calendar days during startup and daily maintenance. Archives use the name xray.log.<generation>.<UUID> and permissions 0600. On startup Teleport trims oversized legacy files to their most recent bytes. A restart appends to the current day's file when there is room. Run separators count toward the size limit.
Internal configuration has no UI and does not alter the sealed connection snapshot. Set one JSON string in the existing UserDefaults domain, then reconnect (do not restart a running connection just to change logging):
defaults write dev.x.teleport xrayLogPolicy -string '{"max_log_size":5242880,"retention_days":7}'
# Example only: daily rotation without a size trigger or age deletion
defaults write dev.x.teleport xrayLogPolicy -string '{"max_log_size":null,"retention_days":null}'
defaults delete dev.x.teleport xrayLogPolicy # restore engineering defaultsmax_log_size is a positive integer in bytes and retention_days is a positive integer in days. Missing fields use defaults. JSON null disables that field's size or age limit. Invalid values or malformed JSON trigger a warning and restore the defaults. With both fields null, Teleport still rotates daily and keeps the seven newest archives. Disabling the per-file size limit allows individual files to grow throughout the day. This policy applies to the System Proxy Xray log. Hostless tests use synthetic pipes and temporary files.
Although Teleport is built with LLMs, we put a lot of time and tokens into its stability and UX. If Teleport is useful to you, you can support that work with USDT.
Check the network before sending: a transfer on a network not listed here can be lost.
| Network | Address |
|---|---|
| TRON (TRC20) | TFKx2Mhwqkx94LSq9zbYAXj27yxPcTwqG1 |
| Ethereum (ERC20), BNB Chain (BEP20) | 0xe87761Cc781270389D2F55e2c7bA64E2cebb78E2 |
Teleport is licensed under GPL-3.0-or-later, see LICENSE. Copyright (C) 2026 Michael Chernigin, Nikita Rydanov. Licenses of the bundled components are in THIRD_PARTY_NOTICES.md.