{"id":21296881,"url":"https://github.com/reddec/ws2connect","last_synced_at":"2025-03-15T17:27:21.587Z","repository":{"id":57553581,"uuid":"229883026","full_name":"reddec/ws2connect","owner":"reddec","description":"Tool and library to expose any TCP service over websocket","archived":false,"fork":false,"pushed_at":"2019-12-30T13:12:15.000Z","size":45,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T00:06:41.207Z","etag":null,"topics":["golang","proxy-server","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":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reddec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["http://reddec.net/about/#donate"]}},"created_at":"2019-12-24T06:19:09.000Z","updated_at":"2022-05-30T10:18:21.000Z","dependencies_parsed_at":"2022-08-28T09:31:41.025Z","dependency_job_id":null,"html_url":"https://github.com/reddec/ws2connect","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fws2connect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fws2connect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fws2connect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fws2connect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reddec","download_url":"https://codeload.github.com/reddec/ws2connect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243764880,"owners_count":20344498,"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":["golang","proxy-server","websocket"],"created_at":"2024-11-21T14:30:20.697Z","updated_at":"2025-03-15T17:27:21.550Z","avatar_url":"https://github.com/reddec.png","language":"Go","funding_links":["http://reddec.net/about/#donate"],"categories":[],"sub_categories":[],"readme":"# WS2Connect\n\n[![Documentation](https://img.shields.io/badge/documentation-latest-green)](https://reddec.github.io/ws2connect/)\n[![license](https://img.shields.io/github/license/reddec/ws2connect.svg)](https://github.com/reddec/ws2connect)\n[![](https://godoc.org/github.com/reddec/ws2connect?status.svg)](http://godoc.org/github.com/reddec/ws2connect)\n[![donate](https://img.shields.io/badge/help_by️-donate❤-ff69b4)](http://reddec.net/about/#donate)\n\n\nExpose any TCP service over websocket. \n\n* Single binary\n* Pre-built for all major OS (see [installation](#installation))\n* Few resource consumption\n* Blazing fast\n* Supports multiple endpoints with multiple mappings\n* Supports dynamic and static endpoint mappings\n* Supports TLS (HTTPS) serving\n* Optional Basic or Digest authorization with encrypted (bcrypt or sha) httpasswd file as a secured storage\n\n## Examples\n\n\n* Expose some FIX API (host: `example.com:9823`) over websocket on `http://127.0.0.1:8080/ws` path\n\n```bash\nws2connect /ws:example.com:9823\n```\n\n* Expose several services\n\n```bash\nws2connect /ws:example.com:9823 /another-ws:host:9912\n```\n\n* Change binding to `8888` port\n\n```bash\nws2connect -b 0.0.0.0:8888 /ws:example.com:9823\n```\n\n* Server over HTTPS (with `server.crt` and `server.key` files)\n\n```bash\nws2connect --tls /ws:example.com:9823\n```\n\n* Dynamic and static endpoint mapping together\n\n```bash\nws2connect --dynamic /dynamic/ /ws:example.com:9823 /another-ws:host:9912\n```\n\n* Basic authorization\n\n```bash\n# Create httpasswd file by standard utilities (for ubuntu: sudo apt install apache2-utils)\n# Initial file should be created with -c flag\nhtpasswd -c -B -b auth admin adminPassword\n# Add more users (without -c)\nhtpasswd -B -b auth guest guestPassword\n# Start ws2connect with basic authroization and other flags\nws2connect -k basic -p auth /ws:example.com:9823\n```\n\nwhere:\n\n  * `-c` -  creates new file for passwords\n  * `-B` - use bcrypt to hash password, so even if file will be stolen no one can recover passwords\n  * `-b` - read password from command line argument. Good for example but for safety remove the flag and use STDIN as source of password\n  * `auth` - file name for passwords\n\n## Usage\n\n    Usage:\n      ws2connect [OPTIONS] [endpoints]\n    \n    Application Options:\n      -b, --binding=                      HTTP binding address (default: :8080) [$BINDING]\n      -t, --timeout=                      Backend connection timeout (default: 15s) [$TIMEOUT]\n          --graceful-shutdown=            Delay before server shutdown (default: 15s) [$GRACEFUL_SHUTDOWN]\n          --tls                           Enable HTTPS serving with TLS [$TLS]\n          --cert-file=                    Path to certificate for TLS (default: server.crt) [$CERT_FILE]\n          --key-file=                     Path to private key for TLS (default: server.key) [$KEY_FILE]\n      -q, --quiet                         Disable logging [$QUIET]\n      -d, --dynamic=                      Dynamic endpoint mapping path [$DYNAMIC]\n    \n    Authorization:\n      -k, --auth.kind=[none|basic|digest] Authorization kind (default: none) [$AUTH_KIND]\n          --auth.realm=                   Name of authorization zone (default: Restricted zone) [$AUTH_REALM]\n      -p, --auth.htpasswd=                Path to htpasswd (bcrypt or sha) file for user authorization [$AUTH_HTPASSWD]\n    \n    Help Options:\n      -h, --help                          Show this help message\n    \n    Arguments:\n      endpoints:                          Endpoint mapping (/path:address)\n\n\n## Installation\n\n### Binary\n\n[![Download](https://api.bintray.com/packages/reddec/ws2connect-debian/ws2connect/images/download.svg)](https://bintray.com/reddec/ws2connect-debian/ws2connect/_latestVersion)\n\n* From [releases](https://github.com/reddec/ws2connect/releases) page\n* From bintray repository for most debian-based distribution (trusty, xenial, bionic, buster, wheezy):\n\n```bash\nsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61\necho \"deb https://dl.bintray.com/reddec/ws2connect-debian {distribution} main\" | sudo tee -a /etc/apt/sources.list\nsudo apt install ws2connect\n```\n\n### From source\n\n* Expected Go version at least 1.13 and upper\n* `go get -v github.com/reddec/ws2connect/cmd/...`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fws2connect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freddec%2Fws2connect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fws2connect/lists"}