Files
flvx/go-gost/x/socket/AGENTS.md
T
sagit 9a9e83dda0 docs(agents): update knowledge base with encryption, API envelope, and build conventions (#127)
Add comprehensive documentation of project conventions including:
- Encryption patterns (AES with node secret PSK)
- API envelope structure (code, msg, data, ts)
- Build peculiarities (minify: false, rolldown-vite, UPX compression)
- Unique styles (flat monorepo, asymmetric Go layout, hybrid frontend mode)
- Module boundaries and anti-patterns
- Large file hotspots and code map references

Updated 7 AGENTS.md files across root and submodules.
2026-02-15 14:33:00 +00:00

1.1 KiB

GOST SOCKET KNOWLEDGE BASE

Generated: Sun Feb 15 2026

OVERVIEW

WebSocket reporter and socket utilities for panel integration. Stack: Go, GOST core, gorilla/websocket.

STRUCTURE

socket/
├── websocket_reporter.go  # Agent-to-panel telemetry (1504 LOC)
├── service.go             # Socket service orchestration (534 LOC)
├── socket.go              # Core socket interface
├── udp.go                 # UDP socket handling
├── packet.go              # Packet framing
└── packetconn.go          # Packet connection wrapper

WHERE TO LOOK

Task Location Notes
Panel Reporting websocket_reporter.go Real-time system info (CPU, mem, uptime) every 2s
Command Handling websocket_reporter.go Processes AddService, UpgradeAgent, etc.

CONVENTIONS

  • Inherits from parent go-gost/x/ conventions.
  • Low-level network primitives.
  • All panel communication is AES-encrypted using node secret.

ANTI-PATTERNS

  • DO NOT EDIT generated protobuf.

COMMANDS

cd go-gost
go test ./x/socket/...