]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - trip.go
gemini:// support
[tofuproxy.git] / trip.go
diff --git a/trip.go b/trip.go
index b217750205cf26561be27e65f47ce20bb0ef3e2c..60262295ed5f2c3d91db632d30b9f7c4d9b6bced 100644 (file)
--- a/trip.go
+++ b/trip.go
@@ -1,5 +1,6 @@
 /*
-tofuproxy -- flexible HTTP/WARC proxy with TLS certificates management
+tofuproxy -- flexible HTTP proxy, TLS terminator, X.509 certificates
+             manager, WARC/Gemini browser
 Copyright (C) 2021 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
@@ -30,6 +31,7 @@ import (
        "go.stargrave.org/tofuproxy/caches"
        "go.stargrave.org/tofuproxy/fifos"
        "go.stargrave.org/tofuproxy/rounds"
+       ttls "go.stargrave.org/tofuproxy/tls"
 )
 
 var (
@@ -41,7 +43,7 @@ var (
                MaxIdleConns:        http.DefaultTransport.(*http.Transport).MaxIdleConns,
                IdleConnTimeout:     http.DefaultTransport.(*http.Transport).IdleConnTimeout * 2,
                TLSHandshakeTimeout: time.Minute,
-               DialTLSContext:      dialTLS,
+               DialTLSContext:      ttls.DialTLS,
                ForceAttemptHTTP2:   true,
        }
        proxyHeaders = map[string]struct{}{
@@ -64,6 +66,7 @@ func roundTrip(w http.ResponseWriter, req *http.Request) {
        host := strings.TrimSuffix(req.URL.Host, ":443")
        for _, round := range []Round{
                rounds.RoundNoHead,
+               rounds.RoundGemini,
                rounds.RoundWARC,
                rounds.RoundDenySpy,
                rounds.RoundRedditOld,