{"id":13581740,"url":"https://github.com/mautrix/wsproxy","last_synced_at":"2025-12-30T02:21:05.535Z","repository":{"id":51342037,"uuid":"335405826","full_name":"mautrix/wsproxy","owner":"mautrix","description":"A simple HTTP push -\u003e websocket proxy for Matrix appservices","archived":false,"fork":false,"pushed_at":"2022-04-18T12:35:40.000Z","size":142,"stargazers_count":25,"open_issues_count":2,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-02T15:47:49.647Z","etag":null,"topics":["go","golang","matrix-org","proxy","websocket"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mautrix.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":"2021-02-02T19:50:17.000Z","updated_at":"2024-07-07T21:20:58.000Z","dependencies_parsed_at":"2022-08-27T19:40:28.972Z","dependency_job_id":null,"html_url":"https://github.com/mautrix/wsproxy","commit_stats":null,"previous_names":["tulir/mautrix-wsproxy"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mautrix%2Fwsproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mautrix%2Fwsproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mautrix%2Fwsproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mautrix%2Fwsproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mautrix","download_url":"https://codeload.github.com/mautrix/wsproxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247470476,"owners_count":20944146,"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":["go","golang","matrix-org","proxy","websocket"],"created_at":"2024-08-01T15:02:13.035Z","updated_at":"2025-12-30T02:21:05.494Z","avatar_url":"https://github.com/mautrix.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# mautrix-wsproxy\nA simple HTTP push -\u003e websocket proxy for Matrix appservices.\n\nThis is used by [mautrix-imessage](https://github.com/mautrix/imessage)\nto receive appservice transactions without opening a port to the local Mac\nwhere the bridge runs. In general, you should run wsproxy in the same place as\nyour homeserver and use your existing reverse proxy to secure the websocket\nconnection between the bridge and wsproxy.\n\n![flowchart](./flowchart.png)\n\n## Setup\nYou can download a prebuilt executable from [the CI] or [GitHub releases]. The\nexecutables are statically compiled and have no dependencies. Alternatively,\nyou can build from source:\n\n0. Have [Go](https://golang.org/) 1.16 or higher installed.\n1. Clone the repository (`git clone https://github.com/mautrix/wsproxy.git`).\n2. Build with `go build -o mautrix-wsproxy`. The resulting executable will be\n   in the current directory named `mautrix-wsproxy`.\n\nAfter you have the executable ready, configure and run mautrix-wsproxy:\n\n1. Copy `example-config.yaml` from the root of the repo to `config.yaml`\n   and fill out the fields (with the tokens from the registration file).\n2. Change the appservice registration file to point your homeserver at\n   mautrix-wsproxy. The registration's `url` field should have a `http://`\n   address that your homeserver can use to reach mautrix-wsproxy. Restart\n   homeserver after registration changes.\n3. Change the bridge config (`homeserver` -\u003e `websocket_proxy`)\n   to point at mautrix-wsproxy (the URL should have `ws://` or `wss://`).\n4. Run the proxy with `mautrix-wsproxy` and start the bridge.\n\n[the CI]: https://mau.dev/mautrix/wsproxy/-/pipelines\n[GitHub releases]: https://github.com/mautrix/wsproxy/releases\n\n## Sample docker-compose file\nThe compose files here also include [mautrix-syncproxy]. It's mostly needed for\nthe Android SMS bridge (to save battery), but can be used with iMessage as well.\nYou can omit it if you don't use the `bridge`→`encryption`→`appservice` option.\n\n[mautrix-syncproxy]: https://github.com/mautrix/syncproxy\n\n```yaml\nversion: \"3.7\"\n\nservices:\n  mautrix-wsproxy:\n    container_name: mautrix-wsproxy\n    image: dock.mau.dev/mautrix/wsproxy\n    restart: unless-stopped\n    ports:\n      - 29331\n    environment:\n      #LISTEN_ADDRESS: \":29331\"\n      APPSERVICE_ID: imessage\n      AS_TOKEN: put your as_token here\n      HS_TOKEN: put your hs_token here\n      # These URLs will work as-is with docker networking\n      SYNC_PROXY_URL: http://mautrix-syncproxy:29332\n      SYNC_PROXY_WSPROXY_URL: http://mautrix-wsproxy:29331\n      SYNC_PROXY_SHARED_SECRET: random string here\n\n  mautrix-syncproxy:\n    container_name: mautrix-syncproxy\n    image: dock.mau.dev/mautrix/syncproxy\n    restart: unless-stopped\n    environment:\n      #LISTEN_ADDRESS: \":29332\"\n      DATABASE_URL: postgres://user:pass@host/mautrixsyncproxy\n      HOMESERVER_URL: http://localhost:8008\n      SHARED_SECRET: same random string as above here\n```\n\n### Docker with multiple appservices\nThe environment variables only support one appservice at a time, so you'll need\nto use a config file if you want more:\n\n```yaml\nversion: \"3.7\"\n\nservices:\n  mautrix-wsproxy:\n    container_name: mautrix-wsproxy\n    image: dock.mau.dev/mautrix/wsproxy\n    restart: unless-stopped\n    command: /usr/bin/mautrix-wsproxy -config /data/config.yaml\n    volumes:\n    - ./config:/data\n    ports:\n    - 29331\n    environment:\n      #LISTEN_ADDRESS: \":29331\"\n\n  mautrix-syncproxy:\n    container_name: mautrix-syncproxy\n    image: dock.mau.dev/mautrix/syncproxy\n    restart: unless-stopped\n    environment:\n      #LISTEN_ADDRESS: \":29332\"\n      DATABASE_URL: postgres://user:pass@host/mautrixsyncproxy\n      HOMESERVER_URL: http://localhost:8008\n      SHARED_SECRET: random string here\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmautrix%2Fwsproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmautrix%2Fwsproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmautrix%2Fwsproxy/lists"}