前言:隨著翻牆技術不斷演進,舊有的 shadowsocks 未來會逐漸淘汰,人總要往前走,技術也是,所以差不多要開始寫這篇文章了~
1. 安裝好 Ubuntu Server 18.04.1 LTS
2. 先把更新跑一遍(強迫症)
sudo apt update && sudo apt -y upgrade
3. 設定時區 (v2ray 必須將時間誤差控制在 90 秒以內)
sudo timedatectl set-timezone Asia/Taipei
4. 安裝 unzip 套件
sudo apt install unzip
5. 下載&安裝腳本(官方維護)
wget https://install.direct/go.sh && sudo bash go.sh
6. 查看設定檔,視需求修改 (更進階的設定請參考 Project V 官網 - 配置文件 單元)
如果需更換 ID,請透過 https://www.uuidgenerator.net/ 產生正確格式的ID
查看 /etc/v2ray/config.json:
{ "inbounds": [{ "port": 10840, // 監聽連接埠 "protocol": "vmess", "settings": { "clients": [ { "id": "707889a9-13b4-40f2-a093-4d1156c7d07c", // UUID (可當作密碼) "level": 1, "alterId": 64 } ] } }], "outbounds": [{ "protocol": "freedom", "settings": {} },{ "protocol": "blackhole", "settings": {}, "tag": "blocked" }], "routing": { "rules": [ { // 禁止存取伺服器內網其他IP,如有存取需求可 "type": "field", "ip": ["geoip:private"], "outboundTag": "blocked" } ] } }
7. 設定開機啟動&啟用服務
sudo systemctl enable v2ray && sudo systemctl start v2ray
8. 設定防火牆
sudo ufw enable sudo ufw allow 10840/tcp
其他說明:
使用 v2ray 開的 shadowsocks 無法正常使用,有網友如果有遇到且解決這個問題可以留言跟我說,感謝。
用戶端:
Windows: https://github.com/v2ray/v2ray-core/releases 圖形化用戶端:https://github.com/2dust/v2rayN/releases
MacOS: https://github.com/v2ray/v2ray-core/releases
Linux: https://github.com/v2ray/v2ray-core/releases
Android:
V2RayNG: Github or Play Store
BifrostV: APKPure or Play Store
iOS:
ShadowRocket
Kitsunebi - Proxy Utility
Kitsunebi Lite
Pepi
i2Ray
Quantumult
參考網站: