解析域名,购买小鸡,安装lnmp,添加虚拟主机,并申请好ssl证书,优化系统,开启bbr,此处省略几百字。
小木马下载地址 https://github.com/trojan-gfw/trojan/releases/download/v1.16.0/trojan-1.16.0-linux-amd64.tar.xz
解压后把 trojan 文件夹放到 /usr/src 目录。设置trojan文件775权限。创建一个 server.conf 文件,添加如下代码,密码和证书路径自己更改。
{
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 443,
"remote_addr": "127.0.0.1",
"remote_port": 80,
"password": [
"password"
],
"log_level": 1,
"ssl": {
"cert": "/usr/local/nginx/conf/ssl/qn2.520guge.com/fullchain.cer",
"key": "/usr/local/nginx/conf/ssl/qn2.520guge.com/qn2.520guge.com.key",
"key_password": "",
"cipher_tls13":"TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384",
"prefer_server_cipher": true,
"alpn": [
"http/1.1"
],
"reuse_session": true,
"session_ticket": false,
"session_timeout": 600,
"plain_http_response": "",
"curves": "",
"dhparam": ""
},
"tcp": {
"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": ""
}
}