Add proxy support - tor. - gopherbay - piratebay gopher interface
 (HTM) git clone git://bitreich.org/gopherbay git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopherbay
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 2c20385c9b3becf36b5000b4ac76c2f7f2a4d09e
 (DIR) parent 811b446574ec4893fcba994b3c846692a66fed6e
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       Date:   Sun, 11 Jan 2026 19:12:39 +0100
       
       Add proxy support - tor.
       
       Diffstat:
         M index.dcgi                          |      25 ++++++++++++++++++-------
       
       1 file changed, 18 insertions(+), 7 deletions(-)
       ---
 (DIR) diff --git a/index.dcgi b/index.dcgi
       @@ -1,7 +1,7 @@
        #!/usr/bin/env python
        # coding=utf-8
        #
       -# © 2025 Christoph Lohmann <20h@r-36.net>
       +# © 2025-2026 Christoph Lohmann <20h@r-36.net>
        #
        # This file is published under the terms of the GPLv3.
        #
       @@ -82,6 +82,11 @@ trackers = [
                "udp://open.stealth.si:80/announce"
        ]
        
       +proxies = {
       +        "http": "socks5h://localhost:9050",
       +        "https": "socks5h://localhost:9050"
       +}
       +
        def main(args):
                if len(args) != 7:
                        sys.stderr.write("Must be run as geomyidae dcgi.\n")
       @@ -143,25 +148,31 @@ def main(args):
                def search(q=""):
                        if q == "":
                                return requests.get(pb_data % (pb_precompiled,\
       -                                        "top100", "all")).json()
       +                                        "top100", "all"),\
       +                                        proxies=proxies).json()
                        elif q.startswith("recent"):
                                if ":" in q:
                                        (q, category) = q.split(":", 1)
                                        return requests.get(pb_data % (pb_precompiled,\
       -                                        "top100_48h", category))
       +                                        "top100_48h", category),\
       +                                        proxies=proxies)
                                else:
                                        return requests.get(pb_data % (pb_precompiled,\
       -                                        "top100", "recent"))
       +                                        "top100", "recent"),\
       +                                        proxies=proxies)
                        elif q.startswith("top"):
                                if ":" in q:
                                        (q, category) = q.split(":", 1)
                                        return requests.get(pb_data % (pb_precompiled,\
       -                                        "top100", category))
       +                                        "top100", category),\
       +                                        proxies=proxies)
                                else:
                                        return requests.get(pb_data % (pb_precompiled,\
       -                                        "top100", "all"))
       +                                        "top100", "all"),\
       +                                        proxies=proxies)
                        else:
       -                        return requests.get(pb_search, params={"q":q}).json()
       +                        return requests.get(pb_search, params={"q":q},\
       +                                        proxies=proxies).json()
        
                # Proudly taken from parazyd.
                def print_category(c):