A simple HTTP/TCP tunnel in Rust that exposes local ports to a remote server, bypassing standard NAT connection firewalls.
cargo install --git https://github.com/unique1o1/uniqx.git curl --proto '=https' --tlsv1.2 -sSf https://yunik.com.np/installer.sh \
| sudo bash -s -- --repo unique1o1/uniqx --to /usr/local/binThis section describes detailed usage for the uniqx CLI command.
You can forward a port on your local machine by using the uniqx command. This takes a positional argument, the local port to forward, as well as a mandatory --remote-host option, which specifies the address of the remote server, and a --subdomain option.
uniqx client http --remote-host example.com --local-port 9000 --subdomain uniqueTo enable console UI
uniqx client http --remote-host example.com --local-port 9000 --subdomain unique --consoleuniqx client tcp --port 61589 --remote-host example.com --local-port 5432 --subdomain dbIn the case of TCP you can pass in a --port option to pick a specific port on the remote to expose, although the command will fail if this port is not available. Also, passing --local-host allows you to expose a different host on your local area network besides the loopback address localhost.
The full options are shown below using --help option.
uniqx client --helpYou have to deploy your own tunnel server for the client to work.
uniqx server --domain "example.com"That's all it takes! After the server starts running at a given address, you can then update the uniqx command with option --remote-host <ADDRESS> to forward a local port to this remote server.
The full options for the bore server command are shown below.
uniqx server --helpsudo uniqx updateThe uniqx tool has an implicit control port at 9876 that is used for creating new connections on demand. When the client initializes a connection, it sends a message to the server on the TCP control port, asking to proxy a selected protocol and remote port(for TCP). The server then responds with an acknowledgement and begins listening for external HTTP/TCP connections.