package usbmux

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Provides functions to create and manipulate tunneled relays

type action =
  1. | Shutdown
  2. | Reload

Actions that can be performed on running relays

type exn +=
  1. | Mapping_file_error of string

Exception raised when the mapping file is incorrectly made, probably a JSON error

val make_tunnels : ?ignore_unix_exn:bool -> ?log_opts:Logging.log_opts -> ?stats_server:int -> ?tunnel_timeout:int -> device_map:Lwt_io.file_name -> unit Lwt.t

Create tunnels requested in a mapping file provided.

make_tunnels ~stats_server:true tunnel_timeout:3000 ~device_map:"some/path/mapping"

creates the tunnels requested for in the device_map and creates a HTTP status server that is accessible at localport 5000.

val perform : action -> unit

Perform an action on running tunnels.

val status : port:int -> Yojson.Basic.json Lwt.t

Get JSON that describes the currently ready tunnels.

OCaml

Innovation. Community. Security.