xray教程

Xray新协议Reality介绍及安装使用

原文:Xray新协议Reality,无需域名和配置TLS

一、Xray-core新协议Reality介绍

如果用 REALITY 取代传统的 TLS 服务,可以消除服务端 TLS 指纹特征,同时保留前向保密性等功能,证书链攻击也无效。这样的安全性超越了常规的 TLS。

使用 REALITY 可以指向别人的网站,无需自己购买域名和配置 TLS 服务端,更为方便。同时,实现了向中间人呈现指定 SNI 的全程真实 TLS

通常用于代理的目的,目标网站最低标准是支持 TLSv1.3 和 H2 的国外网站,域名非跳转使用(主域名可能被用于跳转到 www)。加分项包括:目标 IP 与代理 IP 相近(更像,且延迟低),在 Server Hello 后的握手消息中一起加密(如 dl.google.com),有 OCSP Stapling。

在配置方面,禁止回国流量,并转发 TCP/80 和 UDP/443 等端口(REALITY 对外表现为端口转发,目标 IP 冷门或许更佳)。

 

REALITY 也可以搭配 XTLS 以外的代理协议使用,但不建议这样做,因为它们存在明显且已被针对的 TLS in TLS 特征
REALITY 的下一个主要目标是“预先构建模式”,即提前采集目标网站特征,XTLS 的下一个主要目标是 0-RTT

 

REALITY 不支持套CDN。

二、搭建

搭建详情请查看此文章

一键脚本:

wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh

三、REALITY 的设计哲学

  1. 在设计上就把安全等级拉满,限制人的可控范围,最大程度降低人为因素的影响
  2. 信任服务端,客户端不可信,甚至默认客户端持有的节点信息全泄露了
  3. 服务端对客户端是有选择的,比如拒绝版本过低的 Xray-core 连接,防止过时的客户端实现不当害了服务端,比如指纹过时
    以后服务端还可以带信息给客户端,告知客户端有新版了/告知客户端版本过低,要求更新,否则多长时间后不再支持

 

以上部分内容来自 XTLS/REALITY README和RPRX issues区回答

