package checker import "strings" // ProbeMode selects how strictly we validate after MTProxy init. type ProbeMode int const ( // ProbeFast: handshake + init, then any inbound data within a short window (legacy behavior; fast). ProbeFast ProbeMode = iota // ProbeDeep: MTProto req_pq and expect resPQ from Telegram DC through the tunnel (stricter; slower). ProbeDeep ) // Options configures Check. Nil or zero value uses ProbeFast. type Options struct { Probe ProbeMode } // ParseProbe maps env/flag strings: "", "fast" -> ProbeFast; "deep" -> ProbeDeep. func ParseProbe(s string) ProbeMode { switch strings.ToLower(strings.TrimSpace(s)) { case "deep", "respq", "dc": return ProbeDeep default: return ProbeFast } } func effectiveOpts(opts *Options) *Options { if opts == nil { return &Options{Probe: ProbeFast} } return opts }