ngrok-wrapper 0.5.6

A minimal ngrok wrapper
docs.rs failed to build ngrok-wrapper-0.5.6
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: ngrok-wrapper-0.5.4

ngrok   Build Crate Docs

A minimal and concise ngrok wrapper for Rust. The library has many use cases, for example:

  • open public HTTP tunnels to your development server(s) for integrations tests
  • simplified networking and development on devices like a Raspberry Pi

TCP support, while not available, should be trivial to support.

Tested on windows ✅

Getting Started

[dependencies]
ngrok-wrapper = "0.5.0"

Usage

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.

License

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.