Files
DarkflameServer/dDashboardServer/routes/CMakeLists.txt
Aaron Kimbrell 332bc04ce8 feat(capture): record whole packets of an account, a character or everything on every server
Staff arm a packet capture on the dashboard; master passes MESSAGE_CAPTURE_CONTROL ARM to
every world, auth and chat and arms its own. Each server's PacketCapture tap (dServer receive,
and a send hook in RakPeer::Send so replica constructions are seen too) records into one
preallocated chunk per server and ships sealed chunks through master on the main loop when
capture_flush_bytes or capture_flush_interval_ms is reached; past capture_buffer_max_mb the
oldest chunks are dropped and the dashboard records a gap. Nothing is armed: one flag check.

- targets: an account (from its login; packets before the login are kept per connection
  and added once auth or the world knows whose they are), a character (from when it is
  picked), or everything; up to 8 at once (a bit each in the record mask)
- worlds and auth record their clients' packets and the master link messages of a captured
  player (session keys by name, zone transfers by request, player added/removed, migration);
  chat finds the player in each packet; master records server traffic for everything
- secrets are never recorded: structs that carry them (login request, login response user
  key, world validation session key, session key messages between servers) are read,
  blanked and written again before recording; auth keeps only the handshake and login
- PacketDecoder: a registry by service and message id names every packet and decodes the
  registered structs; CaptureBundle is the file format (DLUBNDL1, metadata, records);
  CaptureTools orders records on one timeline, pulls movement out, makes bundles portable
  or anonymous and diffs replays
- the dashboard keeps packet captures in message_capture_sessions (capture_kind 1) and
  their packets in a file under capture_dir, one write per batch; arming is audited
- MESSAGE_CAPTURE_CONTROL/DATA only gain appended enum values and trailing fields

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 22:34:34 -05:00

119 lines
3.4 KiB
CMake

set(DASHBOARDROUTES_SOURCES
"APIRoutes.cpp"
"StaticRoutes.cpp"
"DashboardRoutes.cpp"
"WSRoutes.cpp"
"AuthRoutes.cpp"
"ApiKeyRoutes.cpp"
"GrantRoutes.cpp"
"GuildRoutes.cpp"
"RouteUtils.cpp"
"PlayerActions.cpp"
"AccountRoutes.cpp"
"ClientAssets.cpp"
"GameText.cpp"
"MaintenanceRoutes.cpp"
"ReportRoutes.cpp"
"EconomyPlaces.cpp"
"SecurityRoutes.cpp"
"WebhookRoutes.cpp"
"EconomyJobs.cpp"
"LiveWorld.cpp"
"LiveUpdateRoutes.cpp"
"SettingsRoutes.cpp"
"Background.cpp"
"Scheduler.cpp"
"SettingsCatalog.cpp"
"BackupRoutes.cpp"
"BackupFiles.cpp"
"ReportViews.cpp"
"CharacterTools.cpp"
"CharacterRestore.cpp"
"MissionTools.cpp"
"CharacterProgress.cpp"
"ServerRoutes.cpp"
"LogBundle.cpp"
"Traffic.cpp"
"TrafficHistory.cpp"
"NetworkView.cpp"
"PerfHistory.cpp"
"Performance.cpp"
"LeaderboardRoutes.cpp"
"VanityRoutes.cpp"
"ChatRoutes.cpp"
"ChatHistory.cpp"
"ChatFlagRoutes.cpp"
"ClientSysInfoRoutes.cpp"
"ClientSysInfoView.cpp"
"Strikes.cpp"
"Inspector.cpp"
"CaptureReplay.cpp"
"CDClientBrowser.cpp"
"SettingsHistory.cpp"
"Announcements.cpp"
"EventsCalendar.cpp"
"LiveEventRoutes.cpp"
"ChallengeRoutes.cpp"
"InstanceLoad.cpp"
"WorldView.cpp"
"Scenery.cpp"
"WorkerPool.cpp"
"Workers.cpp"
"AccountModeration.cpp"
"ModerationTools.cpp"
"ModeratorHelper.cpp"
"../ai/ClaudeClient.cpp"
"../ai/ModeratorPrompt.cpp"
"PublicRoutes.cpp"
"Showcase.cpp"
"FeaturedProperties.cpp"
"ContrabandRoutes.cpp"
"UgcRoutes.cpp"
"UgcLinks.cpp"
"UgcFetch.cpp"
"PropertyRentRoutes.cpp"
"PasswordRecovery.cpp"
"PrometheusMetrics.cpp"
"../email/SmtpClient.cpp"
"../email/EmailService.cpp"
"../email/OAuth2.cpp"
"../notify/WebhookFormat.cpp"
"../notify/Alerts.cpp"
# Shared with the world servers, which add items and models the same way
"${PROJECT_SOURCE_DIR}/dGame/dUtilities/ObjectIDManager.cpp"
)
add_library(DashboardRoutes STATIC ${DASHBOARDROUTES_SOURCES})
target_include_directories(DashboardRoutes PRIVATE
"${PROJECT_SOURCE_DIR}/dCommon"
"${PROJECT_SOURCE_DIR}/dCommon/dClient"
"${PROJECT_SOURCE_DIR}/dCommon/dEnums"
"${PROJECT_SOURCE_DIR}/dDatabase"
"${PROJECT_SOURCE_DIR}/dDatabase/CDClientDatabase"
"${PROJECT_SOURCE_DIR}/dDatabase/CDClientDatabase/CDClientTables"
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase"
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase/ITables"
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase/MySQL"
"${PROJECT_SOURCE_DIR}/dNet"
"${PROJECT_SOURCE_DIR}/dWeb"
"${PROJECT_SOURCE_DIR}/dServer"
"${PROJECT_SOURCE_DIR}/thirdparty"
"${PROJECT_SOURCE_DIR}/thirdparty/nlohmann"
"${PROJECT_SOURCE_DIR}/thirdparty/libbcrypt/include"
"${PROJECT_SOURCE_DIR}/dDashboardServer/auth"
"${PROJECT_SOURCE_DIR}/dDashboardServer/routes"
"${PROJECT_SOURCE_DIR}/dDashboardServer/email"
"${PROJECT_SOURCE_DIR}/dDashboardServer/notify"
"${PROJECT_SOURCE_DIR}/dDashboardServer/ai"
"${PROJECT_SOURCE_DIR}/dChatFilter" # word rules for the chat filter page
"${PROJECT_SOURCE_DIR}/dGame/dUtilities" # ObjectIDManager.h
)
execute_process(COMMAND git rev-parse --short HEAD WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE DLU_GIT_COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
if(NOT DLU_GIT_COMMIT)
set(DLU_GIT_COMMIT "unknown")
endif()
target_compile_definitions(DashboardRoutes PRIVATE PROJECT_VERSION="\"${PROJECT_VERSION}\"" DLU_GIT_COMMIT="${DLU_GIT_COMMIT}")
target_link_libraries(DashboardRoutes PRIVATE ${COMMON_LIBRARIES} dWeb dServer dUgc sqlite3 OpenSSL::Crypto CURL::libcurl)