Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 173 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
name: CI

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
test:
name: Test Suite
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust: [stable, nightly]
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Run tests
run: cargo test --all --verbose

- name: Run doc tests
run: cargo test --doc --verbose

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Check formatting
run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Run clippy
run: cargo clippy --all-features -- -D warnings

audit:
name: Security Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install cargo-audit
run: cargo install cargo-audit

- name: Run security audit
run: cargo audit

coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install tarpaulin
run: cargo install cargo-tarpaulin

- name: Generate coverage
run: cargo tarpaulin --out Xml --verbose

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./cobertura.xml
fail_ci_if_error: false

build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Build debug
run: cargo build --verbose

- name: Build release
run: cargo build --release --verbose

examples:
name: Build Examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Build examples
run: cargo build --examples --verbose

check-dependencies:
name: Check Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install cargo-outdated
run: cargo install cargo-outdated

- name: Check for outdated dependencies
run: cargo outdated --exit-code 1 || true

benchmark:
name: Benchmark
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Run benchmarks
run: cargo bench --no-fail-fast || true
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- HTTP/2 support with ALPN-based protocol negotiation
- TLS termination using Rustls with modern cipher suites
- h2c (HTTP/2 over cleartext) support for internal traffic
- L7 routing with path, header, and method-based matching
- Regex support for path matching in routes
- Path rewriting capabilities in routing rules
- Token bucket rate limiting with per-client and global limits
- Retry logic with exponential backoff and jitter
- Connection pooling and load balancing transport layer
- Multiple load balancing strategies (round-robin, least connections, random)
- Endpoint health tracking with circuit breaker integration
- Comprehensive benchmark suite using Criterion

### Changed
- Refactored listener to support multiple protocols
- Enhanced error types with additional variants for new features
- Improved configuration system with builder patterns
- Updated dependencies to latest versions

### Fixed
- Proper graceful shutdown handling for all connection types

## [0.1.0] - Initial Release

### Added
- Async HTTP/1.1 proxy using Tokio, Hyper, and Tower
- Round-robin load balancing
- Circuit breaker with Hystrix-style state machine
- Prometheus metrics integration
- Admin endpoints for health checks and metrics
- Graceful shutdown support
- Basic integration tests
- GitHub Actions CI pipeline
Loading
Loading