{"id":49737,"library":"websocket-to-tcp","title":"WebSocket-to-TCP","description":"CLI tool that creates a server to accept WebSocket connections and forward them to a TCP socket. Version 0.5.2, with infrequent releases. Supports single or multiple tunnels (via wstcpm), optional sub-protocol naming, string mode for non-binary WebSocket servers, and SSL/TLS. Designed for emulated retro computing (e.g., Commodore 64 BBS) but usable for generic TCP-over-WebSocket proxying. Minimal dependencies; pure Node.js.","status":"active","version":"0.5.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","websocket","tcp","tunnel"],"install":[{"cmd":"npm install websocket-to-tcp","lang":"bash","label":"npm"},{"cmd":"yarn add websocket-to-tcp","lang":"bash","label":"yarn"},{"cmd":"pnpm add websocket-to-tcp","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"WebSocket server implementation","package":"ws","optional":false},{"reason":"Command-line argument parsing","package":"yargs","optional":false}],"imports":[{"note":"Package exposes no programmatic API; only CLI via global install.","wrong":"Using require('websocket-to-tcp') as a library (it is CLI-only)","symbol":"cli (wstcp)","correct":"npm i -g websocket-to-tcp && wstcp -t host -p port -w wsport"}],"quickstart":{"code":"npm install -g websocket-to-tcp\nwstcp -t bbs.sblendorio.eu -p 6510 -w 8080 -n bbs\n# Then connect via WebSocket to ws://localhost:8080 with sub-protocol 'bbs'","lang":"javascript","description":"Installs the tool globally and creates a tunnel from WebSocket port 8080 to bbs.sblendorio.eu:6510 with sub-protocol 'bbs'."},"warnings":[{"fix":"Use `wstcp` for single tunnel, `wstcpm` for multi-tunnel config.","message":"The CLI name is `wstcp` (singular) and `wstcpm` (multiple tunnels), not `websocket-to-tcp`.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Ensure client WebSocket uses the same protocol name as the `-n` argument.","message":"The sub-protocol name must match exactly on the client side; otherwise connection fails silently.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Consider alternatives like `websocat` or custom Node.js proxy for more features.","message":"No version information available, but package has not been updated since initial release; may lack modern WebSocket features.","severity":"deprecated","affected_versions":"0.5.2"}],"env_vars":null,"search_vec":"'0.5.2':23 '64':56 'accept':12 'bbs':57 'binari':44 'cli':5 'commodor':55 'comput':53 'connect':14 'creat':8 'depend':68 'design':49 'e.g':54 'emul':51 'forward':16 'generic':61 'infrequ':25 'javascript':71 'minim':67 'mode':40 'multipl':30 'name':38 'node.js':70 'non':43 'non-binari':42 'option':34 'protocol':37 'proxi':66 'pure':69 'releas':26 'retro':52 'server':10,46 'singl':28 'socket':21 'ssl/tls':48 'string':39 'sub':36 'sub-protocol':35 'support':27 'tcp':4,20,63,73 'tcp-over-websocket':62 'tool':6 'tunnel':31,74 'usabl':59 'version':22 'via':32 'websocket':2,13,45,65,72 'websocket-to-tcp':1 'wstcpm':33","created_at":"2026-06-07T17:03:20.957628+00:00","updated_at":"2026-06-07T17:03:20.957628+00:00","problems":[{"fix":"Choose a different port with `-w <newport>` or kill the process using that port.","cause":"The specified WebSocket port is already in use by another process.","error":"Error: listen EADDRINUSE :::<port>"},{"fix":"Verify TCP server is running and accessible from your machine.","cause":"TCP destination refused connection (host down, wrong port, firewall).","error":"Error: connect ECONNREFUSED <host>:<port>"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"websocket-to-tcp","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}