Logo
Chain Engine

Chain Engine

Saved chain definitions, policies, local runtime endpoints, fallback, health, and traffic logs.

The Chain Engine turns saved proxy chains into local HTTP/CONNECT proxy endpoints.

What It Manages

ObjectPurpose
ChainA saved ordered list of proxy hops with labels, tags, and fallback chain IDs.
PolicyRuntime behavior such as validation, auth, timeout, health checks, retry budget, fallback, and bandwidth limit.
RuntimeA local endpoint bound to 127.0.0.1 that sends traffic through the saved chain route.
Traffic entryRecent request/tunnel record with target, status, bytes, route, duration, and error details.

Typical Flow

  1. Test candidates in Test Proxy Chains.
  2. Save a working chain in Chain Engine -> Chains.
  3. Attach the Balanced policy or create a custom policy.
  4. Start the runtime on a local port.
  5. Configure a client to use http://127.0.0.1:<port>.
  6. Watch Chain Engine -> Traffic.

Runtime States

StateMeaning
StoppedNo listener is active.
StartingRuntime is preparing routes and binding a local port.
RunningRuntime has an active local endpoint.
DegradedRuntime started, but route health is not fully clean.
ErrorRuntime could not start or continue.

Tiny Features

FeatureDetail
Persistent definitionsChains, policies, and runtime configs are stored locally as JSON-backed state.
Fallback graphThe engine validates missing fallback chains and fallback cycles before runtime use.
Port fallbackIf the requested local port is busy, the runtime binds a random local port and records a notice.
Health loopRoutes are probed on the policy interval and can be marked unhealthy after the failure threshold.
Active route refreshRuntime route selection refreshes after health updates.
Optional local authBasic proxy auth protects the local endpoint when enabled in policy.
Bandwidth capChain runtime can enforce a bandwidth limit and return status 509 when reached.
Traffic memoryLatest 500 traffic entries include target, status, bytes, route, duration, success, error, and timestamps.

The Chain Engine is for durable local operation. Use Chain Tester first when you only need to evaluate chain candidates.

On this page