{"_id":"@calblueprint/ngrok","_rev":"4-68b3d85257c685ebede6c08979c1f850","name":"@calblueprint/ngrok","dist-tags":{"latest":"3.0.1"},"versions":{"3.0.1":{"name":"@calblueprint/ngrok","version":"3.0.1","description":"node wrapper for ngrok","main":"index.js","types":"ngrok.d.ts","scripts":{"test":"node ./node_modules/mocha/bin/_mocha --exit","postinstall":"node ./postinstall.js","postupdate":"node ./postinstall.js"},"repository":{"type":"git","url":"git://github.com/calblueprint/ngrok.git"},"keywords":["ngrok","localhost","tunneling","localtunnel","webhook"],"author":{"name":"calblueprint"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/calblueprint/ngrok/issues"},"devDependencies":{"chai":"~3.5.0","colors":"^1.1.2","homedir":"^0.6.0","mocha":"^5.0.1"},"dependencies":{"@types/node":"^8.0.19","cross-spawn":"^6.0.5","decompress-zip":"^0.3.0","request":"^2.83.0","request-promise-native":"^1.0.5","uuid":"^3.0.0"},"bin":{"ngrok":"./bin/ngrok"},"engines":{"node":">=8.3.0"},"gitHead":"79bd571a7135f08c8305e3497ef94c120dce3f51","homepage":"https://github.com/calblueprint/ngrok#readme","_id":"@calblueprint/ngrok@3.0.1","_npmVersion":"5.0.3","_nodeVersion":"8.1.0","_npmUser":{"name":"ethanlee16","email":"hello@ethanl.ee"},"dist":{"integrity":"sha512-gybBZCZa/GLLw88HMVYbUXMLVTAAGrDNk8ZI4W5Kr8NRmYGiQMyHF7IwW8jpWD8gBwdfQgq+L8jsE0P+qNisJQ==","shasum":"ea4cc42b4cf36d227a477842e5a2604458933440","tarball":"https://registry.npmjs.org/@calblueprint/ngrok/-/ngrok-3.0.1.tgz","fileCount":7,"unpackedSize":18873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbozNuCRA9TVsSAnZWagAAMYkP+QAe0qO1/Pv3G8fYZHGM\n+yfVwSaBpeP9SNjC/osA+ApR/2Ud20ZwzcHl6+1CwqCLj9HWVH2ALITNP578\nRpj9oOxoZYnRgjYPcgWPiKsdodfjnqh98bMmDQgfg88LmpOf3zFHT7SQ+ACe\nmIiECDQokAvw/P+ktPbPALvw741gUPZMJaTOvX3r4LloIF0fkhh3/7GDe2tU\n14cRrLLzmukcsC2VWI4rqNFIl4Kn0qfsxV4pr5AUv5Orpg2WUktLU9WNgBUG\n3G3iEbk4QO0wwu4BEO4UC3OkfsgtISi5s+d2mK2OPFdq+LRmKJOTRPbO3aLu\nrx7bHN+PvrTVCwIsvp4frFqy0/Z+Pd14XrarjofaeMM7gGE3HFGC+X34gcAO\npg5fm7I640WNk5tPWr827lpWK8UR90x3CvuslK1pcGBC9ETBzoq9bF9v6Lan\nLfkUlpcQtusGPBS+be5xHHiJBvs9DCuJsaVwjuZkKKfw56GVk3B5jyTFNtSH\n+tyJuNz0D91OdMM5GlFeExIkHoTY7Xgw5KC2fe7eRm8IH75iz5XmZOjJ7FDL\nYCWBT0wcIVgOkeq+UISlLQizq3gyeUt20PuR38DAWdYH/ZjXVwy12OqljWDm\nTF1CHpRLrxGI55V7oDk/yyFAPv9/vhFgakyHEB5MVsY/k0+f2BkT+d4kjOAJ\nGgK/\r\n=gs/8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeK+5mITh3Kk/qFTJIjNS6wzZq2Ulsie5kW1sDjlOl3gIhAMrc5l8H+RqPIwqOz0804vGVjY0UUbPlEjtuvQ9B/0ZD"}]},"maintainers":[{"name":"ethanlee16","email":"hello@ethanl.ee"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngrok_3.0.1_1537422189797_0.6141897970421459"},"_hasShrinkwrap":false}},"time":{"created":"2018-09-20T05:43:09.717Z","3.0.1":"2018-09-20T05:43:09.987Z","modified":"2023-02-13T23:00:03.977Z"},"maintainers":[{"email":"anniedwang02@gmail.com","name":"wangannie"},{"email":"hello@ethanl.ee","name":"ethanlee16"},{"email":"cfm@berkeley.edu","name":"francogments"},{"email":"team@calblueprint.org","name":"calblueprint-npm"}],"description":"node wrapper for ngrok","homepage":"https://github.com/calblueprint/ngrok#readme","keywords":["ngrok","localhost","tunneling","localtunnel","webhook"],"repository":{"type":"git","url":"git://github.com/calblueprint/ngrok.git"},"author":{"name":"calblueprint"},"bugs":{"url":"https://github.com/calblueprint/ngrok/issues"},"license":"BSD-2-Clause","readme":"ngrok [![Build Status](https://img.shields.io/travis/bubenshchykov/ngrok/master.svg)](https://travis-ci.org/bubenshchykov/ngrok) ![TypeScript compatible](https://img.shields.io/badge/typescript-compatible-brightgreen.svg) [![npm](https://img.shields.io/npm/v/ngrok.svg)](https://www.npmjs.com/package/ngrok) [![npm](https://img.shields.io/npm/dm/ngrok.svg)](https://www.npmjs.com/package/ngrok)\n=====\n\n![alt ngrok.com](https://ngrok.com/static/img/overview.png)\n\nusage\n===\n\n```javascript\nnpm install ngrok\nconst ngrok = require('ngrok');\n(async function() {\n  const url = await ngrok.connect();\n})();\n```\nor\n```bash\nnpm install ngrok -g\nngrok http 8080\n```\n\nThis module uses node>=8.3.0 with async-await. For callback-based version use [2.3.0](https://github.com/bubenshchykov/ngrok/blob/330674233e3ec77688bb692bf1eb007810c4e30d/README.md)\n\nFor global install on Linux, you might need to run ```sudo npm install --unsafe-perm -g ngrok``` due to the [nature](https://github.com/bubenshchykov/ngrok/issues/115#issuecomment-380927124) of npm postinstall script.\n\n## authtoken\nYou can create basic http-https-tcp tunnel without [authtoken](https://ngrok.com/docs#authtoken). For custom subdomains and more you should  obtain authtoken by signing up at [ngrok.com](https://ngrok.com). Once you set it, it's stored in ngrok config and used for all tunnels. Few ways:\n\n```javascript\nawait ngrok.authtoken(token);\nawait ngrok.connect({authtoken: token, ...});\n```\n\n## connect\n```javascript\nconst url = await ngrok.connect(); // https://757c1652.ngrok.io -> http://localhost:80\nconst url = await ngrok.connect(9090); // https://757c1652.ngrok.io -> http://localhost:9090\nconst url = await ngrok.connect({proto: 'tcp', addr: 22}); // tcp://0.tcp.ngrok.io:48590\nconst url = await ngrok.connect(opts);\n```\n\n## options\n```javascript\nconst url = await ngrok.connect({\n\tproto: 'http', // http|tcp|tls, defaults to http\n\taddr: 8080, // port or network address, defaultst to 80\n\tauth: 'user:pwd', // http basic authentication for tunnel\n\tsubdomain: 'alex', // reserved tunnel name https://alex.ngrok.io\n\tauthtoken: '12345', // your authtoken from ngrok.com\n\tregion: 'us', // one of ngrok regions (us, eu, au, ap), defaults to us\n\tconfigPath: '~/git/project/ngrok.yml' // custom path for ngrok config file\n\tbinPath: default => default.replace('/bin', '.unpacked/bin'); // custom binary path, eg for prod in electron\n});\n```\n\nOther options: `name, inspect, host_header, bind_tls, hostname, crt, key, client_cas, remote_addr` - read [here](https://ngrok.com/docs)\n\nNote on regions: region used in first tunnel will be used for all next tunnels too.\n\n## disconnect\nThe ngrok and all tunnels will be killed when node process is done. To stop the tunnels use\n```javascript\nawait ngrok.disconnect(url); // stops one\nawait ngrok.disconnect(); // stops all\nawait ngrok.kill(); // kills ngrok process\n```\n\nNote on http tunnels: by default bind_tls is true, so whenever you use http proto two tunnels are created - http and https. If you disconnect https tunnel, http tunnel remains open. You might want to close them both by passing http-version url, or simply by disconnecting all in one go ```ngrok.disconnect()```.\n\n## configs\nYou can use ngrok's [configurations files](https://ngrok.com/docs#config), and just pass `name` option when making a tunnel. Configuration files allow to store tunnel options. Ngrok looks for them here:\n```\nOS X\t/Users/example/.ngrok2/ngrok.yml\nLinux\t/home/example/.ngrok2/ngrok.yml\nWindows\tC:\\Users\\example\\.ngrok2\\ngrok.yml\n```\nYou can specify a custom `configPath` when making a tunnel.\n\n## inspector\nWhen tunnel is established you can use the ngrok interface http://127.0.0.1:4040 to inspect the webhooks done via ngrok.\nSame url hosts internal [client api](https://ngrok.com/docs#client-api). You can get it as wrapped request and manage tunnels yourself.\n```javascript\nconst url = await ngrok.connect();\nconst api = ngrok.getApi();\nconst tunnels = await api.get('api/tunnels');\n```\n\n## proxy\nIf you are behind a corporate proxy an have issues installing ngrok, you can set ```HTTP_PROXY``` or ```HTTPS_PROXY``` env var to fix it. Ngrok's posinstall uses request module to fetch the binary, [and request supports these env vars](https://github.com/request/request#controlling-proxy-behaviour-using-environment-variables)\n\n## how it works\n```npm install``` downloads ngrok binary for your platform from official ngrok hosting. To host binaries yourself set NGROK_CDN_URL env var before installing ngrok. To force specific platform set NGROK_ARCH, eg NGROK_ARCH=freebsdia32\n\nFirst time you create tunnel ngrok process is spawned and runs until you disconnect or when parent process killed. All further tunnels are created or stopped by using internal ngrok api which usually runs on http://127.0.0.1:4040\n\n## contributors\nPlease run ```git update-index --assume-unchanged bin/ngrok``` to not override [ngrok stub](https://github.com/bubenshchykov/ngrok/blob/master/bin/ngrok) in your pr. Unfortunately it can't be gitignored.\n\nTest suite covers basics usage without authtoken, as well as features available for free and paid authtokens. You can supply your own tokens into env vars, otherwise warning given and some specs are ignored (locally and in PR builds). Travis supplies real tokens to master branch and runs all specs always.\n","readmeFilename":"README.md"}