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"))
}