-
-
Save honsa/9e9327a7769138985cb9a071dfac571d to your computer and use it in GitHub Desktop.
Revisions
-
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Add two DNS records: one for the base domain and one for the wildcard domain. Fo ## Different Operating Systems If the OS on which you'll be compiling ngrok (that's the server section below) is different than the OS on which you'll be running the client, then you will need to set the GOOS and GOARCH env variables. I run Linux everywhere, so I don't know how to do that. Please Google it or [see the discussion here](https://github.com/inconshreveable/ngrok/issues/84). If you know how to do this and want to add GOOS/GOARCH instructions here, please let me know. ## On Server -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ The plan is to create a pair of executables (`ngrok` and `ngrokd`) that are conn Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is `domain.com`, you'll need a record for that and for `*.domain.com`. ## Different Operating Systems If the OS on which you'll be compiling ngrok (that's the server section below) is different than the OS on which you'll be running the client, then you will need to set the GOOS and GOARCH env variables. I run Linux everywhere, so I don't know how to do that. Please Google it or [see the discussion here](https://github.com/inconshreveable/ngrok/issues/84). -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,10 @@ The plan is to create a pair of executables (`ngrok` and `ngrokd`) that are conn Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is `domain.com`, you'll need a record for that and for `*.domain.com`. ## Different OSes If the OS on which you'll be compiling ngrok (that's the server section below) is different than the OS on which you'll be running the client, then you will need to set the GOOS and GOARCH env variables. I run Linux everywhere, so I don't know how to do that. Please Google it or [see the discussion here](https://github.com/inconshreveable/ngrok/issues/84). ## On Server MAKE SURE YOU SET `NGROK_DOMAIN` BELOW. Set it to the base domain, not the wildcard domain. -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,10 +16,10 @@ git clone https://github.com/inconshreveable/ngrok.git cd ngrok openssl genrsa -out rootCA.key 2048 openssl req -x509 -new -nodes -key rootCA.key -subj "/CN=$NGROK_DOMAIN" -days 5000 -out rootCA.pem openssl genrsa -out device.key 2048 openssl req -new -key device.key -subj "/CN=$NGROK_DOMAIN" -out device.csr openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out device.crt -days 5000 cp rootCA.pem assets/client/tls/ngrokroot.crt # make clean -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ openssl genrsa -out rootCA.key 2048 openssl req -x509 -new -nodes -key rootCA.key -subj "/CN=$NGROK_DOMAIN" -days 1024 -out rootCA.pem openssl genrsa -out device.key 2048 openssl req -new -key device.key -subj "/CN=$NGROK_DOMAIN" -out device.csr openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out device.crt -days 1024 cp rootCA.pem assets/client/tls/ngrokroot.crt # make clean -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ ## Intro The plan is to create a pair of executables (`ngrok` and `ngrokd`) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other `ngrok` to connect to this `ngrokd`, and vice versa. ## DNS Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is `domain.com`, you'll need a record for that and for `*.domain.com`. ## On Server MAKE SURE YOU SET `NGROK_DOMAIN` BELOW. Set it to the base domain, not the wildcard domain. @@ -33,7 +33,7 @@ bin/ngrokd -tlsKey=device.key -tlsCrt=device.crt -domain="$NGROK_DOMAIN" -httpAd ``` ## On Client MAKE SURE YOU SET `NGROK_DOMAIN` BELOW. Set it to the base domain, not the wildcard domain. -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -40,5 +40,7 @@ MAKE SURE YOU SET `NGROK_DOMAIN` BELOW. Set it to the base domain, not the wildc ``` NGROK_DOMAIN="my.domain.com" echo -e "server_addr: $NGROK_DOMAIN:4443\ntrust_host_root_certs: false" > ngrok-config ./ngrok -config=ngrok-config 80 ``` Or for SSH forwarding: `./ngrok -config=ngrok-config --proto=tcp 22` -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ cp rootCA.pem assets/client/tls/ngrokroot.crt make release-server release-client ``` Copy `bin/ngrok` to whatever computer you want to connect from. Then start the server: ``` bin/ngrokd -tlsKey=device.key -tlsCrt=device.crt -domain="$NGROK_DOMAIN" -httpAddr=":8000" -httpsAddr=":8001" -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ### Intro The plan is to create a pair of executables (`ngrok` and `ngrokd`) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other `ngrok` to connect to this `ngrokd`, and vice versa. ### DNS -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ### Intro The plan is to create a pair of executables (`ngrok` and `ngrokd`) that are connected with a self-signed SSL cert. Since the client and server are paired, you won't be able to use any other `ngrok` to connect to this `ngrokd`, and vice versa. ### DNS -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ### Intro The plan is to create a pair of executables (`ngrok` and `ngrokd`) that are connected with a self-signed SSL cert. Since the client and daemon are paired, you won't be able to use any other `ngrok` to connect to this `ngrokd`, and vice versa. ### DNS -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,6 @@ openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateseria cp rootCA.pem assets/client/tls/ngrokroot.crt # make clean make release-server release-client ``` Copy `bin/ngrok` from the server to the client. Then start the server: -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -25,10 +25,14 @@ cp rootCA.pem assets/client/tls/ngrokroot.crt # make clean make release-server release-client ``` Copy `bin/ngrok` from the server to the client. Then start the server: ``` bin/ngrokd -tlsKey=device.key -tlsCrt=device.crt -domain="$NGROK_DOMAIN" -httpAddr=":8000" -httpsAddr=":8001" ``` ### On Client -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ ### Intro The plan is to create a pair of executables (`ngrok` and `ngrokd`) that are connected with your own self-signed SSL cert. Since the client and daemon are paired, you won't be able to use any other `ngrok` to connect to this `ngrokd`, and vice versa. ### DNS Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is `domain.com`, you'll need a record for that and for `*.domain.com`. @@ -24,12 +28,12 @@ make release-server release-client bin/ngrokd -tlsKey=device.key -tlsCrt=device.crt -domain="$NGROK_DOMAIN" -httpAddr=":8000" -httpsAddr=":8001" ``` Now copy `bin/ngrok` from the server to the client. ### On Client MAKE SURE YOU SET `NGROK_DOMAIN` BELOW. Set it to the base domain, not the wildcard domain. ``` NGROK_DOMAIN="my.domain.com" echo -e "server_addr: $NGROK_DOMAIN:4443\ntrust_host_root_certs: false" > ngrok-config -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,11 @@ ### DNS Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is `domain.com`, you'll need a record for that and for `*.domain.com`. ### On Server MAKE SURE YOU SET `NGROK_DOMAIN` BELOW. Set it to the base domain, not the wildcard domain. ``` NGROK_DOMAIN="my.domain.com" git clone https://github.com/inconshreveable/ngrok.git @@ -24,6 +26,8 @@ bin/ngrokd -tlsKey=device.key -tlsCrt=device.crt -domain="$NGROK_DOMAIN" -httpAd ### On Client MAKE SURE YOU SET `NGROK_DOMAIN` BELOW. Set it to the base domain, not the wildcard domain. copy `bin/ngrok` from server to client ``` -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ cp rootCA.pem assets/client/tls/ngrokroot.crt # make clean make release-server release-client bin/ngrokd -tlsKey=device.key -tlsCrt=device.crt -domain="$NGROK_DOMAIN" -httpAddr=":8000" -httpsAddr=":8001" ``` ### On Client -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,7 @@ bin/ngrokd -tlsKey=device.key -tlsCrt=device.crt -domain="$NGROK_DOMAIN" -httpAd ### On Client copy `bin/ngrok` from server to client ``` NGROK_DOMAIN="my.domain.com" -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 10 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ Note: make sure you set the Common Name on the SSL certs to `sub.domain.com`, not the wildcard `*.sub.domain.com`. MAKE SURE YOU SET `NGROK_DOMAIN` BELOW IN BOTH SERVER AND CLIENT SECTION ### On Server ``` NGROK_DOMAIN="my.domain.com" @@ -17,12 +19,15 @@ cp rootCA.pem assets/client/tls/ngrokroot.crt # make clean make release-server release-client bin/ngrokd -tlsKey=device.key -tlsCrt=device.crt -domain="$NGROK_DOMAIN" -httpAddr="" -httpsAddr="" ``` ### On Client copy bin/ngrok from server to client ``` NGROK_DOMAIN="my.domain.com" echo -e "server_addr: $NGROK_DOMAIN:4443\ntrust_host_root_certs: false" > ngrok-config ./ngrok -config=ngrok-config -proto=tcp 22 ``` -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ Note: make sure you set the Common Name on the SSL certs to `sub.domain.com`, not the wildcard `*.sub.domain.com`. MAKE SURE YOU SET `NGROK_DOMAIN` BELOW ``` NGROK_DOMAIN="my.domain.com" -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,16 @@ Note: make sure you set the Common Name on the SSL certs to `sub.domain.com`, not the wildcard `*.sub.domain.com`. MAKE SURE YOU SET NGROK_DOMAIN BELOW ``` NGROK_DOMAIN="my.domain.com" git clone https://github.com/inconshreveable/ngrok.git cd ngrok openssl genrsa -out rootCA.key 2048 openssl req -x509 -new -nodes -key rootCA.key -subj "/CN=$NGROK_DOMAIN" -days 1024 -out rootCA.pem openssl genrsa -out device.key 2048 openssl req -new -key device.key -subj "/CN=$NGROK_DOMAIN" -out device.csr openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out device.crt -days 500 cp rootCA.pem assets/client/tls/ngrokroot.crt -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,9 +12,8 @@ openssl req -new -key device.key -subj "/C=US/ST=NY/L=/O=IT/CN=$NGROK_DOMAIN" -o openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out device.crt -days 500 cp rootCA.pem assets/client/tls/ngrokroot.crt # make clean make release-server release-client # copy bin/ngrok to client -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ openssl genrsa -out device.key 2048 openssl req -new -key device.key -subj "/C=US/ST=NY/L=/O=IT/CN=$NGROK_DOMAIN" -out device.csr openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out device.crt -days 500 cp rootCA.pem assets/client/tls/ngrokroot.crt make clean make release-server make release-client -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,14 @@ Note: make sure you set the Common Name on the SSL certs to `sub.domain.com`, not the wildcard `*.sub.domain.com`. ``` export NGROK_DOMAIN="my.domain.com" git clone https://github.com/inconshreveable/ngrok.git cd ngrok openssl genrsa -out rootCA.key 2048 openssl req -x509 -new -nodes -key rootCA.key -subj "/C=US/ST=NY/L=/O=IT/CN=$NGROK_DOMAIN" -days 1024 -out rootCA.pem openssl genrsa -out device.key 2048 openssl req -new -key device.key -subj "/C=US/ST=NY/L=/O=IT/CN=$NGROK_DOMAIN" -out device.csr openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out device.crt -days 500 mv rootCA.pem assets/client/tls/ngrokroot.crt @@ -18,9 +19,9 @@ make release-client # copy bin/ngrok to client # on server bin/ngrokd -tlsKey=device.key -tlsCrt=device.crt -domain="$NGROK_DOMAIN" -httpAddr="" -httpsAddr="" #on client echo -e "server_addr: $NGROK_DOMAIN:4443\ntrust_host_root_certs: false" > ngrok-config ./ngrok -config=ngrok-config -proto=tcp 22 ``` -
lyoshenka revised this gist
May 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -21,6 +21,6 @@ make release-client bin/ngrokd -tlsKey=device.key -tlsCrt=device.crt -domain="sub.domain.com" -httpAddr="" -httpsAddr="" #on client echo -e "server_addr: sub.domain.com:4443\ntrust_host_root_certs: false" > ngrok-config ./ngrok -config=ngrok-config -proto=tcp 22 ``` -
lyoshenka created this gist
May 23, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ Note: make sure you set the Common Name on the SSL certs to `sub.domain.com`, not the wildcard `*.sub.domain.com`. ``` git clone https://github.com/inconshreveable/ngrok.git cd ngrok openssl genrsa -out rootCA.key 2048 openssl req -x509 -new -nodes -key rootCA.key -days 1024 -out rootCA.pem openssl genrsa -out device.key 2048 openssl req -new -key device.key -out device.csr openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out device.crt -days 500 mv rootCA.pem assets/client/tls/ngrokroot.crt make clean make release-server make release-client # copy bin/ngrok to client # on server bin/ngrokd -tlsKey=device.key -tlsCrt=device.crt -domain="sub.domain.com" -httpAddr="" -httpsAddr="" #on client echo "server_addr: sub.domain.com:4443\ntrust_host_root_certs: false" > ngrok-config ./ngrok -config=ngrok-config -proto=tcp 22 ```