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:
@@ -0,0 +1,19 @@
|
||||
//go:build !tdlib || !cgo
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
enc := json.NewEncoder(os.Stdout)
|
||||
enc.SetEscapeHTML(false)
|
||||
_ = enc.Encode(map[string]interface{}{
|
||||
"ok": false,
|
||||
"error": "tdlib_ping: build with CGO and -tags=tdlib; requires libtdjson (see cmd/tdlib_ping/README.md)",
|
||||
"exit_code": 2,
|
||||
})
|
||||
os.Exit(2)
|
||||
}
|
||||
Reference in New Issue
Block a user