1

I've been trying to get a SSL certificate, but my ISP blocks port 80 and my domain service doesn't allow to set CNAME records.

As I way about to give up I stumbled upon autotls which is a feature of some Golang web frameworks and it magically generated a certificate for me.

My question is: How?

Can someone explain this to me?

Gin autotls: https://github.com/gin-gonic/autotls

My code:

package main

import (
  "log"
  "net/http"

  "github.com/gin-gonic/autotls"
  "github.com/gin-gonic/gin"
)

func main() {
  r := gin.Default()

  // Ping handler
  r.GET("/ping", func(c *gin.Context) {
    c.String(http.StatusOK, "pong")
  })

  log.Fatal(autotls.Run(r, "lubiak.k.vu", "mikolaj.minecraftnoob.com"))
}
funtoomen
  • 21
  • 4
  • 2
    Looks like it implements the [TLS-ALPN-01](https://letsencrypt.org/docs/challenge-types/#tls-alpn-01) challenge which only needs access to HTTPS (port 443). – Steffen Ullrich Aug 24 '23 at 10:41
  • @SteffenUllrich for now certbot doesn't support TLS-ALPN-01. What are other cerbot-like SSL certificate generators that support this feature? How can I use it in for example Python aiohttp applications? – funtoomen Aug 24 '23 at 10:51
  • 1
    Your question was about explaining how your code was able to get a certificate and there is no certbot involved here. If you want to know something else please ask a different question (with sufficient details and context), not a comment to an existing one. – Steffen Ullrich Aug 24 '23 at 10:56

0 Answers0