Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
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.
@rexlabs/tunnel.now
Advanced tools
Readme
Zeit's now platform is fantastic for rapid iteration on Node.js projects. But sometimes - when debugging a webhook, for example - you might want to run your project on your development machine, somehow handling the requests from there.
Of course, you could make changes, deploy to now
, and update the alias as you go. However, this project provides an alternative for those times when you want a faster iteration cycle before deploying a final version to the cloud: it tunnels HTTP requests that are sent to now
to your local dev machine.
Step 1: Install
$ npm install -g tunnel.now
Step 2: Update npm links (optional)
This step is only necessary for users of nodenv.
$ nodenv rehash
Step 3: Deploy your tunnel endpoint
$ tunnel.deploy
_ _
| |_ _ _ _ _ _ _ ___ | | _ _ ___ __ __ __
| _| | || | | ' \ | ' \ / -_) | | _ | ' \ / _ \ \ V V /
\__| \_,_| |_||_| |_||_| \___| |_| (_) |_||_| \___/ \_/\_/
✔ Deployed tunnel.now instance on tunnelnow-xrjajpfyyl.now.sh
Tunnel Usage:
`tunnel.now tunnelnow-xrjajpfyyl.now.sh <local-port>`
You can also alias directly at this step, like so:
$ tunnel.deploy my-alias.now.sh
_ _
| |_ _ _ _ _ _ _ ___ | | _ _ ___ __ __ __
| _| | || | | ' \ | ' \ / -_) | | _ | ' \ / _ \ \ V V /
\__| \_,_| |_||_| |_||_| \___| |_| (_) |_||_| \___/ \_/\_/
✔ Deployed tunnel.now instance on tunnelnow-xrjajpfyyl.now.sh
✔ Pointing my-alias.now.sh to tunnelnow-xrjajpfyyl.now.sh
Tunnel Usage:
`tunnel.now my-alias.now.sh <local-port>`
As well as adding security through a token:
$ tunnel.deploy --token Tu0IH5IVwv5k
_ _
| |_ _ _ _ _ _ _ ___ | | _ _ ___ __ __ __
| _| | || | | ' \ | ' \ / -_) | | _ | ' \ / _ \ \ V V /
\__| \_,_| |_||_| |_||_| \___| |_| (_) |_||_| \___/ \_/\_/
✔ Deployed tunnel.now instance on tunnelnow-xrjajpfyyl.now.sh
✔ Pointing my-alias.now.sh to tunnelnow-xrjajpfyyl.now.sh
Tunnel Usage:
`tunnel.now tunnelnow-xrjajpfyyl.now.sh <local-port> --token Tu0IH5IVwv5k`
Note that this deployment can be re-used however many times you'd like.
Step 4: Start your application server
In your project, do whatever you need to do to start your server, and take note of the port that is opened:
$ npm run start
Listening on port 8080...
In this case, that's port 8080
.
Step 5: In a separate terminal, start your tunnel
tunnel.now
takes three arguments:
now
hostname. This will be either the hostname that now
provided to you, or the alias that you specified during step 3. That's my-alias.now.sh
in the example above.8080
in the example above.token
argument, which is only required if you specified one during step 3.$ tunnel.now my-alias.now.sh 8080 --token Tu0IH5IVwv5k
_ _
| |_ _ _ _ _ _ _ ___ | | _ _ ___ __ __ __
| _| | || | | ' \ | ' \ / -_) | | _ | ' \ / _ \ \ V V /
\__| \_,_| |_||_| |_||_| \___| |_| (_) |_||_| \___/ \_/\_/
✔ Connected to wss://my-alias.now.sh:443
ℹ Tunneling requests to http://localhost:8080
Step 6: Open your browser!
Any HTTP requests made to the now
hostname or alias will be tunneled to your local machine.
You can also open a tunnel connection through require('@rexlabs/tunnel.now')
.
const TunnelNow = require('@rexlabs/tunnel.now')
const tunnelSocket = TunnelNow({
remoteHostname: 'my-alias.now.sh',
localPort: '8080',
token: 'Tu0IH5IVwv5k'
})
tunnelSocket.addEventListener('open', () => {
console.log('Connected!')
})
Does this work with other services?
Yes. The only hard requirement is that the host provides HTTP and WebSocket support. However, you will need to deploy the tunnel.now
repo yourself.
This project is covered under the MIT License. Please see the LICENSE file for more information.
FAQs
Forward Zeit.now aliases to your localhost server.
The npm package @rexlabs/tunnel.now receives a total of 1 weekly downloads. As such, @rexlabs/tunnel.now popularity was classified as not popular.
We found that @rexlabs/tunnel.now demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 21 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
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.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.