Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
net-websocket-polyfill
Advanced tools
Readme
PRs and issues are greatly appreciated
This a browserify polyfill to emulate the net module.
Browserify generates polyfills when it can, but the net module can't be browserified, because browsers don't have access to sockets. This project is meant to emulate the net module by organizing all traffic through WebSockets, instead of Sockets. This module tries to keep the api as similar as possible, but refer to the source code if needed. This means you should be able to plug and play this module instead of the standard net module.
Load aliasify
as a transform. Set this module as an alias for the net
module. For example, you could do this in your package.json
"browserify": {
"transform": [
"aliasify"
]
},
Then configure the alias.
"aliasify": {
"aliases": {
"net": "net-websocket-polyfill"
}
},
You need a WebSocket/TCP proxy in order for this to work!. The browser doesn't have access to raw TCP sockets so we should transmit data over a websocket to our proxy. Our proxy will forward data to the specified target. This proxy will work. Then connect to the proxy instead of the target.
Green checkmarks indicate polyfills that this module has. Features are being added as fast as possible!
Class: net.Socket
FAQs
A websocket polyfill for the net module
The npm package net-websocket-polyfill receives a total of 284 weekly downloads. As such, net-websocket-polyfill popularity was classified as not popular.
We found that net-websocket-polyfill demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.