{"id":33919149,"url":"https://github.com/larscom/rusty-relay","last_synced_at":"2026-04-08T19:32:12.370Z","repository":{"id":321408518,"uuid":"1078924221","full_name":"larscom/rusty-relay","owner":"larscom","description":"A self-hostable server that forwards webhooks and can proxy all kinds HTTP requests to a local machine.","archived":false,"fork":false,"pushed_at":"2026-03-13T01:49:29.000Z","size":448,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-13T02:33:41.618Z","etag":null,"topics":["cli","development-tools","proxy","relay","rust","webhooks"],"latest_commit_sha":null,"homepage":"https://rusty-relay.larscom.nl/health","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/larscom.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-18T17:58:21.000Z","updated_at":"2026-03-12T20:48:25.000Z","dependencies_parsed_at":"2025-10-29T14:37:56.659Z","dependency_job_id":null,"html_url":"https://github.com/larscom/rusty-relay","commit_stats":null,"previous_names":["larscom/rusty-relay"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/larscom/rusty-relay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larscom%2Frusty-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larscom%2Frusty-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larscom%2Frusty-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larscom%2Frusty-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/larscom","download_url":"https://codeload.github.com/larscom/rusty-relay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larscom%2Frusty-relay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31571600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","development-tools","proxy","relay","rust","webhooks"],"created_at":"2025-12-12T08:43:16.523Z","updated_at":"2026-04-08T19:32:12.362Z","avatar_url":"https://github.com/larscom.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🦀 Rusty Relay\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://img.shields.io/crates/v/rusty-relay-server\" alt=\"CI\"\u003e\n  \u003ca href=\"https://github.com/larscom/rusty-relay/actions/workflows/workflow.yml\"\u003e\u003cimg src=\"https://github.com/larscom/rusty-relay/actions/workflows/workflow.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e \n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/crates/l/rusty-relay-server\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A self-hostable server that forwards webhooks and can proxy all kinds HTTP requests to a local machine.\n\u003c/p\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://github.com/larscom/rusty-relay/blob/main/.github/image/client-example.png\" alt=\"client\"\u003e\n\u003c/p\u003e\n\n## 🚀 What is Rusty Relay?\n\nRusty Relay is a simple server that can forward webhooks and can proxy all kinds of HTTP requests to a local machine. So you can for example expose your local REST API or website to the public. It's a simplified version of the popular [ngrok](https://ngrok.com/), but instead focuses on being simple and self hostable and purely made for development.\n\n## ✨ Features\n\n- **Relay webhooks**: Forwards webhooks to a local machine.\n- **Proxy HTTP requests**: Proxies HTTP requests to a local machine so you can quickly build a REST api or React app locally and expose it to the public.\n- **Secure**: Supports TLS for encrypted communication between server and client.\n- **No account setup**: Clients do not need accounts to connect to the server.\n- **Low memory usage**: The server (in docker) only uses like 4MB memory.\n\n## 🏁 Getting Started\n\n### Installing the Client\n\n#### 🍺 Homebrew\n\n```bash\n# add tap\nbrew tap larscom/tap\n\n# install binary\nbrew install larscom/tap/rusty_relay_client\n```\n\n#### 📟 Shell\n\n```bash\ncurl -fsSL https://github.com/larscom/rusty-relay/tree/main/scripts/install.sh | sh\n```\n\n##### 📦 Cargo\n\n```bash\ncargo install rusty-relay-client\n```\n\nOr simply download the client binary for your platform: [releases](https://github.com/larscom/rusty-relay/releases)\n\n### Running the Client\n\n```bash\nUsage: rusty-relay-client [OPTIONS] --server \u003cSERVER\u003e --token \u003cTOKEN\u003e --target \u003cTARGET\u003e\n\nOptions:\n  -s, --server \u003cSERVER\u003e    The rusty-relay-server hostname e.g: localhost:8080 or my.server.com [env: RUSTY_RELAY_SERVER=]\n      --token \u003cTOKEN\u003e      The connection token generated on rusty-relay-server [env: RUSTY_RELAY_TOKEN=]\n      --target \u003cTARGET\u003e    Target URL to local webserver e.g: http://localhost:3000/api/webhook [env: RUSTY_RELAY_TARGET=]\n  -i, --insecure           Connect to rusty-relay-server without TLS\n  -c, --ca-cert \u003cCA_CERT\u003e  Path to CA certificate (PEM encoded) [env: RUSTY_RELAY_CA_CERT=]\n  -v, --version            Show version info\n  -h, --help               Print help\n```\n\n### Running the Client against the test server\n\nYou can connect to the test server [rusty-relay.larscom.nl](https://rusty-relay.larscom.nl/health) to see how it works, feel free to use it as you like.\n\n```bash\nrusty-relay-client \\\n  --server rusty-relay.larscom.nl \\\n  --target http://localhost:3000 \\\n  --token pSyyI54kOhq8yZcV7YOEMKFw\n```\n\n### Running the Server (docker)\n\nThe preferred way of running the server is via docker and behind a reverse proxy that handles TLS certificates so the client can connect securely via websockets.\n\n```bash\n# a connection token is generated on startup which the client needs to connect (see logs)\n\ndocker run -p 8080:8080 ghcr.io/larscom/rusty-relay:latest\n```\n\n### Installing the Server (alternative method)\n\nUsing cargo\n\n```bash\ncargo install rusty-relay-server\n```\n\nOr simply download the server binary for your platform: [releases](https://github.com/larscom/rusty-relay/releases)\n\n### Running the Server (alternative method)\n\nJust run the binary.\n\n### Running the Server in HTTPS mode\n\nBy default, the server starts in `HTTP` mode only.\n\nIf you want to run the server in `HTTPS` mode instead you need to provide the server certificate and private key. If the server detects those files it will automatically run in `HTTPS` mode.\n\nWith docker:\n\n```bash\ndocker run \\\n  -v ./cert.pem:/app/certs/cert.pem \\\n  -v ./key.pem:/app/certs/key.pem \\\n  ghcr.io/larscom/rusty-relay:latest\n```\n\nWithout docker:\n\nCreate a `certs` folder next to the binary with 2 files:\n\n- cert.pem\n- key.pem\n\nOr change the environment variables where the server should look for those files.\n\n## 📚 Examples\n\n### 🪝 Webhooks\n\nLets say you have a REST API running locally with this endpoint: `http://localhost:3000/api/webhook` ready to receive webhooks.\n\nYou run the client\n```bash\nrusty-relay-client \\\n  --server rusty-relay.larscom.nl \\\n  --target http://localhost:3000/api/webhook \\\n  --token pSyyI54kOhq8yZcV7YOEMKFw\n```\n\nYou should then be able to publically send webhooks to: `https://rusty-relay.larscom.nl/webhook/{id}`\n\n### 🌐 Serve locally built REST API\n\nLets say you have a REST API running locally with this endpoint: `http://localhost:3000/api/users`\n\nYou run the client\n```bash\nrusty-relay-client \\\n  --server rusty-relay.larscom.nl \\\n  --target http://localhost:3000 \\\n  --token pSyyI54kOhq8yZcV7YOEMKFw\n```\n\nYou should then be able to access it publically via: `https://rusty-relay.larscom.nl/proxy/{id}/api/users`\n\n### ⚛️ Serve local React application\nJust run your react application e.g: `npm run dev`\n\n```bash\nVITE v7.2.4  ready in 89 ms\n\n➜  Local:   http://localhost:5173/\n➜  Network: use --host to expose\n➜  press h + enter to show help\n```\n\nThen run the client\n\n```bash\nrusty-relay-client \\\n  --server rusty-relay.larscom.nl \\\n  --target http://localhost:5173 \\\n  --token pSyyI54kOhq8yZcV7YOEMKFw\n```\n\nYou should then be able to access it publically via: `https://rusty-relay.larscom.nl/proxy/{id}`\n\n## ⚖️ Webhook vs Proxy endpoint\n\nThe `/webhook/{id}` endpoint returns a `200` or `400` status code immediately and does NOT await the response of the local webserver. A `400` status code is returned when `{id}` does not exist. Otherwise a `200` is returned.\n\nThe `/proxy/{id}` endpoint awaits the response of the local webserver, including its status code, body, headers.\n\n## 🌍 Environment variables\n\n### Server environment variables\n\n| Variable                    | Description                                               | Required | Default                   |\n| --------------------------- | --------------------------------------------------------- | -------- | ------------------------- |\n| `RUSTY_RELAY_HTTP_PORT`     | HTTP port on which the server will listen                 | ❌       | `8080`                    |\n| `RUSTY_RELAY_HTTPS_PORT`    | HTTPS port on which the server will listen                | ❌       | `8443`                    |\n| `RUSTY_RELAY_CONNECT_TOKEN` | Make the connection token static                          | ❌       | `\u003cauto generated\u003e`        |\n| `RUSTY_RELAY_PROXY_TIMEOUT` | How long to await the proxy response (maximum) in seconds | ❌       | `5`                       |\n| `RUSTY_RELAY_PING_INTERVAL` | The interval (in seconds) at which to ping the client     | ❌       | `25`                      |\n| `RUSTY_RELAY_TLS_CERT_FILE` | Path to TLS certificate (PEM encoded)                     | ❌       | `./certs/cert.pem`        |\n| `RUSTY_RELAY_TLS_KEY_FILE`  | Path to TLS private key                                   | ❌       | `./certs/key.pem`         |\n| `RUST_LOG`                  | The log level, set to `debug` to enable debug logs        | ❌       | `rusty_relay_server=info` |\n\n### Client environment variables\n\nIf you set the `RUSTY_RELAY_SERVER`, `RUSTY_RELAY_TOKEN`, `RUSTY_RELAY_TARGET` variables you can use the client without arguments.\n\n| Variable              | Description                                                          |\n| --------------------- | -------------------------------------------------------------------- |\n| `RUSTY_RELAY_SERVER`  | The rusty-relay-server hostname e.g: localhost:8080 or my.server.com |\n| `RUSTY_RELAY_TOKEN`   | The connection token generated on rusty-relay-server                 |\n| `RUSTY_RELAY_TARGET`  | Target URL to local webserver e.g: http://localhost:3000/api/webhook |\n| `RUSTY_RELAY_CA_CERT` | Path to the CA certificate (PEM encoded)                             |\n\n## 📜 License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarscom%2Frusty-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flarscom%2Frusty-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarscom%2Frusty-relay/lists"}