test(mtproto): cover single-backend DC aliases
Follow up gramsrv PR #17 with boundary coverage and public configuration docs.
Canonical-Telesrv: b4df3e72c24470e4ce09e5fc1d46e0c2944f6d3e
Reviewed-Head: e7eb07b9eb
Co-authored-by: onysd <beatvin128@gmail.com>
This commit is contained in:
parent
5dcdb57e4c
commit
9ef746d45e
8 changed files with 127 additions and 69 deletions
|
|
@ -31,12 +31,10 @@ type Config struct {
|
|||
RSAKeyPath string
|
||||
// DC 是本 server 的 DC ID。
|
||||
DC int
|
||||
// StrictDCCheck turns on exact DC-ID validation for the permanent-key
|
||||
// exchange (default off = lenient). See mtprotoedge.Options.StrictDC doc
|
||||
// for the full rationale: telesrv is always a single physical backend, but
|
||||
// many client forks alias dc_id 1..5 to it, so a mismatched client-chosen
|
||||
// dc_id is expected, not an attack — strict mode exists only for a
|
||||
// hypothetical future real multi-DC deployment.
|
||||
// StrictDCCheck enables the default-off key-exchange DC-label diagnostic.
|
||||
// The normal single-backend mode accepts every wire int32 label without
|
||||
// partitioning auth keys, sessions, or business state. See
|
||||
// mtprotoedge.Options.StrictDC for the optional strict behavior.
|
||||
StrictDCCheck bool
|
||||
// MTProtoMaxConnections / PerIP 覆盖 raw Accept、codec sniff、握手到认证 session
|
||||
// 的完整物理连接生命周期;负数关闭对应 admission 上限。
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue