Trojan-go简单快速搭建特洛伊小木马
环境准备
服务器:腾讯云lighthouse,1c1g
镜像:CentOS7.6
用户:root
腾讯云购买.com类域名价格55元/年,申请域名ssl证书免费
源码与文档地址
https://github.com/p4gefau1t/trojan-go #github地址
https://p4gefau1t.github.io/trojan-go/ #Trojan-Go 文档
部署
下载解压
wget -P /data https://github.com/p4gefau1t/trojan-go/releases/download/v0.8.3/trojan-go-linux-amd64.zip #下载
unzip /data/trojan-go-linux-amd64.zip -d /data/trojan-go #解压
cp /data/trojan-go/trojan-go /usr/bin/
mkdir -p /usr/share/trojan-go
cp /data/trojan-go/geo* /usr/share/trojan-go
配置
vim /etc/systemd/system/trojan-go.service
[Unit]
Description=Trojan-Go - An unidentifiable mechanism that helps you bypass GFW
Documentation=https://p4gefau1t.github.io/trojan-go/
After=network.target nss-lookup.target
[Service]
User=root
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/bin/trojan-go -config /etc/trojan-go/config.json
Restart=on-failure
RestartSec=10s
[Install]
WantedBy=multi-user.target
mkdir -p /etc/trojan-go
vim /etc/trojan-go/config.json
{
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 443,
"remote_addr": "127.0.0.1",
"remote_port": 80,
"password": [
"yourpassword"
],
"ssl": {
"cert": "/yoursslpath/1_yourdomian.com_bundle.crt",
"key": "/yoursslpath/2_yourdomian.com.key",
"sni": "youdomain.com"
},
"router": {
"enabled": true,
"block": [
"geoip:private"
],
"geoip": "/usr/share/trojan-go/geoip.dat",
"geosite": "/usr/share/trojan-go/geosite.dat"
}
}
启动服务
systemctl daemon-reload
systemctl enable trojan-go.service
systemctl start trojan-go.service
Comments | NOTHING