{"id":19291808,"url":"https://github.com/hirosystems/stacks-rpc-proxy","last_synced_at":"2026-05-16T04:39:03.701Z","repository":{"id":175298976,"uuid":"642765585","full_name":"hirosystems/stacks-rpc-proxy","owner":"hirosystems","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-23T09:56:31.000Z","size":97,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-22T19:50:01.637Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hirosystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-19T09:47:46.000Z","updated_at":"2024-03-09T23:03:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"d13f56c2-791b-420e-8cfa-f6d151b0fc64","html_url":"https://github.com/hirosystems/stacks-rpc-proxy","commit_stats":null,"previous_names":["hirosystems/stacks-rpc-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fstacks-rpc-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fstacks-rpc-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fstacks-rpc-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fstacks-rpc-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hirosystems","download_url":"https://codeload.github.com/hirosystems/stacks-rpc-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240395747,"owners_count":19794572,"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-09T22:27:59.428Z","updated_at":"2026-05-16T04:38:58.663Z","avatar_url":"https://github.com/hirosystems.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stacks-rpc-proxy\n\nA Node.js based proxy for the `stacks-node`, designed to provide a host of features and improvements over the traditional `stacks-node` HTTP server. The proxy is dockerized for ease of deployment and management.\n\n## Getting Started\n\nPull the Docker image:\n\n```sh\ndocker pull hirosystems/stacks-rpc-proxy\n```\n\n## Features\n\n- **CORS Support:** Handles CORS requests on behalf of the `stacks-node`, a feature that is not fully supported in their HTTP server.\n- **Custom Regex-Path Based Cache-Control:** Allows custom, path-dependent caching strategies.\n- **Transaction POST Multicast Support:** Enables sending the same transaction to multiple endpoints.\n- **Prometheus Metrics:** Integration with Prometheus for robust monitoring.\n\n## Implementation\n\n- **Fastify:** Uses Fastify for routing and proxying.\n- **Undici:** Uses undici, the latest and much-improved Node.js HTTP client, for proxy requests.\n- **Pino Logging:** Includes comprehensive HTTP request logging using Pino.\n\n## Configuration\n\nThe following environment variables are especially important in order to establish a connection to the upstream `stacks-node`:\n\n- `STACKS_CORE_PROXY_HOST`: The hostname for the upstream `stacks-node`.\n- `STACKS_CORE_PROXY_PORT`: The port for the upstream `stacks-node`.\n\nHere are the possible configuration environment varialbles:\n- `STACKS_CORE_PROXY_HOST`: The hostname for the upstream `stacks-node`. This is required.\n- `STACKS_CORE_PROXY_PORT`: The port for the upstream `stacks-node`. This is required.\n- `NODE_ENV`: The current environment mode. Accepts an Enum of Node Environment values. Defaults to 'production'.\n- `LOG_LEVEL`: Controls the level of log verbosity. Defaults to 'debug'.\n- `RPC_PROXY_HOST`: The hostname where the RPC Proxy will listen. Defaults to '0.0.0.0'.\n- `RPC_PROXY_PORT`: The port on which the RPC Proxy will listen. Defaults to 5444.\n- `STACKS_API_PROXY_CACHE_CONTROL_FILE`: (Optional) Path to a JSON file containing cache-control configuration for paths.\n- `STACKS_API_EXTRA_TX_ENDPOINTS_FILE`: (Optional) Additional `stacks-node` endpoints to POST transactions to.\n- `MAX_REQUEST_BODY_SIZE`: Max HTTP request body content size in bytes. Defaults to 2MB.\n- `PROMETHEUS_HOST`: The host on which Prometheus will run. Defaults to '0.0.0.0'.\n- `PROMETHEUS_PORT`: The port on which Prometheus will run. Defaults to 9153.\n- `LOG_RESPONSES`: (Optional) Flag to print upstream response bodies. This increases memory and CPU usage and should only be used for debugging. Defaults to false.\n- `LOG_REQUESTS`: (Optional) Flag to print request bodies. This increases memory and CPU usage and should only be used for debugging. Defaults to false.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fstacks-rpc-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirosystems%2Fstacks-rpc-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fstacks-rpc-proxy/lists"}