psktunnel
Remote exec + TCP forwarding through a relay, in pure Larzscript on both ends.
No ssh/sshd/sshpass, nothing to install beyond larzscript itself and this package - not even on Windows. This is NOT SSH - it doesn't speak RFC 4253 and won't talk to real sshd/OpenSSH/dropbear (real SSH key exchange needs big-integer math this language's double-only numeric type can't honestly do). It's a different, honestly named protocol built entirely on primitives Larzscript actually has: HMAC-SHA256 AEAD under a key derived from a shared password.
larzscript pkg install psktunnel
What you get
- remote exec: run a command on the exposed machine, get real stdout/exit status back
- TCP forwarding through a relay - one active connection at a time
- real HMAC-SHA256 AEAD encryption, per-message keystream offsets (no key reuse)
- password-derived key (pbkdf2) - same setup on both ends, nothing else to configure
- auto-reconnect with exponential backoff if the relay or network hiccups
Try it
import "psktunnel" as psk
let key = psk.derive_key("a shared password")
# on the relay (a public server, stays up):
let cfg = psk.default_config()
cfg["master_key"] = key
psk.relay_daemon(cfg)
# on the machine you want to expose (dials OUT, works behind NAT/CGNAT):
let cfg2 = psk.default_config()
cfg2["relay_host"] = "your.relay.example.com"
cfg2["master_key"] = key
psk.run_client(cfg2)Output
psktunnel relay: control=7040 data=7041 admin=7042
waiting for client...
client connected: {"type":"hello","forward_public_port":0}
connected to relay - tunnel active