[][src]Crate ngrok

Ngrok

A minimal and concise ngrok wrapper for Rust. The main use case for the library is the ability to open public HTTP tunnels to your development server(s) for integrations tests. TCP support, while not available, should be trivial to support.

This has been tested with Linux and assume that it does not work on Windows (contributions welcome).

Usage

fn main() -> std::io::Result<()> {
    let tunnel = ngrok::builder()
          // server protocol
          .http()
          // the port
          .port(3030)
          .run()?;

    let public_url = tunnel.http()?;

    Ok(())
}

Structs

Builder

Build a ngrok Tunnel. Use ngrok::builder() to create this.

Tunnel

A running ngrok Tunnel.

Functions

builder

The entry point for starting a ngrok tunnel. Only HTTP is currently supported.