You can create a long-running SSH connection on the server to itself using ssh user@localhost -D 0.0.0.0:1234.
You can create a script that verify if this command is running and put it on crontab to ensure if the connection fails for some reason it'll restart the job.