如何使用trojan呢-端口封号曲线方法-适用于docker加速,外国软件包下载

1.0 安装docker

curl get.docker.com | sh

2.0 把ssl网站证书放入/home/trojan/

/home/trojan/ssl.key

/home/trojan/ssl.crt

3.0 把 配置文件放入/home/trojan/config.json


{
  "run_type": "server",
  "local_addr": "0.0.0.0",
  "local_port": 443,
  "remote_addr": "gfvps.cn",
  "remote_port": 80,
  "password": [
    "yourpasswd"
  ],
  "log_level": 1,
  "ssl": {
    "cert": "/config/ssl.crt",
    "key": "/config/ssl.key",
    "key_password": "",
    "cipher": "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256",
    "prefer_server_cipher": true,
    "alpn": [
      "http/1.1"
    ],
    "reuse_session": true,
    "session_ticket": false,
    "session_timeout": 600,
    "plain_http_response": "",
    "curves": "",
    "dhparam": ""
  },
  "tcp": {
    "prefer_ipv4": false,
    "no_delay": true,
    "keep_alive": true,
    "fast_open": false,
    "fast_open_qlen": 20
  },
  "mysql": {
    "enabled": false,
    "server_addr": "127.0.0.1",
    "server_port": 3306,
    "database": "trojan",
    "username": "trojan",
    "password": ""
  }
}

4.1 启动 trojan容器,火速体验trojan给你带来的外国代理加速,不支持游戏(UDP)加速

目前我自测支持docker pull加速php composer 加速go proxy加速奈菲加速王者荣耀国际版(解决大陆IP无法登录)暗区突围国际版,嘎嘎好用

docker kill trojan
docker rm trojan
docker run -it --name trojan  --restart=always  -v /home/trojan/:/config/  --net=host    trojangfw/trojan   trojan -c /config/config.json

5.0 (extra额外)

上面默认了443端口,完美的伪装了https网站,但是现在只要出现对等流量,立即封禁。怎么解决呢?

直接用iptables做个nat转发,把服务器的20000-30000端口转发到443,客户端使用的时候,发现端口被封,可以直接换一个端口,无需操作服务器

iptables -t  nat -A  PREROUTING   -p tcp --dport 20000:30000 -j   REDIRECT --to-port 443
回复列表(0|显示机器人聊天)
帖子没有回复
添加新回复
回复需要登录