feat(pcap): complete replay system with filtering, metadata, and live replay

Wire ExcludeOpcodes config into RecordingConn so configured opcodes
(e.g. ping, nop, position) are filtered at record time. Add padded
metadata with in-place PatchMetadata to populate CharID/UserID after
login. Implement --mode replay using protbot's encrypted connection
with timing-aware packet sending, auto-ping response, concurrent
S→C collection, and byte-level payload diff reporting.
This commit is contained in:
Houmgaor
2026-02-23 19:34:30 +01:00
parent 7ef5efc549
commit f712e3c04d
14 changed files with 679 additions and 42 deletions

View File

@@ -64,7 +64,7 @@ func startSignCapture(s *Server, conn network.Conn, remoteAddr net.Addr) (networ
s.logger.Info("Capture started", zap.String("file", path))
rc := pcap.NewRecordingConn(conn, w, startNs)
rc := pcap.NewRecordingConn(conn, w, startNs, capCfg.ExcludeOpcodes)
cleanup := func() {
if err := w.Flush(); err != nil {
s.logger.Warn("Failed to flush capture", zap.Error(err))