From 6087f759642cd747d03e43cc57da0a508ccc1d61 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 13 Jul 2024 19:54:39 +0200 Subject: gmifetch: rewrite in Nim This finally makes it possible to use socks5 for Gemini. Also slightly refactored the config, to make it easier to pass on the config dir. By the way, the known_hosts file is now stored in the config dir too. The adapter will try to move it to there from the old location. --- src/loader/loader.nim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/loader') diff --git a/src/loader/loader.nim b/src/loader/loader.nim index 9067253f..305d22b4 100644 --- a/src/loader/loader.nim +++ b/src/loader/loader.nim @@ -79,6 +79,7 @@ type w3mCGICompat*: bool tmpdir*: string sockdir*: string + configdir*: string func isPrivileged(ctx: LoaderContext; client: ClientData): bool = return ctx.pagerClient == client @@ -1220,6 +1221,8 @@ proc initLoaderContext(fd: cint; config: LoaderConfig): LoaderContext = putEnv("REMOTE_ADDR", "127.0.0.1") putEnv("GATEWAY_INTERFACE", "CGI/1.1") putEnv("CHA_INSECURE_SSL_NO_VERIFY", "0") + putEnv("CHA_TMP_DIR", config.tmpdir) + putEnv("CHA_CONFIG_DIR", config.configdir) return ctx # This is only called when an OutputHandle could not read enough of one (or -- cgit