Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ce9f3ac
refactor: reorganize project structure and enhance logging capabilities
pigri Jan 25, 2026
5c08366
feat: add timeout configurations for upstream connections and enhance…
pigri Jan 25, 2026
423593e
refactor: update header management in proxy configuration to support …
pigri Jan 25, 2026
394f098
feat: implement weighted load balancing using Pingora's algorithm
pigri Jan 25, 2026
2ec3691
feat: enhance logging system with bounded channel support and metrics…
pigri Jan 25, 2026
490fcdf
refactor: implement PeriodicTask trait for improved periodic worker m…
pigri Jan 25, 2026
62f38a7
feat: enhance README with new features including multi-backend firewa…
pigri Jan 25, 2026
ecbf756
refactor: reorganize project structure and enhance logging capabilities
pigri Jan 25, 2026
328e835
refactor: update header management in proxy configuration to support …
pigri Jan 25, 2026
87e4c73
feat: implement weighted load balancing using Pingora's algorithm
pigri Jan 25, 2026
f7b156d
feat: enhance logging system with bounded channel support and metrics…
pigri Jan 25, 2026
acf22f4
refactor: improve logging
koszik Jan 31, 2026
a525701
refactor: move geoip data into accesslog json
koszik Jan 31, 2026
cdac02f
fix: log correct scheme/port for http requests
koszik Jan 31, 2026
d860a7e
fix: show fail reason for ACME cert requests
koszik Jan 31, 2026
2423cfe
fix: resolve cert key collision
koszik Jan 31, 2026
66e8608
refactor: geoip lookup messages to debug prio
koszik Jan 31, 2026
c6a2794
refactor: rename logs into access/error log; only log request jsons i…
koszik Jan 31, 2026
eeedd73
fix: http1.0 connections must be closed after reply
koszik Jan 31, 2026
37c8ccf
fix: use fixed RFC3339 format for timestamp
koszik Jan 31, 2026
5d1fdf4
refactor: change threadb messages to debug level
koszik Jan 31, 2026
96bea71
refactor: update header management in proxy configuration to support …
pigri Jan 25, 2026
dd8b3a0
refactor: reorganize BPF and firewall modules, update dependencies, a…
pigri Feb 1, 2026
c3f9b52
refactor: update BPF feature checks in build script, enhance TLS fing…
pigri Feb 1, 2026
29ae024
chore: add Cargo configuration for git fetch and update Docker build …
pigri Feb 1, 2026
4b82dbf
chore: update GitHub Actions workflow to use REPO_ACCESS_TOKEN for Do…
pigri Feb 1, 2026
9bf6d21
chore: enhance Dockerfile to enforce GitHub token requirement for pri…
pigri Feb 1, 2026
a5031b7
chore: update Docker build process to utilize GitHub token securely a…
pigri Feb 1, 2026
3be16df
chore: implement wellness check workflow and enhance Docker build pro…
pigri Feb 1, 2026
6b4a1ce
refactor: improve code formatting and organization across multiple fi…
pigri Feb 1, 2026
eb978d3
chore: add package installation step to wellness check workflow for i…
pigri Feb 1, 2026
62391a9
chore: streamline package installation in wellness check workflow by …
pigri Feb 1, 2026
75c018d
chore: simplify package installation in wellness check workflow by re…
pigri Feb 1, 2026
406c17e
chore: update dependencies and refactor content scanning implementati…
pigri Feb 1, 2026
cbf138f
feat: implement WAF rate limiting functionality with new rate limit m…
pigri Feb 1, 2026
dcffa68
refactor: improve code formatting and organization in multiple files …
pigri Feb 1, 2026
4783a3e
feat: add end-to-end tests for proxy, firewall, and WAF functionality…
pigri Feb 1, 2026
057dfcc
refactor: enhance code formatting and readability in end-to-end tests…
pigri Feb 1, 2026
eaede80
fix: clean up startup logs
koszik Feb 2, 2026
1ac7837
feat: warn about unknown config
koszik Feb 2, 2026
ecceec9
fix: log http with correct scheme
koszik Feb 2, 2026
4f40545
feat: improve logging: move all request-bound errors into access.log …
koszik Feb 2, 2026
29f9462
fix: formatting
koszik Feb 2, 2026
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
Binary file added .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[net]
git-fetch-with-cli = true
20 changes: 20 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"permissions": {
"allow": [
"Bash(cargo check:*)",
"Bash(cargo update:*)",
"Bash(ls:*)",
"Bash(git checkout:*)",
"Bash(cargo clean:*)",
"Bash(cargo metadata:*)",
"Bash(git fetch:*)",
"Bash(git rebase:*)",
"Bash(git pull:*)",
"Bash(git add:*)",
"Bash(GIT_EDITOR=true git rebase:*)",
"Bash(git merge:*)",
"Bash(git reset:*)",
"Bash(git commit:*)"
]
}
}
14 changes: 12 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ jobs:
- uses: actions/checkout@v4
- name: Build binary using Docker
shell: bash
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
run: |
set -euxo pipefail
mkdir -p /tmp/build-output
docker build -t synapse-builder:latest -f pkg/docker/build.Dockerfile .
export GITHUB_TOKEN="${REPO_ACCESS_TOKEN}"
DOCKER_BUILDKIT=1 docker build \
--secret id=github_token,env=GITHUB_TOKEN \
-t synapse-builder:latest -f pkg/docker/build.Dockerfile .
docker create --name synapse-build synapse-builder:latest
docker cp synapse-build:/output/synapse /tmp/build-output/synapse
docker rm synapse-build
Expand All @@ -32,10 +37,15 @@ jobs:
- uses: actions/checkout@v4
- name: Build binary using Docker
shell: bash
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
run: |
set -euxo pipefail
mkdir -p /tmp/build-output
docker build -t synapse-builder:latest -f pkg/docker/build.Dockerfile .
export GITHUB_TOKEN="${REPO_ACCESS_TOKEN}"
DOCKER_BUILDKIT=1 docker build \
--secret id=github_token,env=GITHUB_TOKEN \
-t synapse-builder:latest -f pkg/docker/build.Dockerfile .
docker create --name synapse-build synapse-builder:latest
docker cp synapse-build:/output/synapse /tmp/build-output/synapse
docker rm synapse-build
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/pkg-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ jobs:

