{"id":38050278,"url":"https://github.com/playay/ws2s","last_synced_at":"2026-01-16T20:04:16.183Z","repository":{"id":56633483,"uuid":"121224526","full_name":"playay/ws2s","owner":"playay","description":"ws2s(websocket to socket)--bring socket to browser-side js.","archived":false,"fork":false,"pushed_at":"2020-10-27T21:36:32.000Z","size":95,"stargazers_count":62,"open_issues_count":5,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-19T01:27:55.144Z","etag":null,"topics":["redis-gui-client","socket","websocket","ws2s"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/playay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-12T09:10:49.000Z","updated_at":"2024-12-25T02:35:26.000Z","dependencies_parsed_at":"2022-08-15T22:20:23.522Z","dependency_job_id":null,"html_url":"https://github.com/playay/ws2s","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/playay/ws2s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playay%2Fws2s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playay%2Fws2s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playay%2Fws2s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playay%2Fws2s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/playay","download_url":"https://codeload.github.com/playay/ws2s/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playay%2Fws2s/sbom","scorecard":{"id":737407,"data":{"date":"2025-08-11","repo":{"name":"github.com/playay/ws2s","commit":"b5bb3e02cad179f9c2c6f20e414c7e1360937287"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3ww4-gg4f-jr7f","Warn: Project is vulnerable to: GHSA-5cpq-8wj7-hf2v","Warn: Project is vulnerable to: GHSA-9v9h-cgj8-h64p","Warn: Project is vulnerable to: PYSEC-2018-52 / GHSA-fcf9-3qw3-gxmj","Warn: Project is vulnerable to: PYSEC-2021-62 / GHSA-hggm-jpg3-v476","Warn: Project is vulnerable to: GHSA-jm77-qphf-c4w8","Warn: Project is vulnerable to: GHSA-w7pp-m8wf-vj6r","Warn: Project is vulnerable to: GHSA-x4qr-2fvf-3mr5","Warn: Project is vulnerable to: PYSEC-2023-177 / GHSA-x7m3-jprg-wc5g","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-f2j6-wrhh-v25m","Warn: Project is vulnerable to: PYSEC-2022-166"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T16:17:32.933Z","repository_id":56633483,"created_at":"2025-08-22T16:17:32.933Z","updated_at":"2025-08-22T16:17:32.933Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["redis-gui-client","socket","websocket","ws2s"],"created_at":"2026-01-16T20:04:16.079Z","updated_at":"2026-01-16T20:04:16.159Z","avatar_url":"https://github.com/playay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"also see: https://gitee.com/apihub/ws2s\n\n\n\n## ws2s--bring socket to browser-side js\nws2s(websocket to socket) is a websocket server that handle socket(tcp)s.   \n\n![](https://playay.github.io/pages/images/ws2s.png)    \n\nthe simplest workflow might be like this:    \n\n1. a websocket client(we called **`\"ws\"`**) ask ws2s_server to create a socket(we called **`\"s\"`**) for it.    \n2. **`\"ws\"`** ask ws2s_server to use **`\"s\"`** to send data.    \n3. when **`\"s\"`** received data, ws2s_server will notify **`\"ws\"`** with the received data.    \n\nwith this workflow, javaScript running on a browser got the ability to use socket.    \n\n\n## client case\n+ a ws2s server at `wss://ws2s.feling.net/` is ready for test case.     \n+ an online redis gui client powered by ws2s is provided at [https://feling.net/redis/](https://feling.net/redis/).    \n\n### use origin javaScript\n```javaScript\nvar ws = new WebSocket(\"wss://ws2s.feling.net/\")\nws.onmessage = (event) =\u003e {\n    console.log(\"onmessage: \", event.data)\n}\nws.onopen = () =\u003e {\n    console.log(\"onopen\")\n    ws.send(JSON.stringify(\n        {\n            command: \"connect\",\n            host: \"feling.net\",\n            port: 80\n        }\n    ))\n    ws.send(JSON.stringify(\n        {\n            command: \"send\",\n            data: \"GET / HTTP/1.1\\r\\nHost: feling.net\\r\\nConnection: close\\r\\n\\r\\n\"\n        }\n    ))\n}\nws.onclose = () =\u003e {\n    console.log(\"onclose\")\n}\n```\n\n### use [ws2s.js](ws2s-js/)\n```javaScript\nvar socket = new WS2S(\"wss://ws2s.feling.net/\").newSocket()\n\n$('#connect-button').bind(\"click\", () =\u003e {\n    socket.connect(\"feling.net\", 80)\n})\n\n$('#send-button').bind(\"click\",  () =\u003e {\n    socket.send(\"GET / HTTP/1.1\\r\\nHost: feling.net\\r\\nConnection: close\\r\\n\\r\\n\")\n})\n\nsocket.onRecv = (data) =\u003e {\n    console.log('onRecv', data)\n}\n```\n\n\n## install\nws2s works with py2、py3 on Linux、OSX. Windows users please try Windows Subsystem for Linux（WSL).    \n\nIt is recommended to install from github:    \n```shell\npip install git+https://github.com/playay/ws2s --upgrade\n```\n\nyou can also install ws2s from pypi:    \n```shell\npip install ws2s-python --upgrade\n```\n\nafter installed ws2s:     \n`ws2sd` command can be used in shell,     \n`~/.ws2s/` directory will be created when you exec `ws2sd`      \n\n\n## config\nconfig file is store at `~/.ws2s/config.json`. modify it then exec `ws2sd restart`    \n\n## start on boot\nat see [this wiki](https://github.com/playay/ws2s/wiki/start-on-boot)\n\n## protocol\n### request\nhere are some examples of requests:     \n```json\n{\n    \"command\": \"connect\",\n    \"host\":\"127.0.0.1\",\n    \"port\":80\n}\n{\n    \"command\": \"send\",\n    \"data\":\"GET / HTTP/1.1\\r\\nHost: 127.0.0.1\\r\\nConnection: close\\r\\n\\r\\n\"\n}\n```\nyou can find out that:    \n\n1. message(we called request) send to ws2s_sever is a json format string.    \n2. a `command` field is required. other fields are dependent on different `command`s    \n3. [this wiki](https://github.com/playay/ws2s/wiki/command) describes details of each command.    \n\n### response\nmessage(we called response) received from ws2s_sever, is a json format string too:      \n```json\n{\n    \"success\": true,\n    \"code\": -1,\n    \"message\": \"recv data\",\n    \"data\": \"JDINCk9LDQo=\"\n}\n```\n```\nAs the example above:    \n- \"message\" field is for human.   \n- \"success\" field can be ignored.     \n\nwhen \"code\" field = -1, \"data\" field is presented.     \n    that means ws2s_server received data from peer. \"data\" is a base64 string representing a byte array.     \n\nwhen \"code\" field = 0.      \n    usually means ws2s_server successfully completed the most recent command    \n\nwhen \"code\" field \u003e 0.      \n    means something is not normal:      \n    when \"code\" = 1:    \n        unknown exception, you can submit an issue to ws2s    \n\n    when \"code\" = 2:    \n        ConnectionRefusedError raisesd when ws2s_server try to   \n        connect host:port you specified    \n\n    when \"code\" = 3:    \n        IllegalSocketState, just reSend an \"connect\" request like:    \n        {\"command\":\"connect\",\"host\":\"127.0.0.1\",\"port\":80}    \n\n    when \"code\" = 4:    \n        usually means you want ws2s_server to connect 127.0.0.1, but ws2s_server refused     \n        to do that. this feature is configurable in `~/.ws2s/config.json`    \n    \n    when \"code\" = 5:    \n        socket connection closed by socket server you connected to    \n\n    when \"code\" = 6:    \n        failed to open ssh tunnel    \n\n```\n\n\n### dev\n\n```\npipenv shell\n\n\n\n\n\npython setup.py bdist_wheel\npython setup.py sdist\ntwine upload  dist/*\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayay%2Fws2s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplayay%2Fws2s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayay%2Fws2s/lists"}