FAIR Proxy is high performance, easy-to-run public service that provides proxied and load-balanced JSON-RPC endpoints for FAIR chain. It is based on NGINX.
- Docker
- docker-compose
- Clone repo & all submodules:
git clone --recurse-submodules https://github.com/skalenetwork/fair-proxy.git
cd fair-proxy
- Copy
data/anchor_endpoints.json.example
todata/anchor_endpoints.json
and replace the placeholders with the actual anchor endpoint(s) for initializing the FAIR Manager:
cp data/anchor_endpoints.json.example data/anchor_endpoints.json
# Edit data/anchor_endpoints.json with your anchor endpoints
-
Put
server.crt
andserver.key
files indata
folder -
Export required environment variables:
export FAIR_CONTRACTS=0x1234567890abcdef... # FAIR Manager contract address or alias
export HEARTBEAT_URL=https://your-heartbeat-url.com/api/push/xyz # Optional
export USE_ALB=False # Set to True if behind load balancer
- Start the proxy:
scripts/run_proxy.sh
- View logs:
docker compose logs -f
- Stop the proxy:
docker compose down
- The file
data/anchor_endpoints.json
- contains a list of anchor endpoints used to initialize the FAIR Manager object.
FAIR_CONTRACTS
- address ofcommittee
smart contract
HEARTBEAT_URL
- URL for UptimeKuma healthcheck endpoint (optional)USE_ALB
- Set toTrue
if the proxy is deployed behind a load balancer (like AWS ALB) that sets theX-Forwarded-For
header. This configures Nginx to correctly identify the client's real IP address for rate limiting. Defaults toFalse
if not set.
All contributions to FAIR Proxy are made under the GNU Affero General Public License v3. See LICENSE.
Copyright (C) 2025-Present SKALE Labs.