- name: Build DEB using Docker
shell: bash
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
run: |
set -euxo pipefail
mkdir -p /tmp/deb-build-output
docker build -t synapse-builder-deb:latest -f pkg/deb/Dockerfile .
export GITHUB_TOKEN="${REPO_ACCESS_TOKEN}"
DOCKER_BUILDKIT=1 docker build \
--build-arg REQUIRE_GITHUB_TOKEN=1 \
--secret id=github_token,env=GITHUB_TOKEN \
-t synapse-builder-deb:latest -f pkg/deb/Dockerfile .
docker run -v "${GITHUB_WORKSPACE}:/tmp/repo" -v /tmp/deb-build-output:/tmp/output --rm synapse-builder-deb:latest

- name: Installing package
Expand All @@ -40,11 +46,14 @@ jobs:

- name: Build RPM using release Dockerfile
shell: bash
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
run: |
set -euxo pipefail
mkdir -p /tmp/rpm-build-output
export GITHUB_TOKEN="${REPO_ACCESS_TOKEN}"
docker build -t synapse-builder-rpm:latest -f pkg/rpm/docker/Dockerfile pkg/rpm/docker/
docker run -v "${GITHUB_WORKSPACE}:/tmp/repo" -v /tmp/rpm-build-output:/tmp/output --rm synapse-builder-rpm:latest
docker run -e GITHUB_TOKEN -v "${GITHUB_WORKSPACE}:/tmp/repo" -v /tmp/rpm-build-output:/tmp/output --rm synapse-builder-rpm:latest

