]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - cmd/tofuproxy/main.go
Download link for 0.6.0 release
[tofuproxy.git] / cmd / tofuproxy / main.go
index babc8b7e34c34f3cfbe76d7ad9601e4d4edce9d6..625535d527536b627b150da78e65c479c06a5619 100644 (file)
@@ -1,20 +1,18 @@
-/*
-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
-the Free Software Foundation, version 3 of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
+// tofuproxy -- flexible HTTP/HTTPS proxy, TLS terminator, X.509 TOFU
+//              manager, WARC/geminispace browser
+// Copyright (C) 2021-2024 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
+// the Free Software Foundation, version 3 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 package main
 
@@ -29,6 +27,7 @@ import (
        "go.stargrave.org/tofuproxy/fifos"
        "go.stargrave.org/tofuproxy/rounds"
        ttls "go.stargrave.org/tofuproxy/tls"
+       "go.stargrave.org/tofuproxy/warc"
 )
 
 func main() {
@@ -42,6 +41,7 @@ func main() {
        fifosDir := flag.String("fifos", "fifos", "Directory with FIFOs")
        notai := flag.Bool("notai", false, "Do not prepend TAI64N to logs")
        warcOnly := flag.Bool("warc-only", false, "Server only WARC URIs")
+       unzstdPath := flag.String("unzstd", "cmd/zstd/unzstd", "Path to unzstd utility")
        flag.Parse()
        log.SetFlags(log.Lshortfile)
 
@@ -64,6 +64,7 @@ func main() {
        tofuproxy.CAPrv = caPrv
        tofuproxy.X509Algo = *ai
        rounds.WARCOnly = *warcOnly
+       warc.UnZSTDPath = *unzstdPath
 
        ln, err := net.Listen("tcp", *bind)
        if err != nil {