因為很久沒更新 xray,所以只用舊版本測試。大家成功後,再更新版本或在config.json自訂更多的協議。
======
win10 架設 VPN server 方法如下
電腦下載 Xray-core v1.8.24 https://github.com/XTLS/Xray-core/releases/tag/v1.8.24 的 Xray-windows-64.zip
並且解壓縮。
同樣目錄下建立 config.json 檔案,config.json 內容如最下方。
(在 Online UUID Generator Tool 可以產生新的id)
執行 xray.exe
有成功會顯示如下
Xray 1.8.24 (Xray, Penetrates Everything.) 6baad79 (go1.23.0 windows/amd64)
A unified platform for anti-censorship.
2026/03/24 10:09:38 Using default config: D:\Xray\config.json
2026/03/24 10:09:38 [Info] infra/conf/serial: Reading config: &{Name:D:\Xray\config.json Format:json}
如果port被佔用,請修改 config.json 內的 port。
===
client 端連線方法:
手機下載 VPN client 軟體。填入 IP, port, id 即可連線,範例如下

===
config.json 內容為
{
"log": {
"loglevel": "none"
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 8081,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "605e7c22-5cc8-44a8-8643-80157a01018f",
"level": 0,
"email": "testxray@gmail.com"
}
],
"decryption": "none",
"fallbacks": [
{
"dest": "google.com:80"
}
]
},
"streamSettings": {
"network": "tcp"
}
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct"
}
]
}




























































































