{"id":46288,"date":"2020-03-04T13:49:12","date_gmt":"2020-03-04T05:49:12","guid":{"rendered":"http:\/\/4563.org\/?p=46288"},"modified":"2020-03-04T13:49:12","modified_gmt":"2020-03-04T05:49:12","slug":"nginx-%e7%9a%84tlsv1-3-chacha20%e6%94%af%e6%8c%81","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=46288","title":{"rendered":"nginx \u7684TLSv1.3 chacha20\u652f\u6301"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>whiledone<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>nginx \u7684TLSv1.3 chacha20\u652f\u6301<\/h3>\n<p>  \t\t\u5b9d\u5854\u4e0d\u8ba9\u53d1\uff0c\u5c31\u53d1\u5728\u8fd9\u91cc\u5427\u3002<br \/>  \u4e4b\u524d\u5b66\u4e60\u5404\u4f4d\u5927\u4f6c\u7684\u5e16\u5b50\u8bd5\u7740\u5f00\u542fTLS1.3 CHACHA20\uff0c\u4f55\u4e43openssl1.1.1\u7248\u672c\u4e2d\u89c4\u5219\u5df2\u7ecf\u66f4\u65b0\uff0c\u65e7\u65b9\u6cd5\u5df2\u7ecf\u5931\u6548\u3002<br \/>  \u5148\u5206\u4eab\u5168\u65b0\u5f00\u542f\u65b9\u6848\uff1a<\/p>\n<p>  Geek\u7248\uff1a<br \/>  \u4e0b\u8f7d Nginx \u7684\u6e90\u7801<\/p>\n<p>  cd <br \/>  wget http:\/\/nginx.org\/download\/nginx-1.17.2.tar.gz<br \/>  tar zxf nginx-1.17.2.tar.gz<br \/>  mv nginx-1.17.2 nginx<\/p>\n<p>  \u7ed9 Nginx \u6253\u8865\u4e01<\/p>\n<p>  &nbsp; &nbsp; \u8865\u4e01\u6765\u81ea\uff1ahttps:\/\/github.com\/kn007\/patch<\/p>\n<p>  &nbsp; &nbsp; nginx \u8865\u4e011<\/p>\n<p>  &nbsp; &nbsp; \u6dfb\u52a0SPDY\u652f\u6301\u3002<br \/>  &nbsp; &nbsp; \u6dfb\u52a0HTTP2 HPACK\u7f16\u7801\u652f\u6301\u3002<br \/>  &nbsp; &nbsp; \u6dfb\u52a0\u52a8\u6001TLS\u8bb0\u5f55\u652f\u6301\u3002<\/p>\n<p>  cd<br \/>  git clone https:\/\/github.com\/stardock\/patch nginx-patch<br \/>  cd nginx<br \/>  patch -p1 &lt; ..\/nginx-patch\/nginx.patch<\/p>\n<p>  &nbsp; &nbsp; nginx\u8865\u4e012<br \/>  &nbsp; &nbsp; \u6dfb\u52a0TLS1.3\u52a0\u5bc6\u7b97\u6cd5\u9009\u62e9\u4ee5\u53ca\u5f00\u542fCHACHA20\u652f\u6301<\/p>\n<p>  cd<br \/>  git clone https:\/\/github.com\/stardock\/nginx-tls13-chacha20-patch<br \/>  mv nginx-tls13-chacha20-patch nginx-p2<br \/>  cd nginx<br \/>  patch -p1 &lt; ..\/nginx-p2\/nginx_tls13_chacha20_1_17_2.patch &nbsp; &nbsp; &nbsp; &nbsp; <\/p>\n<p>  \u7f16\u8bd1<\/p>\n<p>  .\/configure <br \/>  &#8211;user=www &#8211;group=www &#8211;prefix=\/www\/server\/nginx &#8211;with-openssl=..\/openssl <br \/>  &#8211;add-module=..\/nginxtls13\/ngx_devel_kit &#8211;add-module=..\/nginxtls13\/lua_nginx_module <br \/>  &#8211;add-module=..\/nginxtls13\/ngx_cache_purge &#8211;add-module=..\/nginxtls13\/nginx-sticky-module <br \/>  &#8211;add-module=..\/nginxtls13\/ngx-pagespeed &#8211;with-http_v2_module &#8211;with-http_ssl_module <br \/>  &#8211;with-http_stub_status_module &#8211;with-http_ssl_module &#8211;with-http_v2_module <br \/>  &#8211;with-http_image_filter_module &#8211;with-http_gzip_static_module <br \/>  &#8211;with-http_gunzip_module &#8211;with-stream &#8211;with-stream_ssl_module <br \/>  &#8211;with-ipv6 &#8211;with-http_sub_module &#8211;with-http_flv_module <br \/>  &#8211;with-http_addition_module &#8211;with-http_realip_module <br \/>  &#8211;with-http_mp4_module &#8211;with-ld-opt=-Wl,-E <br \/>  &#8211;with-openssl-opt=&#8217;enable-tls1_3 enable-weak-ssl-ciphers&#8217;<\/p>\n<p>  make<\/p>\n<p>  \u628aobjs\u76ee\u5f55\u4e0b\u7684nginx\u4e8c\u8fdb\u5236\u6587\u4ef6\u62ff\u53bb\u4f7f\u7528\u5373\u53ef\u3002<\/p>\n<p>  \u6700\u540e\u7684\u6b65\u9aa4<\/p>\n<p>  &nbsp; &nbsp; \u5c06\u7f51\u7ad9\u7684ssl\u914d\u7f6e\u6587\u4ef6\u4fee\u6539\u5982\u4e0b<\/p>\n<p>  ssl_protocols TLSv1.2 TLSv1.3;<br \/>  ssl_ciphers ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256;<br \/>  ssl_ciphers_tls13 TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256;<br \/>  ssl_prefer_server_ciphers on;<br \/>  ssl_prefer_chacha20 on;<\/p>\n<p>  \u5c0f\u767d\u7248\uff1a<br \/>  \u7f16\u8f91\u4e2d\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>hasamol7468<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t:lol \u611f\u8c22\u5206\u4eab<\/p>\n<p>  \u5947\u602a\u7684\u6280\u672f\u53c8\u589e\u52a0\u4e86.jpg\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>netsky<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4e3a\u5565\u8981\u641echacha20\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u574f\u9c7c\u7092\u5e74\u7cd5<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4e3a\u5565\u8981\u641echacha20<br \/>  \u641echacha20\u7684\u9178\u9178**\u88abban\u7684\u8fd8\u5c11\u4e86\u5417\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>h2o<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u514d\u4e86\uff0c\u4e0d\u559c\u6b22\u7f16\u8bd1\u5b89\u88c5\u7684\u4e1c\u897f\uff0c\u7b49\u5b98\u65b9\u5305\u652f\u6301\u5427\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>whiledone \u5927\u4f6c\u6709\u8bdd\u8bf4 :&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/46288"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=46288"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/46288\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=46288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=46288"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=46288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}