前提条件:
- 一台外网云服务器
- 域名
- https 证书
服务端安装 trojan
切换到 root 身份:sudo su
|
|
安装提示:
Entering temp directory /tmp/tmp.3t5aPoYDpj...
Downloading trojan 1.16.0...
################################################################################################################################################### 100.0%
Unpacking trojan 1.16.0...
Installing trojan 1.16.0 to /usr/local/bin/trojan...
Installing trojan server config to /usr/local/etc/trojan/config.json...
Installing trojan systemd service to /etc/systemd/system/trojan.service...
Reloading systemd daemon...
Deleting temp directory /tmp/tmp.3t5aPoYDpj...
Done!
配置文档说明:https://trojan-gfw.github.io/trojan/config
修改配置
- server.json 服务器配置
|
|
运行 trojan,指定运行配置 config.json
trojan -c /usr/local/etc/trojan/config.json
修改 trojan 系统服务配置 nano /etc/systemd/system/trojan.service
检查 trojan 启动服务状态 systemctl status trojan
修改服务权限 sudo chmod 644 /etc/systemd/system/trojan.service
sudo systemctl daemon-reload
查看运行日志 journalctl -u trojan -xe
Windows 客户端 V2Ray
客户端使用 v2rayN ,下载地址:https://github.com/2dust/v2rayN/releases/