Teddysun 168062f2de Update Dockerfile 9 月之前
..
Dockerfile 168062f2de Update Dockerfile 9 月之前
Dockerfile.architecture 168062f2de Update Dockerfile 9 月之前
README.md 49ad970132 Update trojan-go 1 年之前
build_trojan-go-dev.sh daa93cdc15 Added build_trojan-go branch dev 5 年之前
build_trojan-go-fork.sh acef6b00a6 Added build_trojan-go-fork.sh 1 年之前
build_trojan-go.sh 0573235486 Update build_trojan-go.sh 5 年之前
config.json 49ad970132 Update trojan-go 1 年之前
trojan-go.sh d0fb2fb7bb Added Trojan-Go Docker Image 5 年之前

README.md

Trojan-Go Docker Image by Teddysun

Trojan-Go is An unidentifiable mechanism that helps you bypass GFW.

Trojan-Go features multiple protocols over TLS to avoid both active/passive detections and ISP QoS limitations.

Docker images are built for quick deployment in various computing cloud providers.

For more information on docker and containerization technologies, refer to official document.

Prepare the host

If you need to install docker by yourself, follow the official installation guide.

Pull the image

$ docker pull teddysun/trojan-go

This pulls the latest release of trojan-go.

It can be found at Docker Hub.

Start a container

You must create a configuration file /etc/trojan-go/config.json in host at first:

$ mkdir -p /etc/trojan-go

A sample in JSON like below:

{
    "run_type": "server",
    "local_addr": "0.0.0.0",
    "local_port": 443,
    "remote_addr": "127.0.0.1",
    "remote_port": 80,
    "password": [
        "your_password"
    ],
    "ssl": {
        "cert": "your_cert.crt",
        "key": "your_key.key",
        "sni": "your-domain-name.com"
    },
    "router": {
        "enabled": true,
        "block": [
            "geoip:private"
        ],
        "geoip": "/usr/share/trojan-go/geoip.dat",
        "geosite": "/usr/share/trojan-go/geosite.dat"
    }
}

An online documentation can be found here

There is an example to start a container that use host network, run as a trojan-go server like below:

$ docker run -d --network host --name trojan-go --restart=always -v /etc/trojan-go:/etc/trojan-go teddysun/trojan-go