- name: Build systemd-enabled Oracle image for testing
shell: bash
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,16 @@ jobs:
runs-on: ${{ matrix.platform == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
needs:
- docker-prepare
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
strategy:
fail-fast: false
matrix:
platform: ${{ fromJson(needs.docker-prepare.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Prepare
run: |
platform=${{ matrix.platform }}
Expand Down Expand Up @@ -161,6 +166,7 @@ jobs:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
CARGO_TERM_COLOR: always
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -186,7 +192,11 @@ jobs:
run: |
set -euxo pipefail
mkdir -p /tmp/build-output
docker build -t synapse-builder:latest -f pkg/docker/build.Dockerfile .
export GITHUB_TOKEN="${REPO_ACCESS_TOKEN}"
DOCKER_BUILDKIT=1 docker build \
--build-arg REQUIRE_GITHUB_TOKEN=1 \
--secret id=github_token,env=GITHUB_TOKEN \
-t synapse-builder:latest -f pkg/docker/build.Dockerfile .
docker create --name synapse-build synapse-builder:latest
docker cp synapse-build:/output/synapse /tmp/build-output/synapse
docker rm synapse-build
Expand Down Expand Up @@ -228,10 +238,16 @@ jobs:

- name: Build DEB using Docker
shell: bash
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
run: |
set -euxo pipefail
mkdir -p /tmp/deb-build-output
docker build -t synapse-builder-deb:latest -f pkg/deb/Dockerfile .
export GITHUB_TOKEN="${REPO_ACCESS_TOKEN}"
DOCKER_BUILDKIT=1 docker build \
--build-arg REQUIRE_GITHUB_TOKEN=1 \
--secret id=github_token,env=GITHUB_TOKEN \
-t synapse-builder-deb:latest -f pkg/deb/Dockerfile .
docker run -v "${GITHUB_WORKSPACE}:/tmp/repo" -v /tmp/deb-build-output:/tmp/output --rm synapse-builder-deb:latest

- name: Archive output package
Expand Down Expand Up @@ -268,11 +284,14 @@ jobs:

- name: Build RPM using Docker
shell: bash
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
run: |
set -euxo pipefail
mkdir -p /tmp/rpm-build-output
export GITHUB_TOKEN="${REPO_ACCESS_TOKEN}"
docker build -t synapse-builder-rpm:latest -f pkg/rpm/docker/Dockerfile pkg/rpm/docker/
docker run -v "${GITHUB_WORKSPACE}:/tmp/repo" -v /tmp/rpm-build-output:/tmp/output --rm synapse-builder-rpm:latest
docker run -e GITHUB_TOKEN -v "${GITHUB_WORKSPACE}:/tmp/repo" -v /tmp/rpm-build-output:/tmp/output --rm synapse-builder-rpm:latest

- name: Archive output package
uses: actions/upload-artifact@v4
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/wellness-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Wellness Check
on:
pull_request:
branches: [main]

jobs:
fmt-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- uses: Swatinem/rust-cache@v2

- name: Install packages
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
libc6-dev \
g++ \
gcc \
make \
git \
build-essential \
clang \
libelf-dev \
libelf1 \
libssl-dev \
zlib1g-dev \
libzstd-dev \
pkg-config \
libcap-dev \
binutils-multiarch-dev \
cmake

- name: Configure git for private deps
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
run: |
if [ -n "${REPO_ACCESS_TOKEN:-}" ]; then
export GITHUB_TOKEN=$(echo -n "$REPO_ACCESS_TOKEN" | tr -d '\n\r')
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" >> $GITHUB_ENV
fi

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

- name: Run tests
run: cargo test -- --include-ignored
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ upstreams_*.yaml
*.rpm
null
*.log

config_*.yaml
config_*.yml
synapse
10 changes: 10 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- Use 'bd' for task tracking
- Shared configs: `rust-toolchain.toml`, `rustfmt.toml`, `deny.toml`, `flake.nix`, `.envrc.example`.
- Rust edition 2024; formatting via `rustfmt` (see `rustfmt.toml`, `max_width = 88`).
- Prefer `#![forbid(unsafe_code)]` and safe Unix APIs via `rustix` instead of `libc`.
…s, instead prefer using regular async traits (built into rust) and use an Enum instead of a trait object. Alternativel…
- Avoid OOP style code. Prefer using composition and Rust's data types (structs, enums).
- Use rust's `tracing` and `metrics` crates for logging, and be sure to utilize tracing spans to associate log messages…
- when using implicit returns in rust (such as returning Ok(()) on the last line of a function with the `return` keywor…
- Use standard Rust tests: unit tests in modules, integration tests under `tests/`.
- Leverage rust's testcontainers library and things like minio or aws localstack if minio doesn't work.
Loading
Loading