Created
February 13, 2017 22:03
-
-
Save agoldis/c6d5660131c263e93d6d23115a21cf10 to your computer and use it in GitHub Desktop.
nginx proxy for ssh tunnelling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
port=ARGV[1] | |
ssh -R $port:localhost:$port sshproxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name "~^(?<port>\d{4,5})\.port\.goldis\.io$"; | |
location / { | |
proxy_pass http://127.0.0.1:$port; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment