{"id":26610496,"url":"https://github.com/oxplot/tcp2ws","last_synced_at":"2025-03-24T01:48:29.488Z","repository":{"id":201145589,"uuid":"707010941","full_name":"oxplot/tcp2ws","owner":"oxplot","description":"Bridge TCP connections over Websocket","archived":false,"fork":false,"pushed_at":"2024-12-03T12:49:46.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T13:19:19.048Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxplot.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":"2023-10-19T03:36:50.000Z","updated_at":"2024-12-03T12:49:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"62ac1bbe-14c6-4300-8d1f-d913406c5183","html_url":"https://github.com/oxplot/tcp2ws","commit_stats":null,"previous_names":["oxplot/tcp2ws"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxplot%2Ftcp2ws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxplot%2Ftcp2ws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxplot%2Ftcp2ws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxplot%2Ftcp2ws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxplot","download_url":"https://codeload.github.com/oxplot/tcp2ws/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245195914,"owners_count":20575937,"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":[],"created_at":"2025-03-24T01:48:28.894Z","updated_at":"2025-03-24T01:48:29.447Z","avatar_url":"https://github.com/oxplot.png","language":"Go","readme":"# tcp2ws\n\n`tcp2ws` is a Go-based tool that provides bidirectional TCP to WebSocket\nprotocol conversion. It consists of two commands that allow you to:\n\n1. Forward TCP connections to a WebSocket server (`tcp2ws`)\n2. Forward WebSocket connections to a TCP server (`ws2tcp`)\n\nThis enables TCP-only clients to communicate with WebSocket servers and vice\nversa, making it useful for scenarios where protocol conversion is needed, such\nas connecting legacy TCP applications to modern WebSocket services.\n\n## Requirements\n\n- Go 1.21 or later\n\n## Installation\n\n```bash\ngo install github.com/oxplot/tcp2ws/cmd/tcp2ws@latest\ngo install github.com/oxplot/tcp2ws/cmd/ws2tcp@latest\n```\n\n## Usage\n\n### tcp2ws\n\n`tcp2ws` listens for TCP connections and forwards them to a WebSocket server.\n\n```bash\ntcp2ws [options] ws[s]://host:port/path\n\nOptions:\n  -listen string\n        TCP listen address:port (default \":7101\")\n```\n\nExample:\n\n```bash\n# Forward TCP connections from port 7101 to a WebSocket server\ntcp2ws -listen :7101 ws://example.com:8080/ws\n```\n\n### ws2tcp\n\n`ws2tcp` runs a WebSocket server that forwards connections to a TCP server.\n\n```bash\nws2tcp [options] tcp-host:port\n\nOptions:\n  -listen string\n        WebSocket listen address:port (default \":8080\")\n```\n\nExample:\n\n```bash\n# Accept WebSocket connections on port 8080 and forward them to a TCP server\nws2tcp -listen :8080 localhost:6379\n```\n\n## Features\n\n- Bidirectional data forwarding between TCP and WebSocket protocols\n- Support for both ws:// and wss:// (secure WebSocket) protocols\n- Configurable listen addresses and ports\n- Automatic connection cleanup and resource management\n- Error handling and logging\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxplot%2Ftcp2ws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxplot%2Ftcp2ws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxplot%2Ftcp2ws/lists"}