]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - fifos/start.go
Download link for 0.6.0 release
[tofuproxy.git] / fifos / start.go
index 2f535e25689b9b55983cf7e648e5a516e72f081d..c904a91b3fc927da0e46c458148aacc793dace28 100644 (file)
@@ -1,19 +1,18 @@
-/*
-tofuproxy -- flexible HTTP/WARC proxy with TLS certificates management
-Copyright (C) 2021 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 fifos
 
@@ -41,6 +40,7 @@ func Start(fifos string) {
        go listAccepted(filepath.Join(fifos, "list-accepted"))
        go listHTTPAuth(filepath.Join(fifos, "list-http-auth"))
        go listRejected(filepath.Join(fifos, "list-rejected"))
+       go listRestricted(filepath.Join(fifos, "list-restricted"))
        go listSpies(filepath.Join(fifos, "list-spies"))
        go listTLSAuth(filepath.Join(fifos, "list-tls-auth"))
        go listWARCs(filepath.Join(fifos, "list-warcs"))
@@ -57,10 +57,8 @@ func Start(fifos string) {
                &caches.RejectedM, func(host string) { delete(caches.Rejected, host) },
                filepath.Join(fifos, "del-rejected"),
        )
-       go del(
-               &caches.TLSAuthCacheM, func(host string) { delete(caches.TLSAuthCache, host) },
-               filepath.Join(fifos, "del-tls-auth"),
-       )
+
+       go addRestricted(filepath.Join(fifos, "add-restricted"))
 
        go addSpy(filepath.Join(fifos, "add-spies"))
        go del(
@@ -84,4 +82,10 @@ func Start(fifos string) {
                },
                filepath.Join(fifos, "del-warcs"),
        )
+
+       go addTLSAuth(filepath.Join(fifos, "add-tls-auth"))
+       go del(
+               &caches.TLSAuthCacheM, func(host string) { delete(caches.TLSAuthCache, host) },
+               filepath.Join(fifos, "del-tls-auth"),
+       )
 }