## 準備 1. 新增一台container,先更新container: ``` apt update ;\ apu upgrade -y ;\ apt install curl vim -y ``` 2. 安裝trojan: ``` mkdir -p ~/trojan ;\ cd ~/trojan curl -O https://raw.githubusercontent.com/atrandys/trojan/master/trojan_mult.sh ; chmod +x trojan_mult.sh ; ./trojan_mult.sh ``` 3. ![trojan](https://lab.twidc.net/wp-content/uploads/2020/12/2-1.jpg) 4. ![3 1](https://lab.twidc.net/wp-content/uploads/2020/12/3-1.jpg) 5. ![4 1](https://lab.twidc.net/wp-content/uploads/2020/12/4-1.jpg) 6. ![5 1](https://lab.twidc.net/wp-content/uploads/2020/12/5-1.jpg) ----- 參考: 1. [Trojan 上網架設(替代VPN)爬梯子 科學上網 利器 - TWIDC](https://lab.twidc.net/trojan-%E4%B8%8A%E7%B6%B2%E6%9E%B6%E7%BD%AE%E6%9B%BF%E4%BB%A3vpn/) 2. [Trojan搭建私人VPN - Lingme](https://lingmin.me/2020/03/03/TrojanVPS/) 3. [[转载+修改]使用Trojan-Go科学上网 - 996 RIP](https://typecho.996.rip/index.php/archives/20/) 4. Source code: [Releases · trojan-gfw/trojan](https://github.com/trojan-gfw/trojan/releases) ## 更新憑證 1. 更新acme:`acme.sh --upgrade` 2. 先停止 trojan-web ```bash systemctl stop trojan-web ``` 3. 停止 trojan,如下圖 ![[Pasted image 20220815134750.png|500]] 4. 切換到 `/root/.acme.sh`,執行 `./acme.sh --cron -f`,如果憑證更新成功,應該會看到類似如下訊息: ![[Pasted image 20220815135026.png|800]] 5. 重啟 trojan: ![[Pasted image 20220815135248.png|400]] 6. 重啟trojan-web:`systemctl start trojan-web`