跳至正文
Wener Notes

xray

约 2 分钟阅读
  • 参考
  • flow - 流控制(Flow Control)模式 - 用来配合 TLS 类的传输
    • xtls-rprx-vision
    • xtls-rprx-origin
    • xtls-rprx-direct
    • xtls-rprx-splice
    • 非 TCP 不需要 - 传输层如果使用 grpc, ws, h2 不需要设置 flow
    • 解决 TCP + TLS/REALITY 场景下的双重 TLS 加解密性能开销问题
    • 依赖于直接处理底层的 TLS 记录
  • xray-core licence 比 sing-box 的 GPL 更宽松, 比 v2fly/v2ray-core 更严格
  • xray 比 sing-box 在 vless, trojan 的认证相关支持更好
    • 支持多账户
  • 不建议作为客户端
    • 不支持 TUN
    • 不支持 mixed - http & socks 同端口
  • 不支持 reload
  • 配置相对比较繁琐但比较严谨
bash
brew install xray
# https://github.com/XTLS/Xray-core/releases
# /etc/xray/
docker run --rm -it --name proxy ghcr.io/xtls/xray-core:25.1.1
# reload
docker exec proxy xray run -test -dump -confdir /etc/xray && docker restart proxy && docker logs -f --tail 100 proxy

xray run -c config.json
xray run -test -dump -confdir /etc/xray

# vless client id
# https://github.com/XTLS/Xray-core/issues/158
xray uuid -i "自定义字符串"
  • 配置支持环境变量 env:PORT
  • 入
    • dokodemo-doo
    • http
    • shadowsocks
    • socks
    • vless
    • vmess
    • trojan
    • wireguard

conf

  • 使用 pb 做配置 序列化
  • 支持 json, yaml, toml 配置
  • 支持配置文件后缀 pb, protobuf, json, jsonc, yaml, yml, toml
  • xtls.github.io/config

Notes

  • policy.Manager
    • level -> policy.Session
      • stats, timeout

Vless

关联信息

反向链接、本文链接的其他页面和外部资料。

参考资料

GitHub4 条
其他外链2 条
最近更新commit b564428编辑