Xray REALITY手动教程

120次阅读

共计 4795 个字符,预计需要花费 12 分钟才能阅读完成。

https://github.com/XTLS/REALITY#vless-xtls-utls-reality-example-for-xray-core-%E4%B8%AD%E6%96%87

我试了一下,没什么特别的,你们可以玩玩

配置里的 privateKey 和 publicKey 可以自己改改,生成方法./xray x25519

服务端安装 1.8.0 的脚本 (官方)

  1. bash -c “$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)” [url=home.php?mod=space&uid=175]@[/url] install –version 1.8.0

复制代码

客户端也要 1.8.0 https://github.com/XTLS/Xray-core/releases/tag/v1.8.0

服务端的一键脚本好弄,但是没必要,因为现在客户端都还不支持,反正都要手动的

然后把服务器配置写到  /usr/local/etc/xray/config.json
重启 xray  systemctl restart xray

服务器配置

  1. {
  2.     “inbounds”: [
  3.         {
  4.             “listen”: “0.0.0.0”,
  5.             “port”: 443,
  6.             “protocol”: “vless”,
  7.             “settings”: {
  8.                 “clients”: [
  9.                     {
  10.                         “id”: “id”,
  11.                         “flow”: “xtls-rprx-vision”
  12.                     }
  13.                 ],
  14.                 “decryption”: “none”
  15.             },
  16.             “streamSettings”: {
  17.                 “network”: “tcp”,
  18.                 “security”: “reality”,
  19.                 “realitySettings”: {
  20.                     “show”: false,
  21.                     “dest”: “www.iq.com:443”,
  22.                     “xver”: 0,
  23.                     “serverNames”: [
  24.                         “www.iq.com”,
  25.                         “www.example.com”
  26.                     ],
  27.                     “privateKey”: “ANqmuHlwCv-KNWKe6-4sBOcL7Vedo4S45AOvTHRLOUU”,
  28.                     “minClientVer”: “”,
  29.                     “maxClientVer”: “”,
  30.                     “maxTimeDiff”: 0,
  31.                     “shortIds”: [
  32.                         “”,
  33.                         “0123456789abcdef”
  34.                     ]
  35.                 }
  36.             }
  37.         }
  38.     ],
  39.     “outbounds”: [
  40.         {
  41.         “protocol”: “freedom”,
  42.         “settings”: {}
  43.         }
  44.     ]
  45. }

复制代码

客户端配置

保存为 json 文件,v2rayN 可以导入,其他客户端挑出 outbounds 那里自己改改

