在台灣OPENWRT上建立一個翻牆伺服器節點
OpenWrt 軟路由上架設 Sing-box 服務端(使用抗封鎖能力最強的 VLESS + REALITY 協議)。
REALITY 協議會把流量偽裝成連往大型合法網站的 TLS 流量,不僅沒有特徵、不需自己買域名,還能完美避開 GFW 的封鎖。
開始前,請確保你的台灣軟路由具備 公網 IP(建議設好 DDNS 動態域名)
透過 SSH 安裝原生 Sing-box 核心
更新軟體源並安裝 sing-box
apk update && apk add sing-box
註:如果你的 OpenWrt / iStoreOS 為舊版系統,請改用傳統指令:opkg update && opkg install sing-box

依序執行以下三行指令,產生專屬的 UUID、REALITY 金鑰對 與 Short ID(請將畫面輸出的結果複製到記事本保存):
sing-box generate uuid
sing-box generate reality-keypair
sing-box generate rand --hex 4



接著建立服務端設定檔。請先將下方整段指令複製到電腦記事本,把裡面的 UUID、PrivateKey 與 Short_ID 替換成剛剛產生的數值(⚠️ 注意:服務端這裡填的是 PrivateKey 私鑰;而 PublicKey 公鑰請留好,下一篇手機客戶端會用到):
cat << 'EOF' > /etc/sing-box/config.json
{
"log": {
"level": "info"
},
"inbounds": [
{
"type": "vless",
"tag": "vless-in",
"listen": "::",
"listen_port": 8443,
"users": [
{
"uuid": "這裡替換為剛剛產生的UUID",
"flow": "xtls-rprx-vision"
}
],
"tls": {
"enabled": true,
"server_name": "itunes.apple.com",
"reality": {
"enabled": true,
"handshake": {
"server": "itunes.apple.com",
"server_port": 443
},
"private_key": "這裡替換為剛剛產生的PrivateKey",
"short_id": [
"這裡替換為剛剛產生的8位數Short_ID"
]
}
}
}
],
"outbounds": [
{
"type": "direct",
"tag": "direct"
}
]
}
EOF
修改完以後,整段複製貼到終端SSH裡面後按ENTER
請確認最後一行的 EOF 有被執行、畫面跳回 root@iStoreOS:~# 提示字元,才算寫入成功

啟動系統服務,在終端中輸入以下命令
uci set sing-box.main.enabled='1'
uci set sing-box.main.user='root'
uci commit sing-box
/etc/init.d/sing-box enable
/etc/init.d/sing-box restart

開放 OpenWrt WAN 防火牆端口:
回到 OpenWrt 網頁後台 ➔ 網路 ➔ 防火牆 ➔ 通信規則 。
添加一條新規則
名稱:Allow-SingBox
協定:TCP
來源區域:wan
目標區域:設備 (輸入) / Device (input)
目標端口:8443(對應你設定的 listen_port)
動作:接受
右下角保存---------保存並應用

服務端架設完成