Skip to content
Discussion options

You must be logged in to vote

the lookup itself is fine, the startup probing is what will hurt you

  • matching is a plain Go map: serverNames becomes map[string]bool (reality/config.go) and REALITY checks config.ServerNames[hs.clientHello.serverName] per handshake (tls.go), so cost per connection doesn't grow with the list. exact match only, no wildcards
  • memory: i ran a quick Go 1.27 test with 1M names like m-37.sub12.example-domain.com: about 48 MB for the strings plus 56 MB for the map, roughly double for 2M. Xray also holds the JSON and protobuf copies while loading, so plan for a few hundred MB at start on 2 GB, tight but not a crash by itself

the real problem: when a REALITY RAW inbound starts, Xray runs DetectPos…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Kenya-West
Comment options

Answer selected by Kenya-West
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants