Documentation
¶
Overview ¶
Package proxy wires VORTEX's config into running data-plane listeners (the end-of-M2 integration step): for each configured route it starts the matching TCP tunnel, UDP tunnel, HTTP/HTTPS reverse proxy, or QUIC/HTTP3 dual-stack listener, runs them under one lifecycle, and aggregates their stats.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager owns all data-plane listeners derived from the config.
func NewManager ¶
func NewManager(cfg ManagerConfig) (*Manager, error)
NewManager validates cfg and builds (but does not start) a listener for each route. It returns an error if the config is missing, a required dependency is absent, or any route has an unknown protocol or fails to initialise.
func (*Manager) Start ¶
Start runs every route's listener concurrently and blocks until ctx is cancelled (returns nil) or a listener fails fatally (cancels the rest and returns the error).
func (*Manager) Stats ¶
func (m *Manager) Stats() []RouteStats
Stats returns one RouteStats per configured route.
type ManagerConfig ¶
type ManagerConfig struct {
// Config is the validated VORTEX configuration. Required.
Config *config.Config
// TLS supplies certificates for https/h3 routes. May be nil when no route
// needs TLS.
TLS *vtls.Manager
// TCPPool is shared by all routes for backend dialing. Required.
TCPPool *tcp.Pool
// MTLSConfig provides the mTLS server config for routes with mtls:true. May
// be nil when no route uses mTLS.
MTLSConfig *vtls.MTLSConfig
// PolicyEngine enforces an authorization policy on every L7 (HTTP/HTTPS)
// request. May be nil, in which case no policy enforcement is applied.
PolicyEngine *policy.Engine
// Edge applies IP blocking and global rate limiting at the L7 edge, ahead of
// policy. May be nil, in which case no edge protection is applied.
Edge *security.Edge
// Metrics records per-request Prometheus metrics on L7 routes. May be nil.
Metrics *observability.Metrics
// Tracer creates per-request spans on L7 routes. May be nil (no-op tracer).
Tracer trace.Tracer
// Runtime and PluginRegistry back per-route WASM hook chains. Both may be
// nil, in which case routes run without plugins.
Runtime *plugins.Runtime
PluginRegistry *plugins.Registry
// Registry and Enforcer back per-route tenant quota enforcement. Both may be
// nil, in which case routes run without tenancy.
Registry *tenancy.Registry
Enforcer *tenancy.Enforcer
// Logger receives route lifecycle events; defaults to slog.Default.
Logger *slog.Logger
}
ManagerConfig configures a proxy Manager.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package proxygateway implements VORTEX's protocol gateway (build plan M2.6): it inspects each request and dispatches WebSocket upgrades, gRPC calls, and plain HTTP to the appropriate handler.
|
Package proxygateway implements VORTEX's protocol gateway (build plan M2.6): it inspects each request and dispatches WebSocket upgrades, gRPC calls, and plain HTTP to the appropriate handler. |
|
Package proxyhttp implements VORTEX's L7 (HTTP/1.1 + HTTP/2) reverse proxy (build plan M2.2): a pooled RoundTripper, request router, load balancers, the proxy handler, and the internet-facing server.
|
Package proxyhttp implements VORTEX's L7 (HTTP/1.1 + HTTP/2) reverse proxy (build plan M2.2): a pooled RoundTripper, request router, load balancers, the proxy handler, and the internet-facing server. |
|
Package proxyquic implements VORTEX's QUIC / HTTP/3 transport (build plan M2.3) on top of github.com/quic-go/quic-go.
|
Package proxyquic implements VORTEX's QUIC / HTTP/3 transport (build plan M2.3) on top of github.com/quic-go/quic-go. |
|
Package tcp implements VORTEX's raw TCP tunnel engine (build plan M2.1): a bidirectional byte pump between a client connection and a backend connection, a per-backend connection pool, a weighted round-robin selector, and an accept loop that wires them together.
|
Package tcp implements VORTEX's raw TCP tunnel engine (build plan M2.1): a bidirectional byte pump between a client connection and a backend connection, a per-backend connection pool, a weighted round-robin selector, and an accept loop that wires them together. |
|
Package proxyudp implements VORTEX's UDP tunnel (build plan M2.5): a session-tracking forwarder for connectionless UDP traffic with a per-source-IP token-bucket rate limiter.
|
Package proxyudp implements VORTEX's UDP tunnel (build plan M2.5): a session-tracking forwarder for connectionless UDP traffic with a per-source-IP token-bucket rate limiter. |