@ngrok/ngrok 0.5.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +41 -28
  2. package/CODE_OF_CONDUCT.md +45 -0
  3. package/Cargo.toml +8 -2
  4. package/README.md +161 -21
  5. package/docs/assets/highlight.css +13 -6
  6. package/docs/assets/search.js +1 -1
  7. package/docs/classes/NgrokHttpTunnelBuilder.html +59 -22
  8. package/docs/classes/NgrokLabeledTunnelBuilder.html +42 -5
  9. package/docs/classes/NgrokSession.html +24 -9
  10. package/docs/classes/NgrokSessionBuilder.html +20 -17
  11. package/docs/classes/NgrokTcpTunnelBuilder.html +46 -9
  12. package/docs/classes/NgrokTlsTunnelBuilder.html +48 -11
  13. package/docs/classes/NgrokTunnel.html +33 -35
  14. package/docs/classes/UpdateRequest.html +7 -4
  15. package/docs/functions/authtoken.html +5 -2
  16. package/docs/functions/connect.html +5 -2
  17. package/docs/functions/consoleLog.html +5 -2
  18. package/docs/functions/disconnect.html +5 -2
  19. package/docs/functions/getTunnel.html +88 -0
  20. package/docs/functions/getTunnelByUrl.html +88 -0
  21. package/docs/functions/kill.html +5 -2
  22. package/docs/functions/listen.html +5 -2
  23. package/docs/functions/listenable.html +5 -2
  24. package/docs/functions/loggingCallback.html +5 -2
  25. package/docs/functions/tunnels.html +83 -0
  26. package/docs/index.html +74 -13
  27. package/docs/interfaces/Config.html +57 -54
  28. package/docs/modules.html +7 -1
  29. package/examples/fastify/ngrok-fastify.js +1 -1
  30. package/examples/hapi/ngrok-hapi.js +1 -1
  31. package/examples/nestjs/src/main.ts +1 -1
  32. package/examples/nextjs/ngrok.config.js +1 -1
  33. package/examples/ngrok-connect-full.js +22 -23
  34. package/examples/ngrok-connect-minimal.js +3 -2
  35. package/examples/ngrok-http-full.js +1 -1
  36. package/examples/ngrok-http-minimum.js +1 -1
  37. package/examples/ngrok-labeled.js +1 -1
  38. package/examples/ngrok-tcp.js +1 -1
  39. package/examples/ngrok-tls.js +1 -1
  40. package/examples/ngrok-typescript.ts +1 -1
  41. package/examples/ngrok-windows-pipe.js +1 -1
  42. package/examples/remix/ngrok.config.js +1 -1
  43. package/examples/svelte/ngrok.config.cjs +1 -1
  44. package/examples/vue/ngrok.config.ts +1 -1
  45. package/index.d.ts +30 -6
  46. package/index.js +100 -22
  47. package/package.json +14 -14
  48. package/scripts/gc-node-drop.js +1 -1
  49. package/scripts/gc-rust-drop.js +1 -1
  50. package/src/connect.rs +17 -9
  51. package/src/http.rs +20 -22
  52. package/src/lib.rs +21 -0
  53. package/src/session.rs +61 -50
  54. package/src/tcp.rs +1 -1
  55. package/src/tls.rs +3 -5
  56. package/src/tunnel.rs +232 -110
  57. package/src/tunnel_builder.rs +34 -7
  58. package/trailer.js +96 -21
package/CHANGELOG.md CHANGED
@@ -1,75 +1,88 @@
1
+ ## 0.7.0:
2
+
3
+ - Add `listen_and_forward` and `listen_and_serve` to tunnel builders.
4
+ - Update to latest version of underlying rust library, allowing TLS backends.
5
+
6
+ ## 0.6.0:
7
+
8
+ - Flattened `tunnel.forwardPipe()` and `tunnel.forwardTcp()` into `tunnel.forward()`. Determination will be made based on `addr` input.
9
+ - Add `ngrok.tunnels()` and `session.tunnels()` to get a list of current non-closed tunnels for the process or session, respectively.
10
+ - Add `errorCode` field to thrown errors, where possible.
11
+ - More heuristics for automatic unix socket file placement.
12
+ - Connect heuristic improved for strings parseable as numbers.
13
+
1
14
  ## 0.5.2:
