{"id":1824,"date":"2018-11-19T20:35:53","date_gmt":"2018-11-19T12:35:53","guid":{"rendered":"https:\/\/zocodev.com\/?p=208"},"modified":"2018-11-19T20:35:53","modified_gmt":"2018-11-19T12:35:53","slug":"tls-1-3-and-brotli","status":"publish","type":"post","link":"https:\/\/cloudbool.com\/archive\/tls-1-3-and-brotli.html","title":{"rendered":"\u5347\u7ea7\u5230\u4e86TLS 1.3\u5e76\u5f00\u542f\u4e86Brotli\u538b\u7f29"},"content":{"rendered":"<p>\u8d81\u7740\u5468\u672b\u6709\u65f6\u95f4\uff0c\u6298\u817e\u4e86\u4e0b\u670d\u52a1\u5668\uff0c\u5c06\u539f\u6765\u7528\u7684TLSv1.2\u5347\u7ea7\u5230\u4e86TLSv1.3\uff0c\u5e76\u6298\u817e\u4e86\u4e0b\u5f00\u542f\u4e86Brotli\u538b\u7f29\uff0c\u8fd9\u91cc\u505a\u4e2a\u8bb0\u5f55\uff0c\u4ee5\u5907\u540e\u9762\u67e5\u9605\uff0c\u867d\u7136\u6211\u4e5f\u4e0d\u77e5\u9053\u5bf9\u4e8e\u6027\u80fd\u4ec0\u4e48\u7684\u6709\u4ec0\u4e48\u63d0\u5347\uff0c\u4f46\u662f\u4eba\u751f\u91cd\u5728\u6298\u817e\u4e0d\u662f\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u6839\u636eNginx\u7684\u53d1\u884c\u65e5\u5fd7\uff0c\u5176\u5b9e\u81ea\u4eceNginx 1.13\u7248\u672c\u5f00\u59cb\u5df2\u7ecf\u652f\u6301TLSv3\u4e86\uff0c\u6240\u4ee5\u5982\u679c\u53ea\u662f\u60f3\u8981\u4f7f\u7528TLSv1.3\u7684\uff0c\u76f4\u63a5\u4f7f\u7528\u5b98\u65b9\u6e90\u7684Nginx\u5c31\u597d\u4e86\uff0c\u4f46\u662f\u6211\u56e0\u4e3a\u8fd8\u6709\u522b\u7684\u9700\u6c42\uff0c\u6240\u4ee5\u81ea\u884c\u7f16\u8bd1\u5e76\u91cd\u65b0\u6253\u5305\u4e86\u4e00\u4e0bNginx\uff0c\u6298\u817e\u8fc7\u7a0b\u5728\u8fd9\u91cc\uff1a<a href=\"https:\/\/zocodev.com\/debian-add-modules-rebuild-nginx.html\">Debian\u7cfb\u7edf\u6dfb\u52a0\u6a21\u5757\u5e76\u91cd\u65b0\u7f16\u8bd1\u6253\u5305Nginx<\/a>\u3002<\/p>\n<p>\u4e4b\u524d\u6211\u662f\u4f7f\u7528Nginx\u76841.14.0\u7248\u672c\u7684\uff0c\u56e0\u4e3a\u7206\u51fa\u4e86\u4e24\u4e2a\u5b89\u5168\u6f0f\u6d1e\uff08HTTP\/2\uff08CVE-2018-16843\uff0cCVE-2018-16844\uff09\u548cMP4\u6a21\u5757\uff08CVE-2018-16845\uff09\uff09\uff0c\u5b98\u65b9\u53ef\u80fd\u5347\u7ea7\u4e86\u4e00\u4e2a\u5c0f\u7248\u672c\uff0c\u8fd9\u6b21\u6b63\u597d\u60f3\u4f53\u9a8c\u4e00\u4e0bBrotli\u538b\u7f29\uff0c\u4e8e\u662f\u8d81\u8fd9\u673a\u4f1a\u4e5f\u5c06Nginx\u5347\u7ea7\u5230\u4e861.14.1\uff0c\u4e3a\u4ec0\u4e48\u4e0d\u75281.15.1\uff1f\u670d\u52a1\u5668\u7528\u7684\u4e1c\u897f\uff0c\u6211\u8fd8\u662f\u66f4\u559c\u6b22\u7a33\u5b9a\u4e00\u70b9\uff0c\u6bd5\u7adf\u91cd\u65b0\u7f16\u8bd1\u4e00\u4e0bNginx\u4e5f\u633a\u9ebb\u70e6\u7684\u3002<\/p>\n<p>\u4ece1.14.0\u5347\u7ea7\u52301.14.1\uff0c\u5927\u90e8\u5206\u914d\u7f6e\u90fd\u4e0d\u9700\u8981\u66f4\u6539\uff0c\u53ea\u9700\u8981\u6dfb\u52a0\u76f8\u5e94\u7684\u914d\u7f6e\u5c31\u884c\uff0c\u76f8\u5173\u90e8\u5206\u4ee3\u7801\uff1a<\/p>\n<pre><code>ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;\nssl_ciphers [TLS13+AESGCM+AES128|TLS13+AESGCM+AES256|TLS13+CHACHA20]:[EECDH+ECDSA+AESGCM+AES128|EECDH+ECDSA+CHACHA20]:EECDH+ECDSA+AESGCM+AES256:EECDH+ECDSA+AES128+SHA:EECDH+ECDSA+AES256+SHA:[EECDH+aRSA+AESGCM+AES128|EECDH+aRSA+CHACHA20]:EECDH+aRSA+AESGCM+AES256:EECDH+aRSA+AES128+SHA:EECDH+aRSA+AES256+SHA;\n<\/code><\/pre>\n<p>Brotli\u662f\u4e00\u4e2a\u6765\u81eaGoogle\u7684\u538b\u7f29\u7b97\u6cd5\uff0c\u636e\u8bf4\u538b\u7f29\u7387\u6bd4gzip\u8fd8\u597d\uff0c\u867d\u7136\u5c0f\u7ad9\u6240\u5728\u670d\u52a1\u5668\u67095M\u7684\u5e26\u5bbd\uff0c\u4f46\u662f\u8fd8\u662f\u60f3\u80fd\u8282\u7701\u70b9\u6d41\u91cf\uff0c\u6bd5\u7adf\u662f\u6309\u6d41\u91cf\u7b97\u7684\uff0c\u8d85\u51fa\u8fd8\u662f\u8981\u94b1\u7684\u3002\u81f3\u4e8eNginx\u5f00\u542fBrotli\uff0c\u90a3\u66f4\u7b80\u5355\u4e86\uff0c\u7f16\u8bd1\u8fdb\u76f8\u5173\u6a21\u5757\u4e4b\u540e\uff0c\u76f4\u63a5\u5728Nginx\u914d\u7f6e\u6587\u4ef6\u6dfb\u52a0\u5982\u4e0b\u51e0\u884c\u5373\u53ef\uff1a<\/p>\n<pre><code>#brotli compression\nbrotli on;\nbrotli_comp_level 6;\nbrotli_types text\/plain text\/css application\/json application\/x-javascript text\/xml application\/xml application\/xml+rss text\/javascript application\/javascript image\/svg+xml;\n<\/code><\/pre>\n<p>\u6dfb\u52a0\u4e4b\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u6d4b\u8bd5\u914d\u7f6e\u662f\u5426\u6b63\u786e\uff1a<\/p>\n<pre><code>nginx -t\n<\/code><\/pre>\n<p>\u5982\u679c\u6ca1\u95ee\u9898\u7684\u8bdd\uff0c\u91cd\u542f\u6216\u8005\u91cd\u65b0\u52a0\u8f7d\u4e00\u4e0b\u914d\u7f6e\u6587\u4ef6\u5c31\u884c\u3002<\/p>\n<p>\u8fd9\u662f\u5c0f\u7ad9\u542f\u7528TLSv1.3\u4e4b\u540e\u5728Google Chrome\u4e0b\u7684\u6548\u679c\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/cloudbool.com\/archive\/wp-content\/uploads\/2018\/11\/nginx-tls-1.3.png\" alt=\"nginx-tls-1.3\" \/><\/p>\n<p>\u8fd9\u662f\u542f\u7528Brotli\u538b\u7f29\u7684\u6548\u679c\uff0c\u5df2\u7ecf\u4e0d\u662f\u4e4b\u524d\u7684gzip\u4e86\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/cloudbool.com\/archive\/wp-content\/uploads\/2018\/11\/nginx-brotli.png\" alt=\"nginx-brotli\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8d81\u7740\u5468\u672b\u6709\u65f6\u95f4\uff0c\u6298\u817e\u4e86\u4e0b\u670d\u52a1\u5668\uff0c\u5c06\u539f\u6765\u7528\u7684TLSv1.2\u5347\u7ea7\u5230\u4e86TLSv1.3\uff0c\u5e76\u6298\u817e\u4e86\u4e0b\u5f00\u542f\u4e86Brotli\u538b &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/cloudbool.com\/archive\/tls-1-3-and-brotli.html\"> <span class=\"screen-reader-text\">\u5347\u7ea7\u5230\u4e86TLS 1.3\u5e76\u5f00\u542f\u4e86Brotli\u538b\u7f29<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[12],"tags":[76],"class_list":["post-1824","post","type-post","status-publish","format-standard","hentry","category-app","tag-nginx"],"_links":{"self":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/1824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/comments?post=1824"}],"version-history":[{"count":0,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/1824\/revisions"}],"wp:attachment":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/media?parent=1824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/categories?post=1824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/tags?post=1824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}