whiledone 大佬有话说 :
nginx 的TLSv1.3 chacha20支持
宝塔不让发,就发在这里吧。
之前学习各位大佬的帖子试着开启TLS1.3 CHACHA20,何乃openssl1.1.1版本中规则已经更新,旧方法已经失效。
先分享全新开启方案:
Geek版:
下载 Nginx 的源码
cd
wget http://nginx.org/download/nginx-1.17.2.tar.gz
tar zxf nginx-1.17.2.tar.gz
mv nginx-1.17.2 nginx
给 Nginx 打补丁
补丁来自:https://github.com/kn007/patch
nginx 补丁1
添加SPDY支持。
添加HTTP2 HPACK编码支持。
添加动态TLS记录支持。
cd
git clone https://github.com/stardock/patch nginx-patch
cd nginx
patch -p1 < ../nginx-patch/nginx.patch
nginx补丁2
添加TLS1.3加密算法选择以及开启CHACHA20支持
cd
git clone https://github.com/stardock/nginx-tls13-chacha20-patch
mv nginx-tls13-chacha20-patch nginx-p2
cd nginx
patch -p1 < ../nginx-p2/nginx_tls13_chacha20_1_17_2.patch
编译
./configure
–user=www –group=www –prefix=/www/server/nginx –with-openssl=../openssl
–add-module=../nginxtls13/ngx_devel_kit –add-module=../nginxtls13/lua_nginx_module
–add-module=../nginxtls13/ngx_cache_purge –add-module=../nginxtls13/nginx-sticky-module
–add-module=../nginxtls13/ngx-pagespeed –with-http_v2_module –with-http_ssl_module
–with-http_stub_status_module –with-http_ssl_module –with-http_v2_module
–with-http_image_filter_module –with-http_gzip_static_module
–with-http_gunzip_module –with-stream –with-stream_ssl_module
–with-ipv6 –with-http_sub_module –with-http_flv_module
–with-http_addition_module –with-http_realip_module
–with-http_mp4_module –with-ld-opt=-Wl,-E
–with-openssl-opt=’enable-tls1_3 enable-weak-ssl-ciphers’
make
把objs目录下的nginx二进制文件拿去使用即可。
最后的步骤
将网站的ssl配置文件修改如下
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256;
ssl_ciphers_tls13 TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256;
ssl_prefer_server_ciphers on;
ssl_prefer_chacha20 on;
小白版:
编辑中
hasamol7468 大佬有话说 :
:lol 感谢分享
奇怪的技术又增加了.jpg
netsky 大佬有话说 :
为啥要搞chacha20
坏鱼炒年糕 大佬有话说 :
为啥要搞chacha20
搞chacha20的酸酸**被ban的还少了吗
h2o 大佬有话说 :
免了,不喜欢编译安装的东西,等官方包支持吧