2
15
 
3
- * Cleanly return from a tunnel forward call after a `session.close()`
16
+ - Cleanly return from a tunnel forward call after a `session.close()`.
4
17
 
5
18
  ## 0.5.1:
6
19
 
7
- * `consoleLog` return signature
20
+ - `consoleLog` return signature.
8
21
 
9
22
  ## 0.5.0:
10
23
 
11
- * Add `NgrokSession.clientInfo()`
12
- * Rename to `ngrok-nodejs`
24
+ - Add `NgrokSession.clientInfo()`.
25
+ - Rename to `ngrok-nodejs`.
13
26
 
14
27
  ## 0.4.1:
15
28
 
16
- * Clean shutdown when run from npm
17
- * Unblock Svelte postinstall script
29
+ - Clean shutdown when run from npm.
30
+ - Unblock Svelte postinstall script.
18
31
 
19
32
  ## 0.4.0:
20
33
 
21
- * Move to a single tunnel type for simplicity
22
- * Documentation updates
34
+ - Move to a single tunnel type for simplicity.
35
+ - Documentation updates.
23
36
 
24
37
  ## 0.3.0:
25
38
 
26
- * Added `ngrok.connect(Config)`, `ngrok.authtoken()`, and `ngrok.disconnect(url)`
27
- * Examples cleanup
39
+ - Added `ngrok.connect(Config)`, `ngrok.authtoken()`, and `ngrok.disconnect(url)`.
40
+ - Examples cleanup.
28
41
 
29
42
  ## 0.2.0:
30
43
 
31
- * Now have examples for Express, Fastify, Hapi, Koa, Nest.js, Next.js, Remix, Svelte, and Vue.
32
- * Add `prettier` auto code formatting.
44
+ - Now have examples for Express, Fastify, Hapi, Koa, Nest.js, Next.js, Remix, Svelte, and Vue.
45
+ - Add `prettier` auto code formatting.
33
46
 
34
47
  ## 0.1.1:
35
48
 
36
- * Bump `ngrok-rust` to `0.11.3`.
37
- * Migrate `ca_cert` to the upstream call in `ngrok-rust`.
49
+ - Bump `ngrok-rust` to `0.11.3`.
50
+ - Migrate `ca_cert` to the upstream call in `ngrok-rust`.
38
51
 
39
52
  ## 0.1.0:
40
53
 
41
- * Added `ca_cert`, `handle_heartbeat`, and `handle_disconnection` to NgrokSession.
54
+ - Added `ca_cert`, `handle_heartbeat`, and `handle_disconnection` to NgrokSession.
42
55
 
43
56
  ## 0.0.12:
44
57
 
45
- * Added NgrokSession.close().
46
- * Cleanly shutdown when listen is called with a pre-configured tunnel.
58
+ - Added NgrokSession.close().
59
+ - Cleanly shutdown when listen is called with a pre-configured tunnel.
47
60
 
48
61
  ## 0.0.11:
49
62
 
50
- * Cleanly shutdown on all platforms when there are callbacks registered.
63
+ - Cleanly shutdown on all platforms when there are callbacks registered.
51
64
 
52
65
  ## 0.0.10:
53
66
 
54
- * Child client versioning support.
67
+ - Child client versioning support.
55
68
 
56
69
  ## 0.0.9:
57
70
 
58
- * Support for named pipes on Windows.
71
+ - Support for named pipes on Windows.
59
72
 
60
73
  ## 0.0.8:
61
74
 
62
- * Support callbacks for logging, include console.log and Winston handlers.
63
- * Can now pass tunnels directly to net.Server.listen().
64
- * Clean shutdown on SIGINT after ngrok.listen(server).
65
- * Typedoc generation of documentation.
75
+ - Support callbacks for logging, include console.log and Winston handlers.
76
+ - Can now pass tunnels directly to net.Server.listen().
77
+ - Clean shutdown on SIGINT after ngrok.listen(server).
78
+ - Typedoc generation of documentation.
66
79
 
67
80
  ## 0.0.7:
68
81
 
