Add websocket ssh proxy to dna-gw
This commit is contained in:
parent
701c42b32c
commit
480681394e
2 changed files with 20 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
||||||
- role: nginx/site
|
- role: nginx/site
|
||||||
site: gw.home.foo.sh
|
site: gw.home.foo.sh
|
||||||
- tftp
|
- tftp
|
||||||
|
- websockify
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: use configured dns servers and domain name
|
- name: use configured dns servers and domain name
|
||||||
|
|
19
roles/nginx/site/templates/gw.home.foo.sh.conf.j2
Normal file
19
roles/nginx/site/templates/gw.home.foo.sh.conf.j2
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
ssl_client_certificate {{ tls_certs }}/ca.crt;
|
||||||
|
ssl_verify_client on;
|
||||||
|
|
||||||
|
{% for host in ssh_proxy_hosts %}
|
||||||
|
location /{{ host | hash('sha1') }}/ {
|
||||||
|
proxy_pass http://127.0.0.1:6000?token={{ host | hash('sha1') }};
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_read_timeout 600s;
|
||||||
|
proxy_buffering off;
|
||||||
|
}
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
location / {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue