Skip to content

Refactor Spicy bridge and add TCP protocol detection parser#190

Open
furusiyya wants to merge 18 commits into
mainfrom
gsoc2025/issue-184
Open

Refactor Spicy bridge and add TCP protocol detection parser#190
furusiyya wants to merge 18 commits into
mainfrom
gsoc2025/issue-184

Conversation

@furusiyya
Copy link
Copy Markdown
Collaborator

Summary

It's a continuation of GSoC PR #186 and Fixes #184.

Here's the summary of updates:

  • Refactor the Spicy bridge to stay protocol-agnostic by using the combined generated linker file
  • Enrich the HTTP Spicy parser to expose parsed path and query fields
  • Add a TCP::Protocol Spicy parser for payload-based protocol detection
  • Route raw TCP traffic through spicy.Parse("tcp", sample) when Spicy is enabled
  • Preserve the existing TCP fallback behavior for unknown payloads

Todo: Rewrite the Glutton documentation to make it more understandable for developers and security researchers.

Boolean-Autocrat and others added 18 commits July 6, 2025 21:13
* Adds C++ bridge (bridge.{h,cpp}) to embed Spicy/HILTI in Glutton
* Spawns single-threaded worker goroutine for parser calls
* Registers and exposes parsers via spicy.Initialize()
* Implements Spicy-based HTTP handler and grammar (parsers/http.spicy)
* Adds wire protocol selector in protocols.go (toggle with viper `spicy.enabled`)
* Adds build rules for Spicy grammars (protocols/spicy/Makefile)
* reserves field slots without duplicating names; avoid double-free / leak
* detects and aborts on strdup / malloc failures, rolling back field_count
* adds early-exit helper
* adds clarifying comments
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Introduce Spicy parser framework with HTTP parser implementation
@furusiyya furusiyya requested a review from glaslos May 9, 2026 18:16
@furusiyya
Copy link
Copy Markdown
Collaborator Author

@glaslos It’s ready for review. I’ll probably rebase and merge it afterward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate protocol parsing using Spicy

2 participants