buildpack/script/proxy.sh

21 lines
536 B
Bash
Raw Normal View History

#!/bin/sh
2019-11-30 18:05:23 +00:00
# Since we can't open TCP ports on Heroku, we need to forward traffic to a proxy server that
# permits incoming connections
# Resources for setting up the proxy server: https://github.com/kaboomserver/proxy
2020-02-10 21:49:19 +00:00
set -x
2020-02-10 22:15:38 +00:00
while true; do
2020-02-14 17:40:36 +00:00
autossh -M 0 \
-o "ServerAliveInterval 30" \
-o "ServerAliveCountMax 3" \
-i ~/.ssh/proxy \
2020-02-10 22:15:38 +00:00
-o StrictHostKeyChecking=no -o ExitOnForwardFailure=yes -o StreamLocalBindUnlink=yes \
-c aes128-ctr \
-C -S none -N -T -R \
25565:localhost:25565 \
remote@play.kaboom.pw
sleep 1
done