Skip to content

feat: support VLESS Reality inbound configuration#420

Merged
Ehco1996 merged 1 commit intomasterfrom
feat/vless-reality-support
Mar 13, 2026
Merged

feat: support VLESS Reality inbound configuration#420
Ehco1996 merged 1 commit intomasterfrom
feat/vless-reality-support

Conversation

@Ehco1996
Copy link
Copy Markdown
Owner

Summary

  • Problem: buildXrayInstanceCfg in pkg/xray/server.go assumes all proxy inbounds (trojan/vmess/vless) use TLS and unconditionally accesses inbound.StreamSetting.TLSSettings.Certs to inject TLS certificates. When an inbound uses Reality instead of TLS, TLSSettings is nil, causing a nil pointer panic.
  • Fix: Check StreamSetting.Security before injecting TLS certs. When security is "reality", skip TLS cert injection entirely (Reality uses its own key pair via REALITYSettings, not TLS certs) and only enable MPTCP on socket settings.
  • This enables the mizhiwu panel to send VLESS + Reality xray configs that ehco can correctly handle without crashing.

Test plan

  • Deploy with a VLESS + Reality inbound config and verify ehco starts without panic
  • Verify existing TLS-based trojan/vmess/vless inbounds still get TLS certs injected correctly
  • Verify MPTCP is enabled for both Reality and TLS inbounds

🤖 Generated with Claude Code

Reality uses its own key management instead of TLS certificates.
Previously, buildXrayInstanceCfg blindly accessed TLSSettings.Certs
for all vless/trojan/vmess inbounds, which would cause a nil pointer
panic when the inbound uses Reality instead of TLS.

Now we check StreamSetting.Security and skip TLS cert injection when
it's "reality", while still enabling MPTCP for socket settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Ehco1996 Ehco1996 merged commit 566accc into master Mar 13, 2026
1 check passed
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.

1 participant