fyntr

Crates.iofyntr
lib.rsfyntr
version0.2.4
created_at2025-11-08 10:48:43.810949+00
updated_at2026-01-24 14:56:02.896418+00
descriptionA minimal forward proxy to tame bursty outbound traffic
homepage
repositoryhttps://github.com/Crux-One/Fyntr
max_upload_size
id1922754
size482,706
(Crux-One)

documentation

README

Fyntr

Fyntr

A minimal forward proxy to tame bursty outbound traffic.

GitHub License Release Version Crates.io Version

About

Fyntr (/ˈfɪn.tər/) is a minimal forward proxy that smooths bursts of outbound TLS traffic to keep connections stable on constrained networks. No server-side changes required. Fyntr stays out of the way with no auth, no inspection. It keeps a tiny runtime memory footprint (typically ~14MB RSS on macOS). Its internal actor-driven scheduler relays encrypted traffic transparently without terminating TLS, making bursty workloads more predictable and robust.

Internals

  • Traffic shaping (prevents burst congestion by interleaving packets via Deficit Round-Robin scheduling).
  • Adaptive quantum tuning (optimizes quantum size via packet size statistics).
  • FD limit guard (validates file descriptor limits against max connection settings).

Quick Start

  1. Install and run Fyntr:

    Install the crates.io release and run it locally (defaults to port 9999).

    cargo install fyntr
    fyntr
    

    Or build from source:

    cargo run --release
    

    Override defaults via CLI flags or env vars:

    cargo run --release -- --port 8080 --max-connections 512
    # or
    FYNTR_PORT=8080 FYNTR_MAX_CONNECTIONS=512 cargo run --release
    

    By default, Fyntr caps concurrent connections at 1000 (set to 0 to disable).

  2. Configure Your Environment:

    Export the following environment variables in a separate terminal.

    export HTTPS_PROXY=http://127.0.0.1:9999 
    

    This configuration affects not only aws-cli but also various tools that use libcurl, including git, brew, wget, and more.

  3. Verify It Works:

    You can test the connection with a simple curl command.

    curl https://ifconfig.me
    

CLI Options

Option Env var Default Description
--port <PORT> FYNTR_PORT 9999 Port to listen on.
--max-connections <MAX_CONNECTIONS> FYNTR_MAX_CONNECTIONS 1000 Maximum number of concurrent connections allowed (set to 0 for unlimited).

Why Fyntr?

Managing cloud operations with tools such as Terraform might spawn bursts of short-lived TCP connections rapidly opening and closing. The simultaneous transmission of data from these flows often causes micro-bursts that choke routers with limited capacity, particularly on consumer-grade NAT devices, which can lead to unresponsive networks due to overwhelming CPU interrupt loads.

Fyntr takes a simpler approach. Instead of pooling connections, it evens out how active flows are serviced. The scheduler uses Deficit Round-Robin (DRR) to distribute sending opportunities across flows fairly, so packet bursts from many parallel flows get interleaved instead of firing all at once.

This smoothing makes it less likely for small routers to choke their CPUs during connection bursts. This effect is most noticeable when workloads involve many concurrent connections and where CPU scheduling pressure, rather than bandwidth, is the primary bottleneck.

Usage with Terraform

Example: AWS Provider

# Set environment variables
export HTTPS_PROXY=http://127.0.0.1:9999

# Standard usage
terraform apply

# Or with aws-vault wrapper
aws-vault exec my-profile -- terraform apply
Commit count: 173

cargo fmt