《Xray新协议Reality介绍及安装使用》上有32条评论

  1. —> Xray关闭成功
    Xray启动失败
    请手动执行【/etc/v2ray-agent/xray/xray -confdir /etc/v2ray-agent/xray/conf】,查看错误日志
    [root@ecs-PgfLa ~]# /etc/v2ray-agent/xray/xray -confdir /etc/v2ray-agent/xray/conf
    Xray 1.7.5 (Xray, Penetrates Everything.) Custom (go1.20 linux/amd64)
    A unified platform for anti-censorship.
    2023/04/26 11:52:34 Using confdir from arg: /etc/v2ray-agent/xray/conf
    2023/04/26 11:52:34 [Info] infra/conf/serial: Reading config: /etc/v2ray-agent/xray/conf/00_log.json
    2023/04/26 11:52:34 [Info] infra/conf/serial: Reading config: /etc/v2ray-agent/xray/conf/02_VLESS_TCP_inbounds.json
    Failed to start: main: failed to load config files: [/etc/v2ray-agent/xray/conf/00_log.json /etc/v2ray-agent/xray/conf/02_VLESS_TCP_inbounds.json /etc/v2ray-agent/xray/conf/07_VLESS_vision_reality_inbounds.json /etc/v2ray-agent/xray/conf/08_VLESS_reality_fallback_grpc_inbounds.json /etc/v2ray-agent/xray/conf/09_routing.json /etc/v2ray-agent/xray/conf/10_ipv4_outbounds.json /etc/v2ray-agent/xray/conf/11_dns.json /etc/v2ray-agent/xray/conf/12_policy.json] > infra/conf/serial: failed to decode config: /etc/v2ray-agent/xray/conf/02_VLESS_TCP_inbounds.json > infra/conf/serial: failed to read config file > EOF

  2. 大佬们请教一个问题,V2RAY部署完成后,用IP直接访问VPS没问题,但是用域名跳转时就会报错【v2ray.com/core/transport/internet/websocket: failed to dial to (ws://wp/): > read tcp 192.168.66.114:52960->172.0: wsarecv: An existing connection was forcibly closed by the remote host.】
    每次报错都是那个An existing connection was forcibly closed by the remote host。PC客户端、手机小飞机都连不上,请问大佬们怎么处理?谢谢

      1. 域名我用了3个,分别是阿里云的,NAMESILO的和走CF代理的,3个域名都是一样的情况。甚至我还换了台VPS尝试也是如此,端口从80到443到自定义的随机号都是一样的结果,请问要排查哪部份解析。谢谢

          1. 谢谢回复,我一共用3个域名做尝试,其中阿里和NAMESILO的域名PING时获取到的IP是服务器IP,用CF做CDN的域名PING时是一个其他的IP。但是3个IP均无法完成VMESS的连接。

            不过有极小概率情况下,V2RAYN终端刷屏报错同时,测试的页面(比如谷歌)是能打开的,这种很随机,大概尝试20次能成功1次。

  3. 求大佬帮忙看看是啥原因?

    2023/07/19 12:49:36 Using confdir from arg: /etc/v2ray-agent/xray/conf
    2023/07/19 12:49:36 [Info] infra/conf/serial: Reading config: /etc/v2ray-agent/xray/conf/00_log.json
    2023/07/19 12:49:36 [Info] infra/conf/serial: Reading config: /etc/v2ray-agent/xray/conf/02_VLESS_TCP_inbounds.json
    2023/07/19 12:49:36 [Info] infra/conf/serial: Reading config: /etc/v2ray-agent/xray/conf/07_VLESS_vision_reality_inbounds.json
    xctl> [ /etc/v2ray-agent/xray/conf/07_VLESS_vision_reality_inbounds.json ] appended inbound with tag: VLESSReality
    2023/07/19 12:49:36 [Info] infra/conf/serial: Reading config: /etc/v2ray-agent/xray/conf/08_VLESS_reality_fallback_grpc_inbounds.json
    xctl> [ /etc/v2ray-agent/xray/conf/08_VLESS_reality_fallback_grpc_inbounds.json ] appended inbound with tag: VLESSRealityGRPC
    2023/07/19 12:49:36 [Info] infra/conf/serial: Reading config: /etc/v2ray-agent/xray/conf/09_routing.json
    2023/07/19 12:49:36 [Info] infra/conf/serial: Reading config: /etc/v2ray-agent/xray/conf/10_ipv4_outbounds.json
    2023/07/19 12:49:36 [Info] infra/conf/serial: Reading config: /etc/v2ray-agent/xray/conf/11_dns.json
    2023/07/19 12:49:36 [Info] infra/conf/serial: Reading config: /etc/v2ray-agent/xray/conf/12_policy.json

      1. 安装的时候,一直提示Xray启动失败。获取错误代码,只能显示到
        2023/07/19 12:49:36 [Info] infra/conf/serial: Reading config: /etc/v2ray-agent/xray/conf/12_policy.json,这一行,后面的都显示不出来了

  4. 我域名解析应该是对的,用其他网站测网址dns也得到了和服务器一致的IP,然而脚本一直提示与服务器不匹配。域名购买的网站是godaddy,dns修改已经超过24小时。

  5. 配置成功
    [] [Trojan] 台湾02|解锁流媒体|1.5X(xtw2***top:25315)
    启动服务(2023/8/26 17:01:15)…
    Xray 1.5.5 (Xray, Penetrates Everything.) Custom (go1.18.1 windows/amd64)
    A unified platform for anti-censorship.
    2023/08/26 17:01:15 [Info] infra/conf/serial: Reading config: E:\FANQIANG\v2rayN-Core\config.json
    2023/08/26 17:01:15 [Warning] core: Xray 1.5.5 started
    2023/08/26 17:01:16 127.0.0.1:61161 accepted tcp:127.0.0.1:0 [api -> api]

  6. DNS解析时出现域名IP及VPS ip不符,但是显示的结果是DNS有俩组IP,其中一组就是VPS的ip

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注