Files

32 lines
1.4 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Xray 部署配置模板
# deploy.sh 运行后会自动生成 .env,通常无需手动创建
# 如需预配置,复制此文件为 .env 后修改
# 部署模式: reality (推荐) / fast
# XRAY_MODE=reality
# 监听端口(默认 443,建议不改)
# NAT / 端口转发的机器请填服务商实际映射给你的端口
# XRAY_PORT=443
# 分享链接中使用的 IP,留空则自动探测出口 IP
# NAT / 端口转发的机器上出口 IP 与入站 IP 可能不同,此时必须手动指定
# SERVER_IP=1.2.3.4
# Reality 伪装目标(留空则自动从候选中挑选,见 deploy.sh 的 select_reality_dest
# 手动指定时务必确认新域名满足两个条件,否则客户端会刷 REALITY 报错:
# 1) TLS 1.3 且证书链 < 8192 字节(用 xray tls ping <域名> 查「with SNI」那段)
# 2) 该域名会被客户端路由判成「直连」(命中 geosite:cn)
# 已知不可用:dl.google.com(命中 geosite:google)、www.microsoft.com、www.amazon.com
# REALITY_DEST=www.apple.com
# REALITY_SNI=www.apple.com
# 每日 04:00 自动重启 Xray(默认 false
# 崩溃恢复已由 systemd 的 Restart=always 覆盖(秒级响应),
# 而每日硬重启会切断全部活动连接(跨夜下载、备份、CI 都会中断)。
# 仅在确实观察到长期运行后性能退化时才改为 true。
# XRAY_DAILY_RESTART=false
# 备份目录
# BACKUP_DIR=/var/backups/xray