A proxy layer to sit in front of GoChain/Ethereum JSON-RPC-API to make it more secure and resilient.
Branch: master
Clone or download
Latest commit 58d9fcd Jan 16, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci ci fix Sep 20, 2018
.gitignore check headers for original IP Dec 20, 2018
Gopkg.lock add toml config file option Jan 10, 2019
Gopkg.toml Update dep Aug 15, 2018
Makefile Switched to Chi and added cors. Mar 26, 2018
README.md add circleci config file and badge Apr 11, 2018
config.toml add toml config file option Jan 10, 2019
handler.go Merge pull request #33 from gochain-io/orig-ip Dec 20, 2018
limits.go change burst limit from 10 to perMinuteLimit/10 Sep 26, 2018
matcher.go deglobalize variables; protect stats map with sync.Mutex Mar 22, 2018
proxy.go support eth_chainId example Jan 16, 2019
stats.go deglobalize variables; protect stats map with sync.Mutex Mar 22, 2018
version.go rpc-proxy: 0.0.25 release [skip ci] Jan 16, 2019




Getting Started


Go Version 1.10+ if not installed you can follow this documentation https://golang.org/doc/install


You can run the program with the "port" and "url" sent as command line arguments. If not set by default rpc-proxy will be running on port 8545 and it will be redirecting the request to http://localhost:8080.

Make sure you run your program at 8545 port or specify port while running the program.

Run Commands:

If you want to host ReverseProxy on 8545 and redirect the request to the port 8040 , run following command

./rpc-proxy -url http://SOME_IP:8545 -allow "eth_*" -rpm 100




When you run the rpc-proxy server, It will print the port where rpc-proxy is running and where it is redirecting the request to.

Whenever there is a http request , we are printing request body and response body along with headers.Along with that we are measuring the time for each api. Currently we are storing the total response time, total no of api calls for a particular path.


Build Docker image:

make build

Run it:

docker run --rm -it -p 8545:8545 gochain/rpc-proxy -url http://SOME_IP:8545 -allow "eth_*,net_*" -rpm 1000