[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lynx-dev] SOCKS5_PROXY (was Re: the sun, the sun)

From: Thorsten Glaser
Subject: [Lynx-dev] SOCKS5_PROXY (was Re: the sun, the sun)
Date: Sun, 9 Aug 2020 16:13:13 +0000 (UTC)

Turns out you do not even need a magic value. You tried a
premature optimisation, but Lynx calls LYGetEnv for the
other *_proxy variables each time as well, so dropping the
premature optimisation and switching to LYGetEnv and fixing
a bug in the man(7)page results in:

--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -1848,6 +1848,8 @@ int HTDoConnect(const char *url,
     *s = -1;                   /* nothing is open yet */
     /* In case of a present SOCKS5 proxy, marshal */
+    if (socks5_proxy == NULL)
+       socks5_proxy = LYGetEnv("SOCKS5_PROXY");
     if ((socks5_orig_url = socks5_proxy) != NULL) {
        int xport;
--- a/
+++ b/
@@ -805,9 +805,16 @@ If enabled the transfer rate is shown in bytes/second.
 If disabled, no transfer rate is shown.
 Use lynx.cfg or the options menu to select KB/second and/or ETA.
-.B \-socks5\-proxy=URL
-(Via which) SOCKS5 proxy to connect.
-This controls the builtin SOCKS5 support, and is therefore unrelated to
+.B \-socks5_proxy=URL
+(Via which) SOCKS5 proxy to connect: any network traffic, including all
+DNS resolutions but the one for URL itself, will be redirected through
+the SOCKS5 proxy.
+URL may be given as \*(``\*('',
+\*(``\*('', \*(``\*('', or
+\*(``\*('' (and IPv6 notation if so supported).
+A SOCKS5 proxy may also be specified via the environment variable
+This option controls the builtin SOCKS5 support, which is unrelated to
 the option \fB\-nosocks\fP.
 .B \-soft_dquotes
@@ -1139,6 +1146,11 @@ wais_proxy
 See \fBLynx Users Guide\fR for additional details and examples.
+Is inspected if
+.B \-socks5_proxy
+has not been used (for the same content).
 Set to the directory containing trusted certificates.
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -3916,7 +3916,7 @@ saves session to that file on exit"
-      "socks5-proxy",  2|NEED_LYSTRING_ARG,    socks5_proxy,
+      "socks5_proxy",  2|NEED_LYSTRING_ARG,    socks5_proxy,
       "=URL\n(via which) SOCKS5 proxy to connect (unrelated to -nosocks!)"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]