其目的是:因為從免費wifi連到家裡設備或某些網站會有些問題,所以自己架設 VPN Server 當中繼。

家中2台路由器裝了 Softether VPN server、V2Ray 都使用 port 443,所以只剩下一台不關機的 win7 電腦可用 443。
win7 架設 trojan server 步驟如下:
1. 下載 trojan-go-windows-amd64.zip,並解壓縮到電腦。trojan-go 載點 https://github.com/p4gefau1t/trojan-go/releases (我安裝的版本是 v0.8.2,今天看到有 v0.8.3 了)
2. https://www.selfsignedcertificate.com/ 線上產生 SSL 證書。可將證書放在 trojan.exe 目錄,避免 config 文件內,路徑要寫 / 或 \ 的問題。
3. config.json 放在 trojan.exe 目錄,其內容為
{
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 443,
"remote_addr": "自己網站網址或是其他網站的網址",
"remote_port": 80,
"password": [
"自己的密碼"
],
"ssl": {
"cert": "自己證書.cert",
"key": "自己證書.key",
"sni": "自己的DDNS"
},
"router": {
"enabled": true,
"block": [
"geoip:private"
],
"geoip": "geoip.dat",
"geosite": "geosite.dat"
}
}
執行 trojan-go.exe,即可啟用 trojan server。
======
google play 下載 Igniter,填寫
Remote address
Remote port (Remote Port 和 config.json "local_port" 相同)
Password
Remote Server SNI 不用填寫 或 填 自己的DDNS
Verify Certificate 關閉
設定完畢後,按 START 連到架好的 trojan server
======
安裝過程 遇到
問題1: (trojan-gfw遇到的問題,非trojan-go。)
執行 trojan.exe 出現 [FATAL] fatal: config.json(13): invalid escape sequence
Ans: config.json 第13行 不能用 d:\trojan\... 左上右下斜線,要改成 f:/trojan/... 右上左下斜線
問題2: v2rayNG app 添加 trojan 節點並執行,翻牆失敗。在 win7 畫面出現 trojan ssl handshake failed sslv3 alert bad certificate
Ans: 網路說 v2rayNG 也能連 trojan,但我尚未成功。
======
參考資料
https://www.hkepc.com/forum/viewthread.php?fid=12&tid=2540700 架設 win7 trojan server,但其 config.json setting 的 port 和 app 對應錯誤
Trojan-Go Docs https://p4gefau1t.github.io/trojan-go/
trojan config 文件參數設定說明 https://github.com/YHPeter/trojan-gfw-configuration
關鍵字 翻牆 科學上網 V2Ray VPN