Skip to content

Refactor Spicy bridge and add TCP protocol detection parser#190

Merged
glaslos merged 18 commits into
mainfrom
gsoc2025/issue-184
May 28, 2026
Merged

Refactor Spicy bridge and add TCP protocol detection parser#190
glaslos merged 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 17 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.

@glaslos

glaslos commented May 18, 2026

Copy link
Copy Markdown
Member

@furusiyya can you resolve the conflicts?

@furusiyya furusiyya force-pushed the gsoc2025/issue-184 branch from 5aaa307 to 5a457c3 Compare May 28, 2026 05:58
@furusiyya

Copy link
Copy Markdown
Collaborator Author

@glaslos I've resolved the conflicts.

@glaslos glaslos merged commit bee8c99 into main May 28, 2026
1 check passed
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

3 participants