MCPcopy Index your code
hub / github.com/bgpfix/bgpipe

github.com/bgpfix/bgpipe @v0.21.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.21.1 ↗ · + Follow
324 symbols 1,204 edges 52 files 129 documented · 40%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

bgpipe: BGP pipeline processor

Docker Image GitHub Release

An open-source tool that processes BGP messages through a pipeline of composable stages, built on the bgpfix library.

Full documentation at bgpipe.org

What is bgpipe?

bgpipe sits between routers as a transparent proxy, auditing, filtering, and transforming BGP sessions on the fly. Think of it as a scriptable BGP firewall and traffic processor.

Use cases: - BGP firewall with RPKI validation, prefix limits, and rate limiting - Bidirectional BGP to JSON translation including Flowspec - pipe through jq, Python, anything - MRT file processing and conversion at scale - Scriptable pipeline - chain stages or pipe through external programs - Live BGP monitoring from RIPE RIS Live or RouteViews with real-time filters - Secure transport - add TCP-MD5 to sessions, proxy over encrypted WebSockets

See the RIPE 88 bgpipe talk for background.

Quick Example

# Reverse proxy: expose internal BGP router, log all traffic to JSON
bgpipe --stdout \
  -- listen :179 \
  -- connect --wait listen 192.0.2.1

# Stream MRT file, filter by matching IP prefix, and store as JSON file
bgpipe \
  -- read https://data.ris.ripe.net/rrc01/2025.11/updates.20251107.2300.gz \
  -- grep 'prefix ~ 198.41.0.4' \
  -- write output.json

Installation

Docker (fastest):

docker pull ghcr.io/bgpfix/bgpipe:latest
docker run --rm ghcr.io/bgpfix/bgpipe:latest --help

Binary: download from GitHub Releases.

Go: go install github.com/bgpfix/bgpipe@latest

Run bgpipe -h or bgpipe <stage> -h for built-in help.

Documentation

Visit bgpipe.org for: - Quick start guide - Examples and tutorials - Filter reference - Complete stage documentation

Contributing

Author

Pawel Foremski @pforemski 2023-2026

Extension points exported contracts — how you extend this code

Stage (Interface)
Stage implements a bgpipe stage [1 implementers]
core/stage.go
NewStage (FuncType)
NewStage returns a new Stage for given parent base. It should modify base.Options.
core/stage.go

Core symbols most depended-on inside this repo

String
called by 125
core/stage.go
Errorf
called by 114
core/stage.go
AddStage
called by 22
core/bgpipe.go
Stop
called by 19
core/stage.go
parseRoleName
called by 16
stages/rpki/aspa.go
Event
called by 15
core/stage.go
AttachStages
called by 14
core/attach.go
Start
called by 14
core/rpki.go

Shape

Method 175
Function 112
Struct 35
FuncType 1
Interface 1

Languages

Go100%

Modules by API surface

core/stage.go24 symbols
core/lifecycle_test.go19 symbols
stages/rpki/integration_test.go15 symbols
pkg/extio/extio.go15 symbols
stages/limit.go13 symbols
stages/websocket.go12 symbols
stages/rpki/aspa.go11 symbols
core/bgpipe.go11 symbols
stages/write.go9 symbols
stages/rpki/aspa_test.go9 symbols
stages/exec.go9 symbols
core/rpki.go9 symbols

For agents

$ claude mcp add bgpipe \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact