aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/main.go b/main.go
index 3cfacac..f008fa3 100644
--- a/main.go
+++ b/main.go
@@ -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)
}
}