<p>Is there a maintained alternative to the <a href="https://github.com/rsc/letsencrypt">rsc/letsencrypt</a> package?</p>
<p>This is a complete web server using this package:</p>
<pre><code>package main
import (
"fmt"
"log"
"net/http"
"rsc.io/letsencrypt"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, TLS!\n")
})
var m letsencrypt.Manager
if err := m.CacheFile("letsencrypt.cache"); err != nil {
log.Fatal(err)
}
log.Fatal(m.Serve())
}
</code></pre>
<hr/>**评论:**<br/><br/>ponylicious: <pre><p>It says in the Readme: "In the long term you should be using <a href="https://golang.org/x/crypto/acme/autocert">https://golang.org/x/crypto/acme/autocert</a> instead of this package."</p></pre>matttproud: <pre><p><a href="https://github.com/golang/go/issues/17053">golang/go#17053 - doc: add ACME (LetsEncrypt, etc) example docs to the standard library</a> may be worth tracking as well.</p></pre>csssss_: <pre><p>xenolf/lego might fulfill your needs: <a href="https://github.com/xenolf/lego" rel="nofollow">https://github.com/xenolf/lego</a></p></pre>i_regret_most_of_it: <pre><p><a href="https://github.com/ericchiang/letsencrypt" rel="nofollow">https://github.com/ericchiang/letsencrypt</a> has served me well since last December (even if it now links to rsc.io).</p></pre>theqbit: <pre><p><a href="https://github.com/dkumor/acmewrapper" rel="nofollow">https://github.com/dkumor/acmewrapper</a> works very similarly, and is actively maintained.</p></pre>opennota: <pre><p>Thanks. I've looked at the suggested packages, but none of them beats rsc/letsencrypt (which is based on xenolf/lego/acme, btw) in terms of API simplicity; /x/crypto/acme/autocert seems to be most close, but then it doesn't presently do rate limiting (or so its docs say; see the comment for Manager.HostPolicy). So I decided to <a href="https://github.com/opennota/letsencrypt" rel="nofollow">fork</a> rsc/letsencrypt and put my (and some others) improvements on top of it.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传