{"id":14563552,"url":"https://github.com/iximiuz/wsmux","last_synced_at":"2025-03-24T04:31:00.806Z","repository":{"id":225663357,"uuid":"766521912","full_name":"iximiuz/wsmux","owner":"iximiuz","description":"wsmux - a simple WebSocket tunnel server","archived":false,"fork":false,"pushed_at":"2024-09-15T17:31:59.000Z","size":26,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T21:46:38.082Z","etag":null,"topics":["go","golang","port-forwarding","tunnel","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iximiuz.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":"2024-03-03T13:57:59.000Z","updated_at":"2025-02-26T02:21:39.000Z","dependencies_parsed_at":"2024-06-10T06:38:09.078Z","dependency_job_id":"cab0e97b-0596-4ab6-a9df-5a86930903f8","html_url":"https://github.com/iximiuz/wsmux","commit_stats":null,"previous_names":["iximiuz/wsmux"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iximiuz%2Fwsmux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iximiuz%2Fwsmux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iximiuz%2Fwsmux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iximiuz%2Fwsmux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iximiuz","download_url":"https://codeload.github.com/iximiuz/wsmux/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245210894,"owners_count":20578312,"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","port-forwarding","tunnel","websocket"],"created_at":"2024-09-07T02:02:44.774Z","updated_at":"2025-03-24T04:31:00.548Z","avatar_url":"https://github.com/iximiuz.png","language":"Go","funding_links":[],"categories":["websocket"],"sub_categories":[],"readme":"# wsmux - a simple WebSocket tunnel server\n\nStart an HTTP server that accepts incoming WebSocket connections and bidirectionally forwards data between the established connection and a TCP destination reachable from the server.\nDefine the destination address at runtime with an elegant protocol:\n\n```\nws://\u003cserver-addr\u003e/tunnels/${base64('\u003cremote-host\u003e:\u003cremote-port\u003e')}'\n```\n\nThe primary goal of this project is to provide a handy library.\nThe `wsmux` binary was added for demonstration purposes (but can potentially be used as a standalone tool as well).\n\nUsage:\n\n```sh\n# Server - listen for incoming WebSocket connections and tunnel ports\nwsmux serve [-addr [host]:\u003cport\u003e]\n\n# Client - forward local port to remote destination via wsmux server\nwsmux proxy -server \u003caddr\u003e -local-port \u003cport\u003e [-local-host \u003chost\u003e] -remote-port \u003cport\u003e [-remote-host \u003chost\u003e]\n```\n\nExample:\n\n```sh\n# On the server, prepare the targets (e.g., nginx \u0026 httpbin)\n$ docker run --rm -p 127.0.0.1:3000:80 nginx:alpine\n$ docker run --rm -p 127.0.0.1:5000:80 kennethreitz/httpbin\n\n# On the server again, start the wsmux server\n$ wsmux serve -addr 0.0.0.0:8080\nStarting wsmux server on 0.0.0.0:8080\n\n# On the client, start the wsmux clients to forward local ports to the targets\n$ wsmux proxy -server ws://0.0.0.0:8080 -local-port 3001 -remote-port 3000\nStarting wsmux client on localhost:3001 -\u003e localhost:3000 via ws://0.0.0.0:8080\n\n$ wsmux proxy -server ws://0.0.0.0:8080 -local-port 5001 -remote-port 5000\nStarting wsmux client on localhost:5001 -\u003e localhost:5000 via ws://0.0.0.0:8080\n\n# Now, you can access the nginx server on http://localhost:3001\n$ curl http://localhost:3001\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n\u003ctitle\u003eWelcome to nginx!\u003c/title\u003e\n...\n\n# ...and httpbin on http://localhost:5001\n$ curl localhost:5001\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003ctitle\u003ehttpbin.org\u003c/title\u003e\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiximiuz%2Fwsmux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiximiuz%2Fwsmux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiximiuz%2Fwsmux/lists"}