diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-07-13 19:54:39 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-10-12 16:30:11 +0200 |
| commit | 6087f759642cd747d03e43cc57da0a508ccc1d61 (patch) | |
| tree | 3c3261e0d28fd72003e50623b64f80ce22a803ff /src/loader | |
| parent | 47caa59e5d1455484c4e5b08f58177a1b2172f44 (diff) | |
| download | chawan-6087f759642cd747d03e43cc57da0a508ccc1d61.tar.gz | |
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.
Diffstat (limited to 'src/loader')
| -rw-r--r-- | src/loader/loader.nim | 3 |
1 files changed, 3 insertions, 0 deletions
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 |