X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=trip.go;h=60262295ed5f2c3d91db632d30b9f7c4d9b6bced;hb=6eee3c6c83cc535855e254426a90f7a2abba04ce;hp=b217750205cf26561be27e65f47ce20bb0ef3e2c;hpb=bae1cfe5ce46a1b758ccc4dddda2751b6ac47f3e;p=tofuproxy.git diff --git a/trip.go b/trip.go index b217750..6026229 100644 --- 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 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,