Skip to content

Commit 0c1421a

Browse files
committed
feat: initial rpcproxy implementation
High-performance JSON-RPC reverse proxy in Rust with: - Priority-based failover across multiple upstream RPCs - Smart caching with method-aware TTLs and request coalescing - Active health checking via eth_blockNumber - Bearer token authentication (optional) - /health, /readiness, /status endpoints - Docker HEALTHCHECK requiring real block data - Verbose logging flag for debugging
0 parents  commit 0c1421a

11 files changed

Lines changed: 3564 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish Docker image to GitHub Packages
2+
3+
on:
4+
release:
5+
types: [published]
6+
push:
7+
tags:
8+
- "*"
9+
workflow_dispatch:
10+
11+
jobs:
12+
publish-to-ghcr:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v3
25+
26+
- name: Log in to GitHub Container Registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Extract version from tag and set lowercase repo owner
34+
id: meta
35+
run: |
36+
REF_NAME=${GITHUB_REF#refs/tags/}
37+
VERSION=${REF_NAME#v}
38+
REPO_OWNER=$(echo $GITHUB_REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')
39+
echo "version=$VERSION" >> $GITHUB_OUTPUT
40+
echo "repo_owner=$REPO_OWNER" >> $GITHUB_OUTPUT
41+
42+
- name: Build and push Docker image
43+
uses: docker/build-push-action@v5
44+
with:
45+
context: .
46+
push: true
47+
platforms: linux/amd64,linux/arm64/v8
48+
tags: |
49+
ghcr.io/${{ steps.meta.outputs.repo_owner }}/rpcproxy:${{ steps.meta.outputs.version }}
50+
ghcr.io/${{ steps.meta.outputs.repo_owner }}/rpcproxy:latest
51+
labels: |
52+
org.opencontainers.image.version=${{ steps.meta.outputs.version }}
53+
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/target
2+
/.history
3+
*.log

0 commit comments

Comments
 (0)