Created
January 23, 2019 10:44
-
-
Save reo7sp/8ebe1ac85c1d3913ebb96c8ac83d49b7 to your computer and use it in GitHub Desktop.
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
user www-data; | |
worker_processes auto; | |
events { | |
worker_connections 4096; | |
} | |
http { | |
include /etc/nginx/mime.types.conf; | |
default_type application/octet-stream; | |
access_log off; | |
error_log /var/log/nginx/error.log; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
server { | |
listen 80; | |
root /opt/static/html; | |
} | |
} | |
stream { | |
upstream mtproto { | |
server 127.0.0.1:1501; | |
} | |
upstream web { | |
server 127.0.0.1:1502; | |
} | |
map $ssl_preread_protocol $upstream { | |
"" mtproto; | |
"TLSv1.1" web; | |
"TLSv1.2" web; | |
"TLSv1.3" web; | |
default web; | |
} | |
server { | |
listen 443; | |
ssl_preread on; | |
proxy_pass $upstream; | |
} | |
} |
Just checked. Config is still actual.
this config doesn't work because the signature of mtproto is "TLSv1.3" and you are sending it to web traffic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, Could you please tell me what this gist is used for?
Thank you