expose-rs 0.1.3

Just exposes your port to public
Documentation
  • Coverage
  • 0%
    0 out of 21 items documented0 out of 6 items with examples
  • Size
  • Source code size: 11.3 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.8 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • 69ch/expose-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • 0aware

Expose-rs

This is very simple library for Port Forwarding in Rust. I saw others' solutions, but they are kinda complicated and have tons of dependencies (that's not you'd like to see precisely in Rust).

Usage

The library is with standard functions (not async, futures, tokio, etc.). If you're using async functions, this is may not your choice here... but you always can spawn threads! Also, this library uses only WANIPConnection1 interface.

Everything in one example

let session = discover().unwrap();
forward_port(&session, "TCP", 6969, 6969, "test", 0).unwrap(); // forwards internal 6969 port to external 6969
remove_port(&session, "TCP", 6969).unwrap(); // closes external 6969 port
get_extenral_ip(&session).unwrap(); // do I need describe what that function does?