https://github.com/buildonviction/proxy
https://github.com/buildonviction/proxy
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/buildonviction/proxy
- Owner: BuildOnViction
- Created: 2019-01-28T07:03:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-12-04T06:17:33.000Z (8 months ago)
- Last Synced: 2026-01-15T07:10:27.464Z (7 months ago)
- Language: Go
- Homepage:
- Size: 1.22 MB
- Stars: 5
- Watchers: 5
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Build
```
make
```
## Run
```
./proxy --help
Usage of ./proxy:
-cacheExpiration string
Cache expiration (default "2s")
-cacheLimit int
Cache limit (default 100000)
-config string
Path to config file (default "./config/default.json")
-endpoint value
List of endpoint urls
-http string
Address to listen for HTTP requests on (default "0.0.0.0:3000")
-n int
The number of workers to start (default 16) -verbosity int
Log Verbosity (default 3)
```
E.g run a proxy:
```
./proxy --endpoint https://rpc.tomochain.com --verbosity 5
```
Run with Docker:
```
docker run -p 3000:3000 tomochain/proxy proxy --endpoint https://rpc.tomochain.com
```
Custom config file:
```
./proxy --config path_to_json_config_file
```
Enable https:
```
./proxy --https 0.0.0.0:443
```
Enable websocket:
```
./proxy --ws 0.0.0.0:3002
```
Note: You should create your own certs, and update config file with the path to the files
Healthcheck path:
```
/proxystatus
```
## Test
Start proxy:
```
./proxy
```
Run test 100 requests with proxy:
```
time bash test.sh
```
Run test 100 requests without proxy:
```
time bash test.sh 1
```