{"id":21659836,"url":"https://github.com/tomusdrw/jsonrpc-proxy","last_synced_at":"2025-12-30T05:24:21.022Z","repository":{"id":36202841,"uuid":"147326955","full_name":"tomusdrw/jsonrpc-proxy","owner":"tomusdrw","description":"A generic and extensible JSON-RPC proxy, supporting cache and load-balancing.","archived":true,"fork":false,"pushed_at":"2023-02-16T22:14:33.000Z","size":428,"stargazers_count":82,"open_issues_count":0,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-05T18:57:46.138Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomusdrw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-04T10:10:42.000Z","updated_at":"2025-01-05T16:56:06.000Z","dependencies_parsed_at":"2023-01-16T23:23:11.003Z","dependency_job_id":null,"html_url":"https://github.com/tomusdrw/jsonrpc-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tomusdrw/jsonrpc-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomusdrw%2Fjsonrpc-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomusdrw%2Fjsonrpc-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomusdrw%2Fjsonrpc-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomusdrw%2Fjsonrpc-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomusdrw","download_url":"https://codeload.github.com/tomusdrw/jsonrpc-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomusdrw%2Fjsonrpc-proxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265672342,"owners_count":23808844,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T09:31:42.587Z","updated_at":"2025-12-12T11:02:34.991Z","avatar_url":"https://github.com/tomusdrw.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"jsonrpc-proxy\n=================================\n# Status\n\nThis library has not been updated in a while and is here just for archive purposes. You might consider looking at https://github.com/AcalaNetwork/subway which is supposed to serve the same purpose and is way more recent.\n\n# Overview\n\nThe proxy has a pluggable architecture of middlewares. Each middleware receives every RPC call and can decide to either terminate it (return a response) or pass it forward to the next middleware. Middlewares are also able to modify the response object.\n\nAs the last middleware we are using `Upstream` middleware, which is responsible for calling the target node.\n\nMiddlewares included in this repo:\n\n- Simple caching middleware\n- Simple permissioning middleware\n- WebSockets upstream middleware\n\nSimilarly pluggable are JSON-RPC transports that the proxy exposes. Currently supported:\n- TCP server\n- HTTP server\n- IPC server\n- WebSockets server\n\n![Proxy Overview](./overview.svg)\n\n# Ideas\n\n- [ ] Rate Limitting\n- [ ] Fail over\n- [ ] Load balancing\n\n# Usage\n\n```\nrpc-proxy 0.1\nParity Technologies Ltd \u003cadmin@parity.io\u003e\nGeneric RPC proxy, featuring caching and load balancing.\n\nUSAGE:\n    rpc-proxy [OPTIONS]\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nOPTIONS:\n        --cached-methods-path \u003ccached-methods-path\u003e\n            A path to a JSON file containing a list of methods that should be\n            cached. See examples for the file schema. [default: -]\n        --http-cors \u003chttp-cors\u003e\n            Specify CORS header for HTTP JSON-RPC API responses.Special options:\n            \"all\", \"null\", \"none\". [default: none]\n        --http-cors-max-age \u003chttp-cors-max-age\u003e\n            Configures AccessControlMaxAge header value in milliseconds.Informs\n            the client that the preflight request is not required for the\n            specified time. Use 0 to disable. [default: 3600000]\n        --http-hosts \u003chttp-hosts\u003e\n            List of allowed Host header values. This option willvalidate the\n            Host header sent by the browser, it isadditional security against\n            some attack vectors. Specialoptions: \"all\", \"none\". [default: none]\n        --http-ip \u003chttp-ip\u003e\n            Configures HTTP server interface. [default: 127.0.0.1]\n\n        --http-max-payload \u003chttp-max-payload\u003e\n            Maximal HTTP server payload in Megabytes. [default: 5]\n\n        --http-port \u003chttp-port\u003e\n            Configures HTTP server listening port. [default: 9934]\n\n        --http-rest-api \u003chttp-rest-api\u003e\n            Enables REST -\u003e RPC converter for HTTP server. Allows you tocall RPC\n            methods with `POST /\u003cmethodname\u003e/\u003cparam1\u003e/\u003cparam2\u003e`.The \"secure\"\n            option requires the `Content-Type: application/json`header to be\n            sent with the request (even though the payload is ignored)to prevent\n            accepting POST requests from any website (via form submission).The\n            \"unsecure\" option does not require any `Content-Type`.Possible\n            options: \"unsecure\", \"secure\", \"disabled\". [default: disabled]\n        --http-threads \u003chttp-threads\u003e\n            Configures HTTP server threads. [default: 4]\n\n        --ipc-path \u003cipc-path\u003e\n            Configures IPC server socket path. [default: ./jsonrpc.ipc]\n\n        --ipc-request-separator \u003cipc-request-separator\u003e\n            Configures TCP server request separator (single byte). If \"none\" the\n            parser will try to figure out requests boundaries. [default: none]\n        --tcp-ip \u003ctcp-ip\u003e\n            Configures TCP server interface. [default: 127.0.0.1]\n\n        --tcp-port \u003ctcp-port\u003e\n            Configures TCP server listening port. [default: 9955]\n\n        --tcp-request-separator \u003ctcp-request-separator\u003e\n            Configures TCP server request separator (single byte). If \"none\" the\n            parser will try to figure out requests boundaries. Default is new\n            line character. [default: 10]\n        --upstream-ws \u003cupstream-ws\u003e\n            Address of the parent WebSockets RPC server that we should connect\n            to. [default: ws://127.0.0.1:9944]\n        --websockets-hosts \u003cwebsockets-hosts\u003e\n             List of allowed Host header values. This option will validate the\n            Host header sent by the browser, it is additional security against\n            some attack vectors. Special options: \"all\", \"none\". [default: none]\n        --websockets-ip \u003cwebsockets-ip\u003e\n            Configures WebSockets server interface. [default: 127.0.0.1]\n\n        --websockets-max-connections \u003cwebsockets-max-connections\u003e\n            Maximum number of allowed concurrent WebSockets JSON-RPC\n            connections. [default: 100]\n        --websockets-origins \u003cwebsockets-origins\u003e\n             Specify Origin header values allowed to connect. Special options:\n            \"all\", \"none\".  [default: none]\n        --websockets-port \u003cwebsockets-port\u003e\n            Configures WebSockets server listening port. [default: 9945]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomusdrw%2Fjsonrpc-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomusdrw%2Fjsonrpc-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomusdrw%2Fjsonrpc-proxy/lists"}