Crates.io | ngrok-wrapper |
lib.rs | ngrok-wrapper |
version | 0.5.6 |
source | src |
created_at | 2022-07-04 05:22:37.875301 |
updated_at | 2022-07-19 13:59:52.663601 |
description | A minimal ngrok wrapper |
homepage | |
repository | https://github.com/sanketkheni01/ngrok-rust-wrapper |
max_upload_size | |
id | 618762 |
size | 55,474 |
A minimal and concise ngrok
wrapper for Rust. The library has many use cases, for example:
TCP support, while not available, should be trivial to support.
Tested on windows ✅
[dependencies]
ngrok-wrapper = "0.5.0"
use ngrok_wrapper;
use url::Url;
fn main() -> std::io::Result<()> {
let tunnel = ngrok_wrapper::builder()
.http()
.port(8556)
.executable("./ngrokclinet.exe")
.run()?;
let public_url: &Url = tunnel.http()?;
println!("Tunnel is open at {:?}", public_url.as_str());
Ok(())
}
This assumes that ngrok
is on your path. To change this, use the .executable()
method in the builder when
creating your tunnel.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in ngrok
by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.