proxykit

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2026 License: Apache-2.0

README

proxykit

proxykit is a standalone Go proxy foundation extracted from network-debugger.

Current public packages:

  • github.com/cherrypick-agency/proxykit/proxyhttp
    • shared HTTP proxy transport helpers
    • hop-by-hop header stripping
    • WebSocket upgrade detection
    • absolute-URI detection
  • github.com/cherrypick-agency/proxykit/proxyruntime
    • forward proxy listener lifecycle
    • SOCKS5 listener lifecycle
    • runtime apply/restart semantics
    • human-readable port conflict diagnostics
  • github.com/cherrypick-agency/proxykit/socketio
    • Socket.IO packet parsing for event-style text frames
  • github.com/cherrypick-agency/proxykit/observe
    • transport-neutral observation contracts
    • shared session, HTTP, and WebSocket event types
    • hook-friendly concrete structs without storage or route coupling
  • github.com/cherrypick-agency/proxykit/reverse
    • reusable reverse HTTP proxy handler
    • query-based target resolver helper
    • redirect rewrite helper for mounted proxy paths
    • request/response mutation plus observation hooks
    • now powers the app reverse HTTP transport through an adapter layer
  • github.com/cherrypick-agency/proxykit/forward
    • reusable HTTP forward proxy handler for absolute-URI requests
    • standard forwarding header policy
    • request/response mutation plus observation hooks
    • keeps CONNECT and WS upgrades outside the core HTTP handler
  • github.com/cherrypick-agency/proxykit/connect
    • reusable HTTP CONNECT tunneling handler
    • connection hijack, upstream dial, and raw tunnel lifecycle
    • protocol event hook for tunnel establishment
    • keeps MITM outside the package
  • github.com/cherrypick-agency/proxykit/mitm
    • optional development CA authority loading and generation
    • host-based interception policy
    • leaf certificate issuance with cache-aware reuse
    • PEM encoding helper for CA export flows
  • github.com/cherrypick-agency/proxykit/cookies
    • reverse-proxy cookie rewrite helpers
    • namespace isolation for browser cookie storage
    • Set-Cookie roundtrip parsing that preserves unknown attributes
    • outbound Cookie filtering for isolated upstream forwarding
  • github.com/cherrypick-agency/proxykit/wsproxy
    • reusable WebSocket proxy handler
    • hook-driven session/frame observation
    • query-based target resolver helper
    • optional plaintext fallback for TLS-mismatch targets

Design rules:

  • no Flutter or UI-specific contracts in public packages
  • packages stay small and composable
  • app-specific monitoring, persistence, DTOs, and REST endpoints remain outside the module
  • new protocol engines should be hook-driven, not storage-driven

Examples and release hardening:

  • each public transport package now has a compile-able example test that shows the intended mounting style
  • tests inside proxykit stay self-contained and do not depend on network-debugger internals
  • observe remains transport-neutral and does not encode the current app delivery protocol
  • proxyruntime examples demonstrate listener lifecycle without app config or settings DTOs
  • the module now lives in its own dedicated repository workspace and is no longer kept as a nested incubation module

This repository intentionally excludes:

  • app-specific REST routes like /httpproxy, /wsproxy, /_api/v1/proxy/config
  • admin auth, loopback security policy, and settings DTOs
  • current monitor room protocol and frontend-specific realtime event names
  • storage, spool, capture visibility, and session query projection rules from network-debugger

The intended usage model is:

  1. mount one or more transport handlers from reverse, forward, connect, or wsproxy
  2. attach observation and mutation hooks
  3. keep persistence, monitoring delivery, and product-specific REST/API concerns in your own adapter layer

Directories

Path Synopsis
Package connect provides an HTTP CONNECT tunneling handler.
Package connect provides an HTTP CONNECT tunneling handler.
Package cookies provides proxy-safe cookie rewriting helpers for mounted reverse proxies.
Package cookies provides proxy-safe cookie rewriting helpers for mounted reverse proxies.
Package forward provides a reusable HTTP forward proxy handler for absolute URI requests.
Package forward provides a reusable HTTP forward proxy handler for absolute URI requests.
internal
Package mitm provides optional TLS interception primitives for proxykit.
Package mitm provides optional TLS interception primitives for proxykit.
Package observe defines transport-neutral observation contracts shared by proxykit packages.
Package observe defines transport-neutral observation contracts shared by proxykit packages.
Package proxyhttp provides shared HTTP proxy transport primitives.
Package proxyhttp provides shared HTTP proxy transport primitives.
Package proxyruntime manages long-lived proxy listeners such as HTTP forward-proxy and SOCKS5 endpoints.
Package proxyruntime manages long-lived proxy listeners such as HTTP forward-proxy and SOCKS5 endpoints.
Package reverse provides a reusable HTTP reverse proxy handler with transport-level mutation and observation hooks.
Package reverse provides a reusable HTTP reverse proxy handler with transport-level mutation and observation hooks.
Package socketio parses Socket.IO event-style packets from text frames.
Package socketio parses Socket.IO event-style packets from text frames.
Package wsproxy provides a reusable WebSocket proxy handler with hook-based observation points and target resolution abstractions.
Package wsproxy provides a reusable WebSocket proxy handler with hook-based observation points and target resolution abstractions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL