https://github.com/or13/ngrokable
https://github.com/or13/ngrokable
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/or13/ngrokable
- Owner: OR13
- Created: 2018-04-02T14:21:16.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-02T18:39:01.000Z (about 8 years ago)
- Last Synced: 2025-02-13T19:49:06.393Z (over 1 year ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ngrokable
🚧 DO NOT USE IN PRODUCTION 🚧
This example code is not endorsed by or involved with ngrok.
## Client and Server example usage of ngrok in node.
### Per-client Authtoken Credentials
For production systems, every client must authenticate with a unique authtoken credential. This allows you to deactivate devices that are old or compromised. Further, it allows you to enforce a separate ACL policy on every connected device that limits what tunnels it is allowed to bind.
Read more here - https://ngrok.com/docs/ngrok-link#credentials
### Create an API Token
* https://dashboard.ngrok.com/auth
### Authenticate with your API Token
* https://ngrok.com/docs/ngrok-link#service-api-base
### Generate a Per-client Authtoken
* https://ngrok.com/docs/ngrok-link#create-credential
### Using ngrok in node
* https://www.npmjs.com/package/ngrok
### Server
See `./src/server.js`.
An example (UNSAFE) express server which can generate per-client authtokens using your api token.
### Client
See `./src/client.js`
An example (UNSAFE) ngrok client which can use per-client authtokens to establish tunnels.