Skip to content

About

Stream backpressure & dynamic TLS interception proxy for traffic inspection and network fault injection (Node.js, TCP/TLS)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

⚡️ Specter Proxy

Specter Proxy is a high-performance, developer-centric local proxy designed for network simulation, deep packet inspection (sniffing), and traffic sabotage. Built for the "Net-Runners" who need to know exactly how their apps behave under hostile network conditions.

Vibe: Terminal Monochrome Green Stack: Node.js Streams

🌌 The Concept

Most developers test on perfect gigabit Wi-Fi. Specter lets you step into the shadows. It sits between your application and the internet, allowing you to intercept packets, inject latency, and simulate "Chaos" (404s, 500s, or dropped connections) on a per-domain basis.

✨ Key Features

  • 🕵️ Real-time Sniffer: A terminal-based dashboard showing live request/response cycles, headers, and payloads.
  • ⏳ Latency Injection: Simulate 3G, Edge, or "Coffee Shop Wi-Fi" by throttling specific domains.
  • 💣 Chaos Engine: Randomly or specifically inject HTTP errors (502 Bad Gateway, 408 Timeout) to test your app's resilience.
  • 🔓 SSL/TLS Decryption: Automated Man-In-The-Middle (MITM) logic to sniff HTTPS traffic using a locally trusted CA.
  • 🔍 Packet Filtering: Use regex to focus only on the traffic that matters (e.g., api.production.com).

🛠 Tech Stack & Learnings

1. Node.js Streams & Buffer Management

Specter uses Node.js Streams to pipe data from the client to the server. This ensures that even large file uploads/downloads don't spike your RAM usage.

  • Learning: Backpressure handling and chunked encoding.

2. Cryptography (MITM)

To sniff HTTPS, Specter acts as a Certificate Authority (CA). It generates "ghost certificates" on the fly for requested domains.

  • Learning: Public Key Infrastructure (PKI), X.509 certificates, and TLS handshakes.

3. OSI Model Mastery

By working with the net module for raw TCP and http/https for the application layer, this project demonstrates a full grasp of Layer 4 and Layer 7 networking.

🚀 Getting Started

Prerequisites

  • Node.js (v18+)
  • Basic understanding of Terminal/CLI

Installation

  1. Install dependencies:
    npm install
  2. Generate your local Root CA:
    npm run generate-ca
  3. Trust the generated src/ca/certs/rootCA.pem in your Browser/OS.

Usage

Start the proxy dashboard:

npm start

Configure your app or browser to use localhost:8080 as its proxy.

🗺 Roadmap

  • Protocol Support: Add WebSocket sniffing and injection.
  • Scriptable Rules: Allow users to write JS snippets to modify responses on the fly.
  • Export to HAR: Save sniffed sessions for analysis in Chrome DevTools.

🤝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

⚖️ License

Distributed under the MIT License. See LICENSE for more information.


Developed for those who build in the light, but test in the dark.

About

Stream backpressure & dynamic TLS interception proxy for traffic inspection and network fault injection (Node.js, TCP/TLS)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages