Add configuration files

This commit is contained in:
Vincent Hsu 2017-04-10 12:40:27 +08:00
parent 0007321f4e
commit 0b1bca1ef8
3 changed files with 44 additions and 0 deletions

15
README.md Normal file
View File

@ -0,0 +1,15 @@
# Installation
Step 1: Place [`ngork`](https://ngrok.com/download) in `/opt/ngrok/`
Step 2: Get `authtoken` from ngrok website, then add it to `/opt/ngrok/ngrok.yml`
Step 3: Add `ngork.service` to `/etc/systemd/system/`
Step 4: Start ngork service by typing:
```
systemctl daemon-reload
systemctl enable ngrok.service
systemctl start ngrok.service
```

13
ngrok.service Normal file
View File

@ -0,0 +1,13 @@
[Unit]
Description=ngrok
After=network.target
[Service]
ExecStart=/opt/ngrok/ngrok start --all --config /opt/ngrok/ngrok.yml
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
Type=simple
[Install]
WantedBy=multi-user.target

16
ngrok.yml Normal file
View File

@ -0,0 +1,16 @@
authtoken: <add_your_token_here>
# region: ap
tunnels:
ssh:
proto: tcp
addr: 22
# myapp-http:
# addr: 80
# proto: http
# hostname: example.com
# auth: "user:secretpassword"
# bind_tls: false
# myapp-https:
# addr: 443
# proto: tls
# hostname: example.com