Update README and Docker documentation to clarify exit codes and error handling. Introduce new error for no data received after MTProxy header in checker logic.
Publish mtproxy_checker Docker image / test (push) Successful in 6s
Publish mtproxy_checker Docker image / build-and-push (push) Successful in 51s

This commit is contained in:
Denozordec
2026-04-11 01:35:37 +07:00
parent 175136d82a
commit e3049028cd
3 changed files with 10 additions and 5 deletions
+5 -1
View File
@@ -16,6 +16,10 @@ import (
// ErrProxyClosed indicates the MTProxy dropped the TCP connection right after the probe (Telethon #1134 style).
var ErrProxyClosed = errors.New("mtproxy closed connection after initial payload")
// ErrNoDataAfterHeader indicates the proxy accepted the probe but sent no application data back within the wait window.
// Treating silence as success matched some servers but often disagrees with Telegram client "unavailable".
var ErrNoDataAfterHeader = errors.New("no data from proxy after mtproxy header (timeout)")
// Check runs the handshake probe for the given parsed secret.
func Check(ctx context.Context, host string, port int, parsed *secret.Parsed, dcID int16) error {
conn, err := dialTCP(ctx, host, port)
@@ -101,5 +105,5 @@ func waitPostPayload(conn net.Conn) error {
}
}
_ = conn.SetReadDeadline(time.Time{})
return nil
return ErrNoDataAfterHeader
}