explaingit

trojan-gfw/trojan

Analysis updated 2026-06-21

19,725C++Audience · developerComplexity · 4/5LicenseSetup · hard

TLDR

A censorship circumvention proxy that disguises your internet traffic as ordinary HTTPS, making it very hard for the Great Firewall or deep packet inspection systems to detect or block it.

Mindmap

mindmap
  root((repo))
    What It Does
      Censorship bypass
      HTTPS camouflage
      Traffic obfuscation
    Tech Stack
      C++
      Boost
      OpenSSL
      MySQL optional
    Use Cases
      Personal proxy server
      Multi-user VPS proxy
      GFW circumvention
    How It Works
      Runs over TLS
      Looks like HTTPS
      Fallback real site
    Audience
      Developers
      Privacy users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Set up a personal proxy server that disguises traffic as HTTPS to bypass network censorship with minimal detection risk.

USE CASE 2

Host a Trojan server on a VPS outside the firewall so clients connect through it looking like normal HTTPS traffic.

USE CASE 3

Replace a detectable VPN or Shadowsocks proxy with Trojan for an approach that is much harder for deep packet inspection to identify.

USE CASE 4

Route multiple users through a single Trojan server using optional MySQL-backed authentication with per-user passwords.

What is it built with?

C++BoostOpenSSLMySQL

How does it compare?

trojan-gfw/trojanlettier/3d-game-shaders-for-beginnersk4yt3x/video2x
Stars19,72519,59319,881
LanguageC++C++C++
Setup difficultyhardhardmoderate
Complexity4/54/53/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Requires compiling C++ from source with Boost and OpenSSL, a domain with a valid TLS certificate, and a VPS located outside the censored network.

GPLv3, free to use, modify, and distribute, but any modified version you distribute must also be open source under the same GPL license.

In plain English

Trojan is a censorship circumvention tool designed to help users bypass the Great Firewall of China (GFW). Its distinguishing approach is camouflage: rather than using a recognizable proxy protocol that network monitors could detect and block, Trojan disguises traffic as ordinary HTTPS, the same encrypted protocol used by every normal website. To a network observer or deep packet inspection system, connections look identical to regular HTTPS traffic, making the proxy very difficult to identify and block. It runs over TLS (the encryption layer used by HTTPS) and supports multiple protocols on top of that. The project is written in C++ and relies on Boost, OpenSSL, and optionally MySQL as dependencies. It is open source under the GPLv3 license.

Copy-paste prompts

Prompt 1
Help me set up a Trojan server on an Ubuntu VPS: install Boost and OpenSSL, compile from source, configure TLS with a real domain and a Let's Encrypt certificate.
Prompt 2
Write a Trojan server config file for port 443 with a real TLS certificate and a fallback to a real HTTPS site for unauthenticated connections.
Prompt 3
Show me how to compile Trojan on Debian with Boost and OpenSSL, then write a client config.json to connect to my server.
Prompt 4
How do I set up Trojan with MySQL authentication so multiple users share the same server, each with their own password?

Frequently asked questions

What is trojan?

A censorship circumvention proxy that disguises your internet traffic as ordinary HTTPS, making it very hard for the Great Firewall or deep packet inspection systems to detect or block it.

What language is trojan written in?

Mainly C++. The stack also includes C++, Boost, OpenSSL.

What license does trojan use?

GPLv3, free to use, modify, and distribute, but any modified version you distribute must also be open source under the same GPL license.

How hard is trojan to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is trojan for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub trojan-gfw on gitmyhub

Verify against the repo before relying on details.