
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@xutl/forward
Advanced tools
This is a simple port forwarding tool meant to be used with local VMs.
npx @xutl/forward --host=<address> <source-port>:<target-port>
In this use case --host is optional and is meant to be a local address to listen on. source-port is the local port to listen on and target-port is the port on localhost to forward to.
If --host is not a local address, then this will instelad listen on localhost:<source-port> and forward to <host>:<target-port>.
If --host is missing it will listen on all local addresses except localhost.
<source-port>:<target-port> can be simplified to just <port> for the case where they are identical.
import PortForward from '@xutl/forward';
// type EndPoint = { address: string, port: number };
const forward = new PortForward(listen: EndPoint, target: EndPoint);
forward.on('listening', ()=>{});
forward.on('connection', (client: EndPoint)=>{});
forward.on('disconnection', (client: EndPoint)=>{});
forward.on('close', ()=>{});
forward.on('error', (error: Error)=>{});
FAQs
Port Forwarding
We found that @xutl/forward demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.