This commit is contained in:
Yangxt
2026-09-21 16:46:55 +08:00
parent 01842c59c6
commit ad2b0a7d3e
58 changed files with 6906 additions and 3 deletions
+26
View File
@@ -0,0 +1,26 @@
// Package navicat implements the Navicat HTTP Tunnel protocol used by
// ntunnel_mysql.php (script version 206 in this repository).
//
// Every request is stateless: the PHP script opens a new MySQL connection,
// runs actn=C or actn=Q, and disconnects. See docs/PROTOCOL.md.
package navicat
const (
Magic uint32 = 1111
Version202 uint16 = 202
Version206 uint16 = 206
HeaderSize = 16
ActionConnect = "C"
ActionQuery = "Q"
ErrnoUnsupportedPHP uint32 = 201
ErrnoInvalidParams uint32 = 202
ErrnoMySQLMissing uint32 = 203
ErrnoInvalidToken uint32 = 204
sepMore byte = 0x01
sepLast byte = 0x00
markLong byte = 0xFE
markNull byte = 0xFF
)