From 42e81ee859eb0edb93248758a0d5d0260f8f79a1 Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Tue, 12 May 2020 21:20:36 +0200 Subject: [PATCH] Don't assume a gopher-to-gemini proxy is running on localhost by default. --- av98.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/av98.py b/av98.py index 3ae3f5c..bb530e2 100755 --- a/av98.py +++ b/av98.py @@ -251,9 +251,9 @@ class GeminiClient(cmd.Cmd): "debug" : False, "ipv6" : True, "timeout" : 10, - "gopher_proxy" : "localhost:1965", "width" : 80, "auto_follow_redirects" : True, + "gopher_proxy" : None, } self.log = { @@ -280,6 +280,12 @@ class GeminiClient(cmd.Cmd): if gi.scheme in ("http", "https"): webbrowser.open_new_tab(gi.url) return + elif gi.scheme == "gopher" and not self.options.get("gopher_proxy", None): + print("""AV-98 does not speak Gopher natively. +However, you can use `set gopher_proxy hostname:port` to tell it about a +Gopher-to-Gemini proxy (such as a running Agena instance), in which case +you'll be able to transparently follow links to Gopherspace!""") + return elif gi.scheme not in ("gemini", "gopher"): print("Sorry, no support for " + gi.scheme) return