{"id":19726236,"url":"https://github.com/zaqqaz/wspr","last_synced_at":"2025-06-25T03:34:35.253Z","repository":{"id":39637129,"uuid":"283790365","full_name":"zaqqaz/wspr","owner":"zaqqaz","description":"WebSocket proxy for post http requests. Perfect for testing purposes/mocks 🚀","archived":false,"fork":false,"pushed_at":"2024-01-16T09:35:45.000Z","size":140,"stargazers_count":10,"open_issues_count":11,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-02T08:27:46.618Z","etag":null,"topics":["http","mock","post","proxy","request","server","test","websocket","ws"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/zaqqaz.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}},"created_at":"2020-07-30T13:58:51.000Z","updated_at":"2024-11-26T10:21:19.000Z","dependencies_parsed_at":"2024-01-16T11:35:51.457Z","dependency_job_id":null,"html_url":"https://github.com/zaqqaz/wspr","commit_stats":{"total_commits":27,"total_committers":5,"mean_commits":5.4,"dds":0.2592592592592593,"last_synced_commit":"7bc23adee29a22ddca62f555c4d49490d9dc7a2c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zaqqaz/wspr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaqqaz%2Fwspr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaqqaz%2Fwspr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaqqaz%2Fwspr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaqqaz%2Fwspr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaqqaz","download_url":"https://codeload.github.com/zaqqaz/wspr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaqqaz%2Fwspr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261799153,"owners_count":23211342,"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":["http","mock","post","proxy","request","server","test","websocket","ws"],"created_at":"2024-11-11T23:34:54.341Z","updated_at":"2025-06-25T03:34:35.228Z","avatar_url":"https://github.com/zaqqaz.png","language":"TypeScript","readme":"[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#)\n\n# WSPR\nWebSocket proxy for post http requests. Perfect for testing purposes/mocks 🚀\n\n![wssExample](https://user-images.githubusercontent.com/2823336/88941927-814ad280-d281-11ea-8624-9637c13ee868.jpg)\n\n### Installation\n\n```\nnpm i -g wspr\n```\n\n### Usage\n\nJust run\n```\nwspr\n```\n\nafter, you will see output with 2 urls:\n```\nWebSocket server started ws://localhost:3005\nHTPP proxy server started http://localhost:3006\n```\n\n### Broadcast message to clients: \nTo broadcast a message to clients, send a POST request with a string/JSON body (via Postman or cURL) to the HTTP endpoint provided in the previous step.\n\n```\ncurl -d \"{\"hello\": \"world\"}\" -X POST http://localhost:3006\n```\n\n### Websocket over secure connection\n\nIf you want to run the websocket server over a secure connection, follow these steps:\n\n1. create self signed certificates: https://letsencrypt.org/docs/certificates-for-localhost/#making-and-trusting-your-own-certificates\n\n2. trust the self signed certs, eg on mac: https://tosbourn.com/getting-os-x-to-trust-self-signed-ssl-certificates/\n\n3. pass the paths to the certificate and key using the `--cert` and `--key` CLI args, eg: \n\n```bash\nwspr --cert=./localhost.crt --key=./localhost.key\n```\n\n4. you should see the websocket is now running over wss:\n\n```\nWebSocket server started wss://localhost:3005\n```\n### Proxy and extend existing WebSocket\n\nJust specify `--proxyWsUrl='wss://your.url/andPath'` and all the messages from your actual server will be proxied via WSPR with the ability for you to send any extra messages to your clients (useful during new feature implementation when the server has not implemented some messages yet).\n\n## Enjoy 🚀🥤\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaqqaz%2Fwspr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaqqaz%2Fwspr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaqqaz%2Fwspr/lists"}