First of all you have to create the server executable, upload that to the server and allow it to change the config of nginx.
-
Compile:
ZUNDER_DOMAIN=your-domain.dev cargo rustc --release --target x86_64-unknown-linux-musl -- -C linker=rust-lld
-
Copy:
scp target/x86_64-unknown-linux-musl/release/zunder-server server:/usr/bin
-
Make Sticky:
chown root zunder-server && chmod u+s zunder-server
-
Create a wildcard-certificate for your domain with let's encrypt.
cargo install zunder
- Run
zunder create
in a project folder which you want to forward - Edit your
.zunder.toml
to change the port you want to forward, where the server can be reached and which subdomain should be used. - Run
zunder
- It should now be connected to the server an create the subdomain for nginx automatically and proxy all your requests.
Don't use this in production as it is only a little more than a proof of concept.
Here is a config I use for a project using ember (hence the port 4200):
localport = 4200
remoteport = 57407
subdomain = "pp"
ssh = "os"