Enhance MTProxy checker by introducing a new -probe mode deep-strict for stricter response validation. Update README and Docker documentation to clarify probing modes, exit codes, and the new MTPROXY_TDLIB_HELPER and MTPROXY_TDLIB_TIMEOUT environment variables for external helper integration. Refactor connection handling and error reporting to improve robustness and clarity in response verification.
This commit is contained in:
@@ -34,3 +34,15 @@ func TestIsResPQ(t *testing.T) {
|
||||
t.Fatal("expected resPQ")
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsUnencryptedDCEnvelope(t *testing.T) {
|
||||
msgData := make([]byte, 8)
|
||||
binary.LittleEndian.PutUint32(msgData, 0x11223344)
|
||||
w := wrapUnencrypted(msgData)
|
||||
if !isUnencryptedDCEnvelope(w) {
|
||||
t.Fatal("expected envelope for arbitrary constructor")
|
||||
}
|
||||
if isResPQ(w) {
|
||||
t.Fatal("not resPQ")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user