Automic VaultAutomic Vault

brew

Install trojan-go with Homebrew, MacPorts, Nix

Trojan proxy in Go. Version 0.10.6 via Homebrew; verified from local package data.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install trojan-go

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install trojan-go

MacPorts ports tree · net/trojan-go/Portfile · source: api.github.com

Linux

Nixverified · 92%
nix profile install nixpkgs#trojan-go

nixpkgs package indexes · pkgs/by-name/tr/trojan-go/package.nix · source: api.github.com

overview

Package summary

Trojan proxy in Go

Commands and aliases

  • trojan-go

history

Project history and usage

Trojan-Go is a Go implementation of the Trojan proxy protocol. The official README describes it as compatible with the original Trojan protocol and configuration file format, while adding performance, routing, WebSocket, AEAD, plugin, API, and YAML configuration features.

Project history

Trojan-Go's history is best understood as an extension-oriented reimplementation rather than a wholly separate protocol. Its README emphasizes compatibility with the original Trojan feature set, including TLS tunneling, UDP proxying, transparent proxy modes, detection-resistance mechanisms, MySQL persistence, user authentication, traffic statistics, and quota controls.

The Go implementation then adds features aimed at real-world deployment friction: a simplified mode, automatic SOCKS5/HTTP proxy adaptation, TProxy support, smux multiplexing, custom routing, WebSocket-over-TLS for CDN transit, TLS fingerprint handling, gRPC APIs, pluggable transports, Shadowsocks AEAD-style secondary encryption, and YAML configuration.

Adoption history

The official README points users to precompiled release binaries, Docker deployment, and a Telegram feedback group. It also names graphical clients that support Trojan-Go extensions, including Qv2ray and Igniter-Go, while noting compatibility with original Trojan clients when extension-only features are not used.

This adoption history is concentrated in the proxy/censorship-circumvention tooling niche rather than general networking. Package managers such as Homebrew, MacPorts, and Nix make the daemon easier to install on developer machines and small servers, while the README's cross-compilation examples show interest in routers, Raspberry Pi, and other constrained targets.

How it is used

The README documents quick server and client startup flags, conventional config-file operation with `trojan-go -config config.json`, URL-based client startup, and Docker deployment with host-mounted configuration. It shows separate server and client examples and provides both JSON and YAML client/server config examples.

Package users typically install the binary, write a server or client config, and run it as a local proxy, transparent proxy, relay, or daemon. The package is useful to operators who want the Trojan ecosystem with a single Go binary and extra transports such as WebSocket over TLS.

Why package nerds care

Trojan-Go is package-nerd-significant because it is a protocol-compatible reimplementation that exposes many deployment choices through one binary. It is also an example of proxy tooling where packaging, release binaries, Docker images, and cross-compilation all matter because users deploy the same tool on desktops, servers, routers, and small devices.

Its Homebrew formula is especially relevant for macOS users who want to test or operate proxy tooling without manually downloading release archives from GitHub.

Timeline

  • Original Trojan compatibility: README documents compatibility with the original Trojan protocol and config format.
  • Extension phase: README documents multiplexing, routing, WebSocket-over-TLS, AEAD, gRPC API, transport plugins, and YAML config.
  • Current README: precompiled binaries, Docker deployment, quick-start flags, and config-file operation are documented as primary usage paths.

Related projects

  • Trojan, Qv2ray, Igniter-Go, Shadowsocks AEAD, smux, v2ray-plugin

security posture

Risk level: orange

formula declares a Homebrew service.

Risk classifier

orange risk · medium confidence · infrastructure

Why

  • formula declares a Homebrew service

Signals

  • metadata:service

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Formula metadata declares a service or daemon block.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Build metadata lists 1 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
config.jsonserver.jsonclient.jsonclient.yaml

executables

Installed executables

CommandKindExposureNote
trojan-gocliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version0.10.6
manager updated
local dataok
upstreamnot checked
latest detectednot detected

https://github.com/p4gefau1t/trojan-go

install metadata

Package metadata

Package keybrew:trojan-go
Version0.10.6
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/trojan-go
Homepagehttps://p4gefau1t.github.io/trojan-go/
Repositoryhttps://github.com/p4gefau1t/trojan-go
Upstream docshttps://p4gefau1t.github.io/trojan-go
LicenseGPL-3.0-only
Source archivehttps://github.com/p4gefau1t/trojan-go.git
Build dependenciesgo
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicedeclared
CaveatsAn example config is installed to $HOMEBREW_PREFIX/etc/trojan-go/config.json

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nametrojan-go
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

trojan-go

nix profile install nixpkgs#trojan-go
  • normalized package name match
  • Matched by: Trojan Go
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/tr/trojan-go/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
MacPorts95%

trojan-go

sudo port install trojan-go
  • normalized package name match
  • Matched by: Trojan Go
MacPorts ports tree · api.github.com · MacPorts ports tree: net/trojan-go/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment