diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -2,6 +2,7 @@ package main import ( "bufio" + "crypto/tls" "flag" "fmt" "gemini" @@ -76,12 +77,17 @@ func main() { log.Fatal(err) } + conf := tls.Config{ + MinVersion: tls.VersionTLS12, + InsecureSkipVerify: true, + } + log.Printf("Got %d requests\n", len(requests)) for _, request := range requests { log.Println(request) - if conn, err := gemini.NewGeminiConnFromRequest(request, flags.port); err != nil { + if conn, err := gemini.Parse(request, flags.host, flags.port); err != nil { log.Print(err) - } else if err := conn.Get(gemini.FormatRequest(request), output); err != nil { + } else if err := conn.Get(&conf, output); err != nil { log.Print(err) } } |