Skip to content

Fix Reality target validation and deployment reliability - #1

Merged
ziyue67 merged 1 commit into
mainfrom
fix/reality-validation-and-throughput
Jul 14, 2026
Merged

Fix Reality target validation and deployment reliability#1
ziyue67 merged 1 commit into
mainfrom
fix/reality-validation-and-throughput

Conversation

@ziyue67

@ziyue67 ziyue67 commented Jul 14, 2026

Copy link
Copy Markdown
Owner
  • validate Reality TLS targets before generating config
  • use a stable default target and refresh stale target selections
  • force IPv4 DNS/direct egress for VLESS
  • validate config before restart and apply TCP throughput tuning
  • normalize the installer script to LF line endings

Copilot AI review requested due to automatic review settings July 14, 2026 06:19
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@ziyue67
ziyue67 merged commit c16e991 into main Jul 14, 2026
1 check passed
@ziyue67
ziyue67 deleted the fix/reality-validation-and-throughput branch July 14, 2026 06:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to improve “Reality” target correctness and overall deployment reliability by validating TLS reachability of targets, biasing DNS/egress toward IPv4, validating generated config before restarting the service, and applying sysctl throughput tuning.

Changes:

  • Add TLS-handshake validation for Reality targets and change the default target to gateway.icloud.com.
  • Force IPv4-only DNS strategy and IPv4-only direct outbound domain strategy (with legacy env toggles).
  • Validate config before restart, apply throughput sysctl tuning, and make deployment/redeploy paths fail fast on service start issues.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
sing-box-plus.sh Adds Reality target validation/selection changes, IPv4-only DNS/direct egress knobs, sysctl throughput tuning, and stricter deploy/redeploy restart flow.
README.md Updates the example Reality SNI and adds a note about Reality target TLS handshake validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sing-box-plus.sh
Comment on lines 549 to +552
pick_reality(){
local arr=($REALITY_SERVERS); local n=${#arr[@]}
(( n == 0 )) && { printf '%s' "$REALITY_SERVER"; return; }
printf '%s' "${arr[$((RANDOM % n))]}"
local serve
for server in $REALITY_SERVERS; do
if validate_reality_target "$server"; then
Comment thread sing-box-plus.sh
Comment on lines +596 to +600
# Revalidate targets on every config generation so stale persisted domains
# cannot produce non-working Reality links.
RS_VR=$(pick_reality)
RS_GR=$(pick_reality)
RS_TR=$(pick_reality)
Comment thread sing-box-plus.sh
Comment on lines 1289 to 1292
write_systemd
systemctl restart "${SYSTEMD_SERVICE}" >/dev/null 2>&1 || true
apply_throughput_tuning
systemctl restart "${SYSTEMD_SERVICE}" || die "服务启动失败"
open_firewall
Comment thread sing-box-plus.sh
Comment on lines +1319 to +1322
write_systemd
apply_throughput_tuning
open_firewall
systemctl restart "${SYSTEMD_SERVICE}" || die "服务启动失败"
Comment thread sing-box-plus.sh
Comment on lines +292 to +294
# A Reality target must be reachable from the VPS. Keep the default stable;
# custom targets are checked before any generated configuration is used.
REALITY_SERVERS=${REALITY_SERVERS:-"gateway.icloud.com"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants