Auto-Tunnel is a simple tool that allows you to tunnel all registered ports (>=1024) from remote machine to your local machine without exposing all of them to the internet. It's useful for developers who works in a remote machine that need access to the services that they run for development and testing purposes.
Example of tunneling service ports from linux remote to
windows local machine
- Dynamically tunnel ports from remote to local machine without any configuration
- Support multiple remote machine
- Support authentication
- Set a static list of port to advertise by server
- Set a static list of port to tunnel by client
Auto-Tunnel is not distributed in any package manager yet, so you need to build it from source. You will need to have Rust installed in your machine to build this project. Please refer to Rust installation guide to install Rust in your machine.
For windows build, you will need to install mingw-w64-gcc and x86_64-pc-windows-gnu target for
Rust.
To build the project, you can run the following command:
git clone https://github.com/aguss787/auto-tunnel.git
cd auto-tunnel
# Build linux client and server
make linux
# Build windows client only
make windows-client
# Build all
make allOnce the build process is finished, you can find the binary in target/release directory.
mv target/release/server /usr/local/bin/auto-tunnel-server
mv target/release/client /usr/local/bin/auto-tunnel-client
mv target/x86_64-pc-windows-gnu/release/client.exe /usr/local/bin/auto-tunnel-client.exeTo run the server in CLI, you can run the following command:
auto-tunnel-serverYou can use --help to see more options.
You can use the following service file template to run the server as a systemd service.
[Unit]
Description=Auto-Tunnel server
After=network-online.target
Wants=network-online.target
[Service]
TimeoutStartSec=0
Type=simple
ExecStart=/usr/local/bin/auto-tunnel-server
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
To run the client in CLI, you can run the following command:
auto-tunnel-client --remote <server-ip>:<server-port>