{"id":6589,"date":"2024-09-20T19:26:33","date_gmt":"2024-09-20T11:26:33","guid":{"rendered":"https:\/\/t.n-years.com\/?p=6589"},"modified":"2024-09-20T19:26:33","modified_gmt":"2024-09-20T11:26:33","slug":"gin-autotls","status":"publish","type":"post","link":"https:\/\/t.n-years.com\/?p=6589","title":{"rendered":"Gin autotls"},"content":{"rendered":"<p><a href=\"https:\/\/gin-gonic.com\/docs\/examples\/support-lets-encrypt\/\">https:\/\/gin-gonic.com\/docs\/examples\/support-lets-encrypt\/<\/a><\/p>\n<p>Let\u2019s Encrypt \u662f\u4e00\u4e2a<strong>\u514d\u8d39\u3001\u81ea\u52a8\u5316\u3001\u5f00\u653e\u7684<\/strong>\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff08CA\uff0cCertificate Authority\uff09\uff0c\u7531<strong>\u975e\u8425\u5229\u7ec4\u7ec7\u4e92\u8054\u7f51\u5b89\u5168\u7814\u7a76\u5c0f\u7ec4<\/strong>\uff08ISRG, Internet Security Research Group\uff09\u8fd0\u8425\u3002\u5176\u76ee\u6807\u662f\u8ba9\u7f51\u7ad9\u66f4\u52a0\u5b89\u5168\uff0c\u63a8\u52a8\u7f51\u7edc\u5168\u9762\u91c7\u7528 HTTPS \u534f\u8bae\u3002<\/p>\n<h3>Let\u2019s Encrypt \u7684\u7279\u70b9\uff1a<\/h3>\n<ol>\n<li><strong>\u514d\u8d39<\/strong>\uff1aLet\u2019s Encrypt \u5411\u4efb\u4f55\u62e5\u6709\u57df\u540d\u7684\u7528\u6237\u514d\u8d39\u63d0\u4f9b\u6570\u5b57\u8bc1\u4e66\uff0c\u6d88\u9664\u4e86\u4f20\u7edf\u7684\u8bc1\u4e66\u8d39\u7528\u3002<\/li>\n<li><strong>\u81ea\u52a8\u5316<\/strong>\uff1a\u901a\u8fc7\u81ea\u52a8\u5316\u5de5\u5177\uff08\u5982 <code>certbot<\/code> \u6216 Go \u4e2d\u7684 <code>autocert<\/code>\uff09\uff0c\u53ef\u4ee5\u81ea\u52a8\u7533\u8bf7\u3001\u5b89\u88c5\u3001\u7eed\u7b7e\u8bc1\u4e66\uff0c\u7b80\u5316\u4e86 HTTPS \u7684\u914d\u7f6e\u8fc7\u7a0b\u3002<\/li>\n<li><strong>\u5f00\u6e90<\/strong>\uff1aLet\u2019s Encrypt \u7684\u5de5\u5177\u548c\u6280\u672f\u662f\u5f00\u6e90\u7684\uff0c\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u4f7f\u7528\u548c\u8d21\u732e\u6539\u8fdb\u3002<\/li>\n<li><strong>\u5e7f\u6cdb\u652f\u6301<\/strong>\uff1aLet\u2019s Encrypt \u7b7e\u53d1\u7684\u8bc1\u4e66\u53d7\u5230\u6240\u6709\u4e3b\u8981\u6d4f\u89c8\u5668\u548c\u64cd\u4f5c\u7cfb\u7edf\u7684\u4fe1\u4efb\u3002<\/li>\n<\/ol>\n<h3>\u76ee\u6807\u4e0e\u4f7f\u547d\uff1a<\/h3>\n<p>Let\u2019s Encrypt \u7684\u4f7f\u547d\u662f\u901a\u8fc7\u63d0\u4f9b\u7b80\u5355\u3001\u514d\u8d39\u7684 SSL\/TLS \u8bc1\u4e66\u6765\u63a8\u52a8\u4e92\u8054\u7f51\u7684\u52a0\u5bc6\u666e\u53ca\uff0c\u4ece\u800c\u63d0\u5347\u7528\u6237\u7684\u9690\u79c1\u548c\u5b89\u5168\u3002\u8fd9\u4f7f\u5f97\u4efb\u4f55\u4e2a\u4eba\u548c\u4f01\u4e1a\u90fd\u80fd\u65b9\u4fbf\u5730\u4e3a\u5176\u7f51\u7ad9\u542f\u7528 HTTPS \u52a0\u5bc6\u3002<\/p>\n<h3>\u80cc\u666f\u4e0e\u652f\u6301\uff1a<\/h3>\n<p>Let\u2019s Encrypt \u4e8e 2016 \u5e74\u6b63\u5f0f\u542f\u52a8\uff0c\u5f97\u5230\u4e86\u591a\u4e2a\u884c\u4e1a\u9886\u5bfc\u8005\u7684\u652f\u6301\uff0c\u5305\u62ec Mozilla\u3001\u601d\u79d1\u3001\u8c37\u6b4c\u3001Facebook\u3001Akamai \u7b49\u6280\u672f\u516c\u53f8\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/gin-gonic.com\/docs\/examples\/support-lets-encryp&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/t.n-years.com\/?p=6589\">\u9605\u8bfb\u66f4\u591a<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[123],"tags":[],"class_list":["post-6589","post","type-post","status-publish","format-standard","hentry","category-123"],"_links":{"self":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts\/6589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6589"}],"version-history":[{"count":1,"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts\/6589\/revisions"}],"predecessor-version":[{"id":6590,"href":"https:\/\/t.n-years.com\/index.php?rest_route=\/wp\/v2\/posts\/6589\/revisions\/6590"}],"wp:attachment":[{"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/t.n-years.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}