Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased

- Support manually specifying bindings

## 1.6.0

- Updated the internal ngrok SDK
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tracing = "0.1.37"
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
url = "2.4.0"
aws-lc-rs = "=1.13.0"
aws-lc-sys = "=0.28.0"
aws-lc-sys = "=0.28.2"

[build-dependencies]
napi-build = "2.0.1"
Expand Down
24 changes: 24 additions & 0 deletions index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"scripts": {
"artifacts": "napi artifacts",
"build": "napi build --platform --release --js gen.js --dts gen.d.ts --pipe 'node post-build.js trailer index'",
"build": "AWS_LC_SYS_CC_aarch64_unknown_linux_musl=aarch64-linux-musl-gcc AWS_LC_SYS_CXX_aarch64_unknown_linux_musl=aarch64-linux-musl-g++ napi build --platform --release --js gen.js --dts gen.d.ts --pipe 'node post-build.js trailer index'",
"build:debug": "napi build --platform",
"clean": "rm -rf node_modules/ target/",
"docs": "mv trailer.d.ts trailer.d.hidden; mv examples .examples; npx typedoc index.d.ts --navigation.includeGroups; mv .examples examples; mv trailer.d.hidden trailer.d.ts",
Expand Down
4 changes: 4 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,4 +325,8 @@ pub struct Config {
/// Convert incoming websocket connections to TCP-like streams.
#[napi(js_name = "websocket_tcp_converter")]
pub websocket_tcp_converter: Option<bool>,
/// Sets the ingress configuration for this endpoint.
/// Valid values: "public", "internal", "kubernetes"
/// If not specified, the ngrok service will use its default binding configuration.
pub binding: Option<String>,
}
1 change: 1 addition & 0 deletions src/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ macro_rules! config_common {
plumb!($builder, $config, traffic_policy);
// policy is in the process of being deprecated. for now, we just remap it to traffic_policy
plumb!($builder, $config, traffic_policy, policy);
plumb!($builder, $config, binding);
};
}

Expand Down
9 changes: 9 additions & 0 deletions src/listener_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,15 @@ macro_rules! make_listener_builder {
builder.traffic_policy(traffic_policy);
self
}
/// Sets the ingress configuration for this endpoint.
/// Valid values: "public", "internal", "kubernetes"
/// If not specified, the ngrok service will use its default binding configuration.
#[napi]
pub fn binding(&mut self, binding: String) -> &Self {
let mut builder = self.listener_builder.lock();
builder.binding(binding);
self
}
}
};

Expand Down