AV-98-fork

A fork of https://tildegit.org/solderpunk/AV-98
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit 42e81ee859eb0edb93248758a0d5d0260f8f79a1
parent a05ecfad4fb34eb4a06aee3bd56ca2872ddabc82
Author: Solderpunk <solderpunk@sdf.org>
Date:   Tue, 12 May 2020 21:20:36 +0200

Don't assume a gopher-to-gemini proxy is running on localhost by default.

Diffstat:
Mav98.py | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 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