@ngrok/ngrok 0.0.9 → 0.0.10
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.
- package/Cargo.toml +2 -2
- package/RELEASE.md +13 -0
- package/examples/ngrok-http-full.js +2 -2
- package/examples/ngrok-tcp.js +1 -1
- package/examples/ngrok-tls.js +1 -2
- package/package.json +15 -15
- package/src/session.rs +6 -1
package/Cargo.toml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
edition = "2021"
|
|
3
3
|
name = "ngrok-js"
|
|
4
|
-
version = "0.0.
|
|
4
|
+
version = "0.0.10"
|
|
5
5
|
|
|
6
6
|
[lib]
|
|
7
7
|
crate-type = ["cdylib"]
|
|
@@ -13,7 +13,7 @@ lazy_static = "1.4.0"
|
|
|
13
13
|
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
|
|
14
14
|
napi = { version = "2.10.6", default-features = false, features = ["napi4", "tokio_rt"] }
|
|
15
15
|
napi-derive = "2.9.3"
|
|
16
|
-
ngrok = { version = "=0.10.
|
|
16
|
+
ngrok = { version = "=0.10.2" }
|
|
17
17
|
parking_lot = "0.12.1"
|
|
18
18
|
tokio = { version = "1.23.0", features = ["sync"] }
|
|
19
19
|
tracing = "0.1.37"
|
package/RELEASE.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Release Instructions
|
|
2
|
+
--------------------
|
|
3
|
+
1. `git checkout main; git pull origin main`
|
|
4
|
+
1. `git checkout -b <username>/<version>`
|
|
5
|
+
1. Bump patch number in `version` in `Cargo.toml`
|
|
6
|
+
1. `npm version patch --no-commit-hooks --no-git-tag-version`
|
|
7
|
+
1. Verify version numbers all match in `git diff --cached`
|
|
8
|
+
1. `git commit -m '<version>'`
|
|
9
|
+
1. `git push origin <username>/<version>`
|
|
10
|
+
1. Create a pull request off this branch
|
|
11
|
+
- Make sure the name of the pull request is also just the `<version>` so the workflow will know to do a release
|
|
12
|
+
1. Merge the pull request
|
|
13
|
+
1. Verify release appears on [NPM](https://www.npmjs.com/package/@ngrok/ngrok?activeTab=versions)
|
|
@@ -40,10 +40,10 @@ builder.connect().then((session) => {
|
|
|
40
40
|
// .compression()
|
|
41
41
|
// .denyCidr("10.1.1.1/32")
|
|
42
42
|
// .domain("<somedomain>.ngrok.io")
|
|
43
|
-
// .mutualTlsca(fs.readFileSync('
|
|
43
|
+
// .mutualTlsca(fs.readFileSync('ca.crt'))
|
|
44
44
|
// .oauth("google", ["<user>@<domain>"], ["<domain>"], ["<scope>"])
|
|
45
45
|
// .oidc("<url>", "<id>", "<secret>", ["<user>@<domain>"], ["<domain>"], ["<scope>"])
|
|
46
|
-
// .proxyProto("") // One of: "", "
|
|
46
|
+
// .proxyProto("") // One of: "", "1", "2"
|
|
47
47
|
// .removeRequestHeader("X-Req-Nope")
|
|
48
48
|
// .removeResponseHeader("X-Res-Nope")
|
|
49
49
|
// .requestHeader("X-Req-Yup", "true")
|
package/examples/ngrok-tcp.js
CHANGED
|
@@ -24,7 +24,7 @@ builder.connect().then((session) => {
|
|
|
24
24
|
// .allowCidr("0.0.0.0/0")
|
|
25
25
|
// .denyCidr("10.1.1.1/32")
|
|
26
26
|
// .forwardsTo("example nodejs")
|
|
27
|
-
// .proxyProto("") // One of: "", "
|
|
27
|
+
// .proxyProto("") // One of: "", "1", "2"
|
|
28
28
|
// .remoteAddr("<n>.tcp.ngrok.io:<p>")
|
|
29
29
|
.metadata("example tunnel metadata from nodejs")
|
|
30
30
|
.listen().then((tunnel) => {
|
package/examples/ngrok-tls.js
CHANGED
|
@@ -26,8 +26,7 @@ builder.connect().then((session) => {
|
|
|
26
26
|
// .domain("<somedomain>.ngrok.io")
|
|
27
27
|
// .forwardsTo("example nodejs")
|
|
28
28
|
// .mutualTlsca(fs.readFileSync('ca.crt'))
|
|
29
|
-
// .proxyProto("") // One of: "", "
|
|
30
|
-
// .remoteAddr("<n>.tcp.ngrok.io:<p>")
|
|
29
|
+
// .proxyProto("") // One of: "", "1", "2"
|
|
31
30
|
.termination(fs.readFileSync('domain.crt'),
|
|
32
31
|
fs.readFileSync('domain.key'))
|
|
33
32
|
.metadata("example tunnel metadata from nodejs")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrok/ngrok",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"napi": {
|
|
@@ -54,19 +54,19 @@
|
|
|
54
54
|
"description": "The ngrok agent in library form, suitable for integrating directly into your NodeJS application.",
|
|
55
55
|
"repository": "https://github.com/ngrok/ngrok-js",
|
|
56
56
|
"optionalDependencies": {
|
|
57
|
-
"@ngrok/ngrok-win32-x64-msvc": "0.0.
|
|
58
|
-
"@ngrok/ngrok-darwin-x64": "0.0.
|
|
59
|
-
"@ngrok/ngrok-linux-x64-gnu": "0.0.
|
|
60
|
-
"@ngrok/ngrok-darwin-arm64": "0.0.
|
|
61
|
-
"@ngrok/ngrok-android-arm64": "0.0.
|
|
62
|
-
"@ngrok/ngrok-linux-arm64-gnu": "0.0.
|
|
63
|
-
"@ngrok/ngrok-linux-arm64-musl": "0.0.
|
|
64
|
-
"@ngrok/ngrok-win32-arm64-msvc": "0.0.
|
|
65
|
-
"@ngrok/ngrok-linux-arm-gnueabihf": "0.0.
|
|
66
|
-
"@ngrok/ngrok-linux-x64-musl": "0.0.
|
|
67
|
-
"@ngrok/ngrok-freebsd-x64": "0.0.
|
|
68
|
-
"@ngrok/ngrok-win32-ia32-msvc": "0.0.
|
|
69
|
-
"@ngrok/ngrok-android-arm-eabi": "0.0.
|
|
70
|
-
"@ngrok/ngrok-darwin-universal": "0.0.
|
|
57
|
+
"@ngrok/ngrok-win32-x64-msvc": "0.0.10",
|
|
58
|
+
"@ngrok/ngrok-darwin-x64": "0.0.10",
|
|
59
|
+
"@ngrok/ngrok-linux-x64-gnu": "0.0.10",
|
|
60
|
+
"@ngrok/ngrok-darwin-arm64": "0.0.10",
|
|
61
|
+
"@ngrok/ngrok-android-arm64": "0.0.10",
|
|
62
|
+
"@ngrok/ngrok-linux-arm64-gnu": "0.0.10",
|
|
63
|
+
"@ngrok/ngrok-linux-arm64-musl": "0.0.10",
|
|
64
|
+
"@ngrok/ngrok-win32-arm64-msvc": "0.0.10",
|
|
65
|
+
"@ngrok/ngrok-linux-arm-gnueabihf": "0.0.10",
|
|
66
|
+
"@ngrok/ngrok-linux-x64-musl": "0.0.10",
|
|
67
|
+
"@ngrok/ngrok-freebsd-x64": "0.0.10",
|
|
68
|
+
"@ngrok/ngrok-win32-ia32-msvc": "0.0.10",
|
|
69
|
+
"@ngrok/ngrok-android-arm-eabi": "0.0.10",
|
|
70
|
+
"@ngrok/ngrok-darwin-universal": "0.0.10"
|
|
71
71
|
}
|
|
72
72
|
}
|
package/src/session.rs
CHANGED
|
@@ -38,6 +38,9 @@ use crate::{
|
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
const CLIENT_TYPE: &str = "library/official/nodejs";
|
|
42
|
+
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
|
43
|
+
|
|
41
44
|
/// The builder for an ngrok session.
|
|
42
45
|
#[napi]
|
|
43
46
|
#[allow(dead_code)]
|
|
@@ -53,7 +56,9 @@ impl NgrokSessionBuilder {
|
|
|
53
56
|
#[napi(constructor)]
|
|
54
57
|
pub fn new() -> Self {
|
|
55
58
|
NgrokSessionBuilder {
|
|
56
|
-
raw_builder: Arc::new(SyncMutex::new(
|
|
59
|
+
raw_builder: Arc::new(SyncMutex::new(
|
|
60
|
+
Session::builder().child_client(CLIENT_TYPE, VERSION),
|
|
61
|
+
)),
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
64
|
|