This app works as a proxy with public Flare API providers in mind. It includes a middleware that blocks transactions to the PriceSubmitter contract by default. It doesn't modify, record, or do anything with the request other than rejecting transactions to the PriceSubmitter contract (0x1000000000000000000000000000000000000003).
It uses GoFiber's Proxy to forward requests to the specified endpoint, the requests should get there intact, and come back intact too. And it also uses goccy/go-json to make JSON marshalling/unmarshalling faster.
- Handle proxy to websockets
- Fix reading whitelist file from the current running directory, for some reason the watcher doesn't emit events
- Implement expiration dates for whitelisted addresses
go run app.go --monitor --port :3000 --endpoint http://localhost:9650 --watchlist "/path/to/whitelist/file.json"
go run app.go --help
# Clean packages
make clean-packages
# Generate go.mod & go.sum files
make requirements
# Generate docker image
make build
# Generate docker image with no cache
make build-no-cache
# Run the projec in a local container
make up
# Run local container in background
make up-silent
# Run local container in background with prefork
make up-silent-prefork
# Stop container
make stop
# Start container
make start
docker build -t flare-node-proxy .
docker run -d -p 3000:3000 flare-node-proxy ./app -prod -monitor -endpoint http://localhost:9650