]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - trip.go
Another spy
[tofuproxy.git] / trip.go
diff --git a/trip.go b/trip.go
index b217750205cf26561be27e65f47ce20bb0ef3e2c..4f3e1d6de56ac6e86bf174abe481caf9227d5ae1 100644 (file)
--- a/trip.go
+++ b/trip.go
@@ -1,6 +1,7 @@
 /*
-tofuproxy -- flexible HTTP/WARC proxy with TLS certificates management
-Copyright (C) 2021 Sergey Matveev <stargrave@stargrave.org>
+tofuproxy -- flexible HTTP/HTTPS proxy, TLS terminator, X.509 TOFU
+             manager, WARC/geminispace browser
+Copyright (C) 2021-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -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{}{
@@ -63,7 +65,7 @@ func roundTrip(w http.ResponseWriter, req *http.Request) {
        fifos.LogReq <- fmt.Sprintf("%s %s", req.Method, req.URL)
        host := strings.TrimSuffix(req.URL.Host, ":443")
        for _, round := range []Round{
-               rounds.RoundNoHead,
+               rounds.RoundGemini,
                rounds.RoundWARC,
                rounds.RoundDenySpy,
                rounds.RoundRedditOld,