记得客户端也要手动升级到 1.8.0 版本

  1. {
  2.   “policy”: {
  3.     “system”: {
  4.       “statsOutboundUplink”: true,
  5.       “statsOutboundDownlink”: true
  6.     }
  7.   },
  8.   “log”: {
  9.     “access”: “”,
  10.     “error”: “”,
  11.     “loglevel”: “warning”
  12.   },
  13.   “inbounds”: [
  14.     {
  15.       “tag”: “socks2”,
  16.       “port”: 10808,
  17.       “listen”: “0.0.0.0”,
  18.       “protocol”: “socks”,
  19.       “sniffing”: {
  20.         “enabled”: true,
  21.         “destOverride”: [
  22.           “http”,
  23.           “tls”
  24.         ]
  25.       },
  26.       “settings”: {
  27.         “auth”: “noauth”,
  28.         “udp”: true,
  29.         “allowTransparent”: false
  30.       }
  31.     },
  32.     {
  33.       “tag”: “http2”,
  34.       “port”: 10809,
  35.       “listen”: “0.0.0.0”,
  36.       “protocol”: “http”,
  37.       “sniffing”: {
  38.         “enabled”: true,
  39.         “destOverride”: [
  40.           “http”,
  41.           “tls”
  42.         ]
  43.       },
  44.       “settings”: {
  45.         “auth”: “noauth”,
  46.         “udp”: true,
  47.         “allowTransparent”: false
  48.       }
  49.     },
  50.     {
  51.       “tag”: “api”,
  52.       “port”: 3972,
  53.       “listen”: “127.0.0.1”,
  54.       “protocol”: “dokodemo-door”,
  55.       “settings”: {
  56.         “udp”: false,
  57.         “address”: “127.0.0.1”,
  58.         “allowTransparent”: false
  59.       }
  60.     }
  61.   ],
  62.   “outbounds”: [
  63.     {
  64.         “protocol”: “vless”,
  65.         “settings”: {
  66.             “vnext”: [
  67.                 {
  68.                     “address”: “ 你的服务器 IP”,
  69.                     “port”: 443,
  70.                     “users”: [
  71.                         {
  72.                             “id”: “id”,
  73.                             “flow”: “xtls-rprx-vision”,
  74.                             “encryption”: “none”
  75.                         }
  76.                     ]
  77.                 }
  78.             ]
  79.         },
  80.         “streamSettings”: {
  81.             “network”: “tcp”,
  82.             “security”: “reality”,
  83.             “realitySettings”: {
  84.                 “show”: false,
  85.                 “fingerprint”: “chrome”,
  86.                 “serverName”: “www.iq.com”,
  87.                 “publicKey”: “FU3taClalV6g2eB1cKe9OuVGyCEKd8iAFfVAsBE07wzA”,
  88.                 “shortId”: “”,
  89.                 “spiderX”: “”
  90.             }
  91.         }
  92.     }
  93. ],
  94.   “stats”: {},
  95.   “api”: {
  96.     “tag”: “api”,
  97.     “services”: [
  98.       “StatsService”
  99.     ]
  100.   },
  101.   “dns”: {
  102.     “servers”: [
  103.       “223.5.5.5”,
  104.       “8.8.8.8”
  105.     ]
  106.   },
  107.   “routing”: {
  108.     “domainStrategy”: “AsIs”,
  109.     “domainMatcher”: “linear”,
  110.     “rules”: [
  111.       {
  112.         “type”: “field”,
  113.         “inboundTag”: [
  114.           “api”
  115.         ],
  116.         “outboundTag”: “api”,
  117.         “enabled”: true
  118.       },
  119.       {
  120.         “type”: “field”,
  121.         “inboundTag”: [],
  122.         “outboundTag”: “proxy”,
  123.         “domain”: [
  124.           “translate.googleapis.com”,
  125.           “translate.google.com”
  126.         ],
  127.         “enabled”: true
  128.       },
  129.       {
  130.         “type”: “field”,
  131.         “inboundTag”: [],
  132.         “outboundTag”: “direct”,
  133.         “domain”: [
  134.           “domain:tencent.com”,
  135.           “domain:qq.com”,
  136.           “domain:baidu.com”,
  137.           “domain:pan.baidu.com”
  138.         ],
  139.         “enabled”: true
  140.       },
  141.       {
  142.         “type”: “field”,
  143.         “outboundTag”: “direct”,
  144.         “domain”: [
  145.           “domain:example-example.com”,
  146.           “domain:example-example2.com”
  147.         ],
  148.         “enabled”: true
  149.       },
  150.       {
  151.         “type”: “field”,
  152.         “outboundTag”: “block”,
  153.         “domain”: [
  154.           “geosite:category-ads-all”
  155.         ],
  156.         “enabled”: true
  157.       },
  158.       {
  159.         “type”: “field”,
  160.         “outboundTag”: “direct”,
  161.         “domain”: [
  162.           “geosite:cn”
  163.         ],
  164.         “enabled”: true
  165.       },
  166.       {
  167.         “type”: “field”,
  168.         “outboundTag”: “direct”,
  169.         “ip”: [
  170.           “geoip:private”,
  171.           “geoip:cn”
  172.         ],
  173.         “enabled”: true
  174.       },
  175.       {
  176.         “type”: “field”,
  177.         “port”: “0-65535”,
  178.         “outboundTag”: “proxy”,
  179.         “enabled”: true
  180.       }
  181.     ]
  182.   }
  183. }

复制代码

其他可以改的地方看最开头那个链接

网友回复:

注册 花里胡哨,“消除服务端 TLS 指纹特征”,用 nginx 不比这种野鸡协议要好?

言和 等半年成熟了再用

spotlight 等不了半年就失效了,嘿嘿嘿

baby 不卑鄙 支持要绝对支持,但是小火煎还没更新,只能家里的软路由了

hostvps xray 整的比 v2fly 猛啊!

VliceFan 感谢分享 让子弹飞一会儿,先不急

一笑一莞尔 我先来体验体验

Erik 收藏看看,明年再说

5700pgf 谢谢 lz 分享。请问 有 vmess 的设置么?

正文完
 0