69
- * Improved memory management, removing need to keep NodeJS from garbage collecting certain objects.
70
- * Support callbacks for remote operations (stop, restart, update).
71
- * Typescript support for getSocket and listen.
82
+ - Improved memory management, removing need to keep NodeJS from garbage collecting certain objects.
83
+ - Support callbacks for remote operations (stop, restart, update).
84
+ - Typescript support for getSocket and listen.
72
85
 
73
86
  ## 0.0.6:
74
87
 
75
- * Initial public release
88
+ - Initial public release.
@@ -0,0 +1,45 @@
1
+ # ngrok Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ - Using welcoming and inclusive language
12
+ - Being respectful of differing viewpoints and experiences
13
+ - Gracefully accepting constructive criticism
14
+ - Focusing on what is best for the community
15
+ - Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ - The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ - Trolling, insulting/derogatory comments, and personal or political attacks
21
+ - Public or private harassment
22
+ - Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ - Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ The ngrok documentation team is responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ The ngrok documentation team has the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the ngrok docs project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [support@ngrok.com](mailto:support@ngrok.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
44
+
45
+ For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
package/Cargo.toml CHANGED
@@ -1,7 +1,7 @@
1
1
  [package]
2
2
  edition = "2021"
3
3
  name = "ngrok-nodejs"
4
- version = "0.5.2"
4
+ version = "0.7.0"
5
5
 
6
6
  [lib]
7
7
  crate-type = ["cdylib"]
@@ -10,16 +10,22 @@ crate-type = ["cdylib"]
10
10
  async-rustls = { version = "0.3.0" }
11
11
  async-trait = "0.1.59"
12
12
  bytes = "1.3.0"
13
+ futures = "0.3.26"
13
14
  lazy_static = "1.4.0"
15
+ # pin mio until all dependencies are also on windows-sys 0.48
16
+ # https://github.com/microsoft/windows-rs/issues/2410#issuecomment-1490802715
17
+ mio = { version = "=0.8.6" }
14
18
  # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
15
19
  napi = { version = "2.12.1", default-features = false, features = ["napi4", "tokio_rt"] }
16
20
  napi-derive = "2.12.1"
17
- ngrok = { version = "0.12.1" }
21
+ ngrok = { version = "0.14.0-pre.6" }
18
22
  parking_lot = "0.12.1"
23
+ regex = "1.9.5"
19
24
  rustls-pemfile = "1.0.1"
20
25
  tokio = { version = "1.23.0", features = ["sync"] }
21
26
  tracing = "0.1.37"
22
27
  tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
28
+ url = "2.4.0"
23
29
 
24
30
  [build-dependencies]
25
31
  napi-build = "2.0.1"
package/README.md CHANGED
@@ -24,47 +24,170 @@ This is the ngrok agent in library form, suitable for integrating directly into
24
24
  applications. This allows you to quickly build ngrok into your application with no separate process
25
25
  to manage.
26
26
 
27
- # Installation
27
+ # Documentation
28
+
29
+ A quickstart guide and a full API reference are included in the [ngrok-nodejs API documentation](https://ngrok.github.io/ngrok-nodejs/).
28
30
 
29
- The published library is available on
30
- [npm](https://www.npmjs.com/package/@ngrok/ngrok).
31
+ # Quickstart
32
+
33
+ 1. Install the `ngrok-nodejs` package from
34
+ [npm](https://www.npmjs.com/package/@ngrok/ngrok):
31
35
 
32
36
  ```shell
33
37
  npm install @ngrok/ngrok
34
38
  ```
35
39
 
36
- # Documentation
40
+ 2. After you've installed the package, you'll need an authtoken. Retrieve one on the
41
+ [authtoken page of your ngrok dashboard](https://dashboard.ngrok.com/get-started/your-authtoken)
37
42
 
38
- A quickstart guide and a full API reference are included in the [ngrok-nodejs API documentation](https://ngrok.github.io/ngrok-nodejs/).
43
+ 3. Add the following code block using the [connect method](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/ngrok-connect-minimal.js) to expose your nodejs application at port `8080` on `localhost`:
39
44
 
40
- # Quickstart
45
+ ```jsx
46
+ const ngrok = require("@ngrok/ngrok");
47
+ (async function() {
48
+ const url = await ngrok.connect({ addr: 8080, authtoken_from_env: true });
49
+ console.log(`Ingress established at: ${url}`);
50
+ })();
51
+ ```
52
+
53
+ You can find more examples in [the /examples directory](https://github.com/ngrok/ngrok-nodejs/tree/main/examples).
54
+
55
+ ## Authorization
41
56
 
42
- After you've installed the package, you'll need an Auth Token. Retrieve one on the
43
- [Auth Token page of your ngrok dashboard](https://dashboard.ngrok.com/get-started/your-authtoken)
57
+ To use most of ngrok's features, you'll need an authtoken. To obtain one, sign up for free at [ngrok.com](https://dashboard.ngrok.com/signup) and retrieve it from the [authtoken page of your ngrok dashboard](https://dashboard.ngrok.com/get-started/your-authtoken). Once you have copied your authtoken, you can reference it in several ways.
44
58
 
45
- There are multiple examples in [the /examples directory](https://github.com/ngrok/ngrok-nodejs/tree/main/examples).
46
- A minimal use-case looks like [the following](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/ngrok-http-minimum.js):
59
+ You can set it in the `NGROK_AUTHTOKEN` environment variable and pass `authtoken_from_env: true` to the [connect](https://ngrok.github.io/ngrok-nodejs/functions/connect.html) method:
47
60
 
48
61
  ```jsx
49
- var ngrok = require("@ngrok/ngrok");
62
+ await ngrok.connect({authtoken_from_env: true, ...});
63
+ ```
50
64
 
51
- async function create_tunnel() {
52
- const session = await new ngrok.NgrokSessionBuilder().authtokenFromEnv().connect();
53
- const tunnel = await session.httpEndpoint().listen();
54
- console.log("Ingress established at:", tunnel.url());
55
- tunnel.forwardTcp("localhost:8081");
56
- }
65
+ Or pass the authtoken directly to the [connect](https://ngrok.github.io/ngrok-nodejs/functions/connect.html) method:
66
+
67
+ ```jsx
68
+ await ngrok.connect({authtoken: token, ...});
69
+ ```
70
+
71
+ Or set it for all connections with the [authtoken](https://ngrok.github.io/ngrok-nodejs/functions/authtoken.html) method:
72
+
73
+ ```jsx
74
+ await ngrok.authtoken(token);
57
75
  ```
58
76
 
59
- or [with the 'connect' convenience function](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/ngrok-connect-minimal.js):
77
+ ## Connection
78
+
79
+ The [connect](https://ngrok.github.io/ngrok-nodejs/functions/connect.html) method is the easiest way to start an ngrok session and establish a tunnel to a specified address. The [connect](https://ngrok.github.io/ngrok-nodejs/functions/connect.html) method returns a promise that resolves to the public URL of the tunnel.
80
+
81
+ With no arguments the [connect](https://ngrok.github.io/ngrok-nodejs/functions/connect.html) method will start an HTTP tunnel to `localhost` port `80`:
60
82
 
61
83
  ```jsx
62
84
  const ngrok = require("@ngrok/ngrok");
63
- ngrok.connect({addr: 8080, authtoken_from_env: true}).then((url) => {
64
- console.log(`Ingress established at: ${url}`);
85
+ (async function() {
86
+ console.log( await ngrok.connect() );
87
+ })();
88
+ ```
89
+
90
+ You can pass the port number to forward on `localhost`:
91
+
92
+ ```jsx
93
+ const url = await ngrok.connect(4242);
94
+ ```
95
+
96
+ Or you can specify the host and port via a string:
97
+
98
+ ```jsx
99
+ const url = await ngrok.connect("localhost:4242");
100
+ ```
101
+
102
+ More options can be passed to the `connect` method to customize the connection:
103
+
104
+ ```jsx
105
+ const url = await ngrok.connect({addr: 8080, basic_auth: "ngrok:online1line"});
106
+ const url = await ngrok.connect({addr: 8080, oauth_provider: "google", oauth_allow_domains: "example.com"});
107
+ ```
108
+
109
+ The (optional) `proto` parameter is the tunnel type, which defaults to `http`. To create a TCP tunnel:
110
+
111
+ ```jsx
112
+ const url = await ngrok.connect({proto: 'tcp', addr: 25565});
113
+ ```
114
+
115
+ ## Disconnection
116
+
117
+ To close a tunnel use the [disconnect](https://ngrok.github.io/ngrok-nodejs/functions/disconnect.html) method with the `url` of the tunnel to close:
118
+
119
+ ```jsx
120
+ await ngrok.disconnect(url);
121
+ ```
122
+
123
+ Or omit the `url` to close all tunnels:
124
+
125
+ ```jsx
126
+ await ngrok.disconnect();
127
+ ```
128
+
129
+ The [close](https://ngrok.github.io/ngrok-nodejs/classes/NgrokTunnel.html#close) method on a tunnel will shut it down, and also stop the ngrok session if it is no longer needed. This method returns a promise that resolves when the tunnel is closed.
130
+
131
+ ```jsx
132
+ const tunnel = await ngrok.getTunnelByUrl(url);
133
+ await tunnel.close();
134
+ ```
135
+
136
+ ## Listing Tunnels
137
+
138
+ To list all current non-closed tunnels use the [tunnels](https://ngrok.github.io/ngrok-nodejs/functions/tunnels.html) method:
139
+
140
+ ```jsx
141
+ const tunnels = await ngrok.tunnels();
142
+ ```
143
+
144
+ # Full Configuration
145
+
146
+ This example shows [all the possible configuration items of ngrok.connect](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/ngrok-connect-full.js):
147
+
148
+ ```jsx
149
+ const url = await ngrok.connect({
150
+ // session configuration
151
+ addr: `localhost:8080`, // or `8080` or `unix:${UNIX_SOCKET}`
152
+ authtoken: "<authtoken>",
153
+ authtoken_from_env: true,
154
+ on_status_change: (addr, error) => {
155
+ console.log(`disconnected, addr ${addr} error: ${error}`);
156
+ },
157
+ session_metadata: "Online in One Line",
158
+ // tunnel configuration
159
+ basic_auth: ["ngrok:online1line"],
160
+ circuit_breaker: 0.1,
161
+ compression: true,
162
+ domain: "<domain>",
163
+ ip_restriction_allow_cidrs: ["0.0.0.0/0"],
164
+ ip_restriction_deny_cidrs: ["10.1.1.1/32"],
165
+ metadata: "example tunnel metadata from nodejs",
166
+ mutual_tls_cas: [fs.readFileSync('ca.crt', 'utf8')],
167
+ oauth_provider: "google",
168
+ oauth_allow_domains: ["<domain>"],
169
+ oauth_allow_emails: ["<email>"],
170
+ oauth_scopes: ["<scope>"],
171
+ oidc_issuer_url: "<url>",
172
+ oidc_client_id: "<id>",
173
+ oidc_client_secret: "<secret>",
174
+ oidc_allow_domains: ["<domain>"],
175
+ oidc_allow_emails: ["<email>"],
176
+ oidc_scopes: ["<scope>"],
177
+ proxy_proto: "", // One of: "", "1", "2"
178
+ request_header_remove: ["X-Req-Nope"],
179
+ response_header_remove: ["X-Res-Nope"],
180
+ request_header_add: ["X-Req-Yup:true"],
181
+ response_header_add: ["X-Res-Yup:true"],
182
+ schemes: ["HTTPS"],
183
+ verify_webhook_provider: "twilio",
184
+ verify_webhook_secret: "asdf",
185
+ websocket_tcp_converter: true,
65
186
  });
66
187
  ```
67
188
 
189
+ The [Config](https://ngrok.github.io/ngrok-nodejs/interfaces/Config.html) interface also shows all the available options.
190
+
68
191
  # Examples
69
192
 
70
193
  Degit can be used for cloning and running an example directory like this:
@@ -78,8 +201,8 @@ For example:
78
201
  npx degit github:ngrok/ngrok-nodejs/examples/express express && cd express && npm i
79
202
  ```
80
203
 
81
-
82
204
  ## Frameworks
205
+ * [AWS App Runner](https://aws.amazon.com/apprunner/) - See the [ngrok SDK Serverless Example](https://github.com/ngrok/ngrok-sdk-serverless-example) repository
83
206
  * [Express](https://expressjs.com/) - [Quickstart Example](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/express/ngrok-express-quickstart.js), [Configuration Example](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/express/ngrok-express.js)
84
207
  * [Fastify](https://www.fastify.io/) - [Example](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/fastify/ngrok-fastify.js)
85
208
  * [Hapi](https://hapi.dev/) - [Example](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/hapi/ngrok-hapi.js)
@@ -100,6 +223,23 @@ npx degit github:ngrok/ngrok-nodejs/examples/express express && cd express && np
100
223
  * TLS - [Example](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/ngrok-tls.js)
101
224
  * Windows Pipe - [Example](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/ngrok-windows-pipe.js)
102
225
 
226
+ # Builders
227
+
228
+ For more control over Sessions and Tunnels, the builder classes can be used.
229
+
230
+ A minimal example using the builder class looks like [the following](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/ngrok-http-minimum.js):
231
+
232
+ ```jsx
233
+ async function create_tunnel() {
234
+ const session = await new ngrok.NgrokSessionBuilder().authtokenFromEnv().connect();
235
+ const tunnel = await session.httpEndpoint().listen();
236
+ console.log("Ingress established at:", tunnel.url());
237
+ tunnel.forward("localhost:8081");
238
+ }
239
+ ```
240
+
241
+ See here for a [Full Configuration Example](https://github.com/ngrok/ngrok-nodejs/blob/main/examples/ngrok-http-full.js)
242
+
103
243
  # Async Programming
104
244
 
105
245
  All methods return a `Promise` and are suitable for use in asynchronous
@@ -5,16 +5,18 @@
5
5
  --dark-hl-1: #CE9178;
6
6
  --light-hl-2: #0000FF;
7
7
  --dark-hl-2: #569CD6;
8
- --light-hl-3: #001080;
9
- --dark-hl-3: #9CDCFE;
8
+ --light-hl-3: #0070C1;
9
+ --dark-hl-3: #4FC1FF;
10
10
  --light-hl-4: #795E26;
11
11
  --dark-hl-4: #DCDCAA;
12
- --light-hl-5: #0070C1;
13
- --dark-hl-5: #4FC1FF;
14
- --light-hl-6: #AF00DB;
15
- --dark-hl-6: #C586C0;
12
+ --light-hl-5: #AF00DB;
13
+ --dark-hl-5: #C586C0;
14
+ --light-hl-6: #001080;
15
+ --dark-hl-6: #9CDCFE;
16
16
  --light-hl-7: #098658;
17
17
  --dark-hl-7: #B5CEA8;
18
+ --light-hl-8: #008000;
19
+ --dark-hl-8: #6A9955;
18
20
  --light-code-background: #FFFFFF;
19
21
  --dark-code-background: #1E1E1E;
20
22
  }
@@ -28,6 +30,7 @@
28
30
  --hl-5: var(--light-hl-5);
29
31
  --hl-6: var(--light-hl-6);
30
32
  --hl-7: var(--light-hl-7);
33
+ --hl-8: var(--light-hl-8);
31
34
  --code-background: var(--light-code-background);
32
35
  } }
33
36
 
@@ -40,6 +43,7 @@
40
43
  --hl-5: var(--dark-hl-5);
41
44
  --hl-6: var(--dark-hl-6);
42
45
  --hl-7: var(--dark-hl-7);
46
+ --hl-8: var(--dark-hl-8);
43
47
  --code-background: var(--dark-code-background);
44
48
  } }
45
49
 
@@ -52,6 +56,7 @@
52
56
  --hl-5: var(--light-hl-5);
53
57
  --hl-6: var(--light-hl-6);
54
58
  --hl-7: var(--light-hl-7);
59
+ --hl-8: var(--light-hl-8);
55
60
  --code-background: var(--light-code-background);
56
61
  }
57
62
 
@@ -64,6 +69,7 @@
64
69
  --hl-5: var(--dark-hl-5);
65
70
  --hl-6: var(--dark-hl-6);
66
71
  --hl-7: var(--dark-hl-7);
72
+ --hl-8: var(--dark-hl-8);
67
73
  --code-background: var(--dark-code-background);
68
74
  }
69
75
 
@@ -75,4 +81,5 @@
75
81
  .hl-5 { color: var(--hl-5); }
76
82
  .hl-6 { color: var(--hl-6); }
77
83
  .hl-7 { color: var(--hl-7); }
84
+ .hl-8 { color: var(--hl-8); }
78
85
  pre, code { background: var(--code-background); }