VPN on a router: GL.iNet, OpenWrt and ASUS
路由器上的一個設定檔即可涵蓋所有連接裝置(從智慧電視到遊戲主機),同時僅佔用帳戶的一個設定檔位置。
若韌體支援請優先選擇 WireGuard:路由器晶片能使其運作速度遠快於 OpenVPN。舊版韌體可能僅列出 OpenVPN,但同樣可用。
WireGuard 設定檔
- 01在 Configs 分頁建立名為 Home router 的設定檔,選擇城市並儲存 WireGuard .conf 檔案。
- 02GL.iNet: 管理面板, VPN, WireGuard Client, 新增群組, 上傳 .conf, 開始。
- 03OpenWrt:安裝 luci-proto-wireguard,前往 Network、Interfaces,新增一個使用 WireGuard VPN 協定的介面,並使用 Import configuration。將其放入具有 masquerading 的防火牆區域。
- 04ASUS 使用 WireGuard 客戶端:VPN、VPN Fusion 或 VPN Client,新增 WireGuard 設定檔,匯入 .conf,套用。
OpenVPN 設定檔
- 01在 Configs 分頁建立 OpenVPN 設定檔並儲存 .ovpn 檔案。
- 02請在路由器的 OpenVPN 客戶端區塊上傳設定檔。
- 03從 Configs 分頁取得 OpenVPN 使用者名稱與密碼並輸入以連線。
保持流量在隧道內
在路由器的 VPN 客戶端中啟用「Block non-VPN traffic」或「Internet kill switch」等設定,確保家中所有裝置都必須透過 VPN 通道連網。
實用資訊
- 路由器CPU決定速度上限;WireGuard通常能達到極限,OpenVPN則很少能做到。
- 家中所有裝置都會使用路由器的所在城市,因此請選擇鄰近城市作為日常使用。