nginx 1.20 版本 配置
# 加密协议与套件
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers on;
用浏览器和 myssl.com 检测是 256 优先
TLS 1.3 (服务器顺序优先) TLS_AES_256_GCM_SHA384 (0x1302) 256 bits FS TLS_CHACHA20_POLY1305_SHA256 (0x1303) 256 bits FS TLS_AES_128_GCM_SHA256 (0x1301) 128 bits FS
怎么设置成 AES_128_GCM 优先呢?
1
codefever 2022-04-19 10:47:24 +08:00
楼主参考一下:
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; #ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; error_page 497 http...s://$host$request_uri; |
3
H0u5er 2022-04-19 13:32:48 +08:00
|
4
cattyhouse 2022-04-19 14:52:22 +08:00 via iPhone
nginx:
ssl_conf_command Ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256; |
5
toyst OP @cattyhouse 感谢,有效
|
6
liyunlong5 2022-07-17 11:54:18 +08:00 via Android
ssl_prefer_server_ciphers off 即可,on 的话,h2+tls1.3 默认不是按照服务端的顺序来的,nginx 还没修复这个问题,好像 cf 那里有个 hack 的方法,可以搜索一下
|