# Install trojan-go with Homebrew, MacPorts, Nix

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

## Install

```sh
sudo av install brew:trojan-go
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install trojan-go
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install trojan-go
```

  Evidence: MacPorts ports tree: net/trojan-go/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#trojan-go
```

  Evidence: nixpkgs package indexes: pkgs/by-name/tr/trojan-go/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:trojan-go
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/trojan-go>
- **Version:** 0.10.6
- **Source summary:** Trojan proxy in Go
- **Homepage:** <https://p4gefau1t.github.io/trojan-go/>
- **Repository:** <https://github.com/p4gefau1t/trojan-go>
- **Upstream docs:** <https://p4gefau1t.github.io/trojan-go>
- **License:** GPL-3.0-only
- **Source archive:** <https://github.com/p4gefau1t/trojan-go.git>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- trojan-go (cli)
- trojan-go (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Service: declared
- Caveats: An example config is installed to $HOMEBREW_PREFIX/etc/trojan-go/config.json
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.10.6
- Local data: ok
- Upstream repository: https://github.com/p4gefau1t/trojan-go
- info: No package-manager update timestamp was available.
- info: No cached GitHub release or tag data was available.
## 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

### Sources

- <https://github.com/p4gefau1t/trojan-go#readme>
- <https://p4gefau1t.github.io/trojan-go>


## Security Notes

formula declares a Homebrew service.

- **Geiger risk:** orange / medium
- formula declares a Homebrew service


## 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

- Unix: config.json, server.json, client.json, client.yaml
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** trojan-go
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - trojan-go: normalized package name match | nixpkgs package indexes: pkgs/by-name/tr/trojan-go/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - trojan-go: normalized package name match | MacPorts ports tree: net/trojan-go/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [connect](https://www.automicvault.com/pkg/brew/connect/) - Shares av.db curated category or tags: cli, networking, proxy, tunneling.
- [gost](https://www.automicvault.com/pkg/brew/gost/) - Shares av.db curated category or tags: cli, go, networking, proxy.
- [mihomo](https://www.automicvault.com/pkg/brew/mihomo/) - Shares av.db curated category or tags: cli, go, networking, proxy.
- [pwnat](https://www.automicvault.com/pkg/brew/pwnat/) - Shares av.db curated category or tags: cli, networking, proxy, tunneling.
- [v2ray](https://www.automicvault.com/pkg/brew/v2ray/) - Shares av.db curated category or tags: cli, networking, proxy, tunneling.
- [brook](https://www.automicvault.com/pkg/brew/brook/) - Shares av.db curated category or tags: cli, networking, proxy.
- [cntlm](https://www.automicvault.com/pkg/brew/cntlm/) - Shares av.db curated category or tags: cli, networking, proxy, tunneling.
- [corkscrew](https://www.automicvault.com/pkg/brew/corkscrew/) - Shares av.db curated category or tags: cli, networking, proxy, tunneling.

## Combined YAML source

View the package source record on GitHub. [combined/trojan-go.yml](https://github.com/automic-vault/db/blob/main/combined/trojan-go.yml)


## Sources

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