diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2020-09-03 00:19:58 +0000 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2020-09-03 00:19:58 +0000 |
commit | f472add3a2f726597168bcfa3a886e6f8087c57d (patch) | |
tree | c20a5518f1727568b15e7553453ad1636889de65 | |
parent | 5308969168f28feb340b82be8f0417b4797f3104 (diff) | |
download | lynx-snapshots-f472add3a2f726597168bcfa3a886e6f8087c57d.tar.gz |
snapshot of project "lynx", label v2-9-0dev_5h
-rw-r--r-- | CHANGES | 6 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTTCP.c | 4 | ||||
-rw-r--r-- | lynx.hlp | 174 | ||||
-rw-r--r-- | lynx.man | 20 | ||||
-rw-r--r-- | src/LYMain.c | 4 |
5 files changed, 116 insertions, 92 deletions
diff --git a/CHANGES b/CHANGES index 287c53b6..90d3525a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,11 @@ --- $LynxId: CHANGES,v 1.1053 2020/09/01 08:23:58 tom Exp $ +-- $LynxId: CHANGES,v 1.1054 2020/09/03 00:18:28 tom Exp $ =============================================================================== Changes since Lynx 2.8 release =============================================================================== -2020-09-01 (2.9.0dev.6) +2020-09-02 (2.9.0dev.6) +* add SOCKS5_PROXY environment variable, document the corresponding command + line option as "-socks5_proxy" for consistency (Steffen Nurpmeso, TG) * in configure script, filter out gcc -Werror options where they would interere with configure checks (report by Ryan Schmidt) -TD * minor formatting fixes for manual page (Debian #961080) diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index 2834c2c7..99022e02 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTTCP.c,v 1.155 2020/01/22 01:58:28 tom Exp $ + * $LynxId: HTTCP.c,v 1.156 2020/09/03 00:05:23 Thorsten.Glaser Exp $ * * Generic Communication Code 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; diff --git a/lynx.hlp b/lynx.hlp index fd5ffdfc..25af9e75 100644 --- a/lynx.hlp +++ b/lynx.hlp @@ -696,24 +696,29 @@ disabled, no transfer rate is shown. Use lynx.cfg or the options menu to select KB/second and/or ETA. - -socks5-proxy=URL - (Via which) SOCKS5 proxy to connect. This controls the builtin - SOCKS5 support, and is therefore unrelated to the option - -nosocks. + -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 + "proxy.example.com", "proxy.example.com:1080", "192.168.0.1", or + "192.168.0.1:1080" (and IPv6 notation if so supported). A + SOCKS5 proxy may also be specified via the environment variable + SOCKS5_PROXY. This option controls the builtin SOCKS5 support, + which is unrelated to the option -nosocks. -soft_dquotes - toggles emulation of the old Netscape and Mosaic bug which + toggles emulation of the old Netscape and Mosaic bug which treated ">" as a co-terminator for double-quotes and tags. -source - works the same as dump but outputs HTML source instead of + works the same as dump but outputs HTML source instead of formatted text. For example lynx -source . >foo.html - generates HTML source listing the files in the current - directory. Each file is marked by an HREF relative to the - parent directory. Add a trailing slash to make the HREF's + generates HTML source listing the files in the current + directory. Each file is marked by an HREF relative to the + parent directory. Add a trailing slash to make the HREF's relative to the current directory: lynx -source ./ >foo.html @@ -725,9 +730,9 @@ allow non-http startfile and homepage with -validate. -stderr - When dumping a document using -dump or -source, Lynx normally - does not display alert (error) messages that you see on the - screen in the status line. Use the -stderr option to tell Lynx + When dumping a document using -dump or -source, Lynx normally + does not display alert (error) messages that you see on the + screen in the status line. Use the -stderr option to tell Lynx to write these messages to the standard error. -stdin read the startfile from standard input (UNIX only). @@ -745,25 +750,25 @@ disable recognition of telnet commands. -term=TERM - tell Lynx what terminal type to assume it is talking to. (This - may be useful for remote execution, when, for example, Lynx - connects to a remote TCP/IP port that starts a script that, in + tell Lynx what terminal type to assume it is talking to. (This + may be useful for remote execution, when, for example, Lynx + connects to a remote TCP/IP port that starts a script that, in turn, starts another Lynx process.) -timeout=N - For win32, sets the network read-timeout, where N is given in + For win32, sets the network read-timeout, where N is given in seconds. - -tlog toggles between using a Lynx Trace Log and stderr for trace + -tlog toggles between using a Lynx Trace Log and stderr for trace output from the session. -tna turns on "Textfields Need Activation" mode. - -trace turns on Lynx trace mode. Destination of trace output depends + -trace turns on Lynx trace mode. Destination of trace output depends on -tlog. -trace_mask=value - turn on optional traces, which may result in very large trace + turn on optional traces, which may result in very large trace files. Logically OR the values to combine options: 1 SGML character parsing states @@ -772,7 +777,7 @@ 4 TRST (table layout) - 8 configuration (lynx.cfg, .lynxrc, .lynx-keymaps, mime.types + 8 configuration (lynx.cfg, .lynxrc, .lynx-keymaps, mime.types and mailcap contents) 16 binary string copy/append, used in form data construction. @@ -791,14 +796,14 @@ detailed URL parsing -traversal - traverse all http links derived from startfile. When used with - -crawl, each link that begins with the same string as startfile + traverse all http links derived from startfile. When used with + -crawl, each link that begins with the same string as startfile is output to a file, intended for indexing. See CRAWL.announce for more information. -trim_blank_lines - toggles trimming of trailing blank lines as well as the related + toggles trimming of trailing blank lines as well as the related trimming of blank lines while collapsing BR tags. -trim_input_fields @@ -811,34 +816,34 @@ toggles use of _underline_ format in dumps. -unique_urls - check for duplicate link numbers in each page and corresponding + check for duplicate link numbers in each page and corresponding lists, and reuse the original link number. -update_term_title - enables updating the title in terminal emulators. Use only if + enables updating the title in terminal emulators. Use only if your terminal emulator supports that escape code. Has no effect when used with -notitle. -use_mouse - turn on mouse support, if available. Clicking the left mouse - button on a link traverses it. Clicking the right mouse button - pops back. Click on the top line to scroll up. Click on the - bottom line to scroll down. The first few positions in the top - and bottom line may invoke additional functions. Lynx must be - compiled with ncurses or slang to support this feature. If - ncurses is used, clicking the middle mouse button pops up a - simple menu. Mouse clicks may only work reliably while Lynx is + turn on mouse support, if available. Clicking the left mouse + button on a link traverses it. Clicking the right mouse button + pops back. Click on the top line to scroll up. Click on the + bottom line to scroll down. The first few positions in the top + and bottom line may invoke additional functions. Lynx must be + compiled with ncurses or slang to support this feature. If + ncurses is used, clicking the middle mouse button pops up a + simple menu. Mouse clicks may only work reliably while Lynx is idle waiting for input. -useragent=Name set alternate Lynx User-Agent header. -validate - accept only http URLs (for validation). Complete security + accept only http URLs (for validation). Complete security restrictions also are implemented. -verbose - toggle [LINK], [IMAGE] and [INLINE] comments with filenames of + toggle [LINK], [IMAGE] and [INLINE] comments with filenames of these images. -version @@ -848,17 +853,17 @@ enable vi-like key movement. -wdebug - enable Waterloo tcp/ip packet debug (print to watt debugfile). - This applies only to DOS versions compiled with WATTCP or + enable Waterloo tcp/ip packet debug (print to watt debugfile). + This applies only to DOS versions compiled with WATTCP or WATT-32. -width=NUMBER - number of columns for formatting of dumps, default is 80. This - is limited by the number of columns that Lynx could display, + number of columns for formatting of dumps, default is 80. This + is limited by the number of columns that Lynx could display, typically 1024 (the MAX_LINE symbol). -with_backspaces - emit backspaces in output if -dump'ing or -crawl'ing (like man + emit backspaces in output if -dump'ing or -crawl'ing (like man does) -xhtml_parsing @@ -866,7 +871,7 @@ in an XHTML 1.0 document. For example "<p/>" will be discarded. 2 Commands - More than one key can be mapped to a given command. Here are some of + More than one key can be mapped to a given command. Here are some of the most useful: * Use Up arrow and Down arrow to scroll through hypertext links. @@ -878,108 +883,108 @@ * Type "H", "?", or F1 for online help and descriptions of key-stroke commands. - * Type "k" or "K" for a list of the current key-stroke command + * Type "k" or "K" for a list of the current key-stroke command mappings. - If the same command is mapped to the same letter differing only by + If the same command is mapped to the same letter differing only by upper/lowercase only the lowercase mapping is shown. * Type Delete to view history list. 2 Environment - In addition to various "standard" environment variables such as HOME, - PATH, USER, DISPLAY, TMPDIR, etc, Lynx utilizes several Lynx-specific + In addition to various "standard" environment variables such as HOME, + PATH, USER, DISPLAY, TMPDIR, etc, Lynx utilizes several Lynx-specific environment variables, if they exist. - Others may be created or modified by Lynx to pass data to an external + Others may be created or modified by Lynx to pass data to an external program, or for other reasons. These are listed separately below. - See also the sections on SIMULATED CGI SUPPORT and NATIVE LANGUAGE + See also the sections on SIMULATED CGI SUPPORT and NATIVE LANGUAGE SUPPORT, below. - Note: Not all environment variables apply to all types of platforms - supported by Lynx, though most do. Feedback on platform dependencies + Note: Not all environment variables apply to all types of platforms + supported by Lynx, though most do. Feedback on platform dependencies is solicited. Environment Variables Used By Lynx: COLORTERM If set, color capability for the terminal is forced - on at startup time. The actual value assigned to - the variable is ignored. This variable is only + on at startup time. The actual value assigned to + the variable is ignored. This variable is only meaningful if Lynx was built using the slang screen-handling library. - LYNX_CFG This variable, if set, will override the default - location and name of the global configuration file - (normally, lynx.cfg) that was defined by the + LYNX_CFG This variable, if set, will override the default + location and name of the global configuration file + (normally, lynx.cfg) that was defined by the LYNX_CFG_FILE constant in the userdefs.h file, during installation. See the userdefs.h file for more information. - LYNX_CFG_PATH If set, this variable overrides the compiled-in - search-list of directories used to find the - configuration files, e.g., lynx.cfg and lynx.lss. + LYNX_CFG_PATH If set, this variable overrides the compiled-in + search-list of directories used to find the + configuration files, e.g., lynx.cfg and lynx.lss. The list is delimited with ":" (or ";" for Windows) like the PATH environment variable. LYNX_HELPFILE If set, this variable overrides the compiled-in URL and configuration file URL for the Lynx help file. - LYNX_LOCALEDIR If set, this variable overrides the compiled-in - location of the locale directory which contains + LYNX_LOCALEDIR If set, this variable overrides the compiled-in + location of the locale directory which contains native language (NLS) message text. - LYNX_LSS This variable, if set, specifies the location of - the default Lynx character style sheet file. - [Currently only meaningful if Lynx was built using + LYNX_LSS This variable, if set, specifies the location of + the default Lynx character style sheet file. + [Currently only meaningful if Lynx was built using curses color style support.] - LYNX_SAVE_SPACE This variable, if set, will override the default + LYNX_SAVE_SPACE This variable, if set, will override the default path prefix for files saved to disk that is defined in the lynx.cfg SAVE_SPACE: statement. See the lynx.cfg file for more information. - LYNX_TEMP_SPACE This variable, if set, will override the default - path prefix for temporary files that was defined - during installation, as well as any value that may + LYNX_TEMP_SPACE This variable, if set, will override the default + path prefix for temporary files that was defined + during installation, as well as any value that may be assigned to the TMPDIR variable. MAIL This variable specifies the default inbox Lynx will - check for new mail, if such checking is enabled in + check for new mail, if such checking is enabled in the lynx.cfg file. - NEWS_ORGANIZATION This variable, if set, provides the string used in - the Organization: header of USENET news postings. - It will override the setting of the ORGANIZATION - environment variable, if it is also set (and, on + NEWS_ORGANIZATION This variable, if set, provides the string used in + the Organization: header of USENET news postings. + It will override the setting of the ORGANIZATION + environment variable, if it is also set (and, on UNIX, the contents of an /etc/organization file, if present). - NNTPSERVER If set, this variable specifies the default NNTP - server that will be used for USENET news reading + NNTPSERVER If set, this variable specifies the default NNTP + server that will be used for USENET news reading and posting with Lynx, via news: URL's. - ORGANIZATION This variable, if set, provides the string used in - the Organization: header of USENET news postings. - On UNIX, it will override the contents of an + ORGANIZATION This variable, if set, provides the string used in + the Organization: header of USENET news postings. + On UNIX, it will override the contents of an /etc/organization file, if present. PROTOCOL_proxy Lynx supports the use of proxy servers that can act as firewall gateways and caching servers. They are - preferable to the older gateway servers (see + preferable to the older gateway servers (see WWW_access_GATEWAY, below). - Each protocol used by Lynx, (http, ftp, gopher, - etc), can be mapped separately by setting - environment variables of the form PROTOCOL_proxy. + Each protocol used by Lynx, (http, ftp, gopher, + etc), can be mapped separately by setting + environment variables of the form PROTOCOL_proxy. Protocols are indicated in a URI by the name before ":", e.g., "http" in "http://some.server.dom:port/" for HTML. - Depending on your system configuration and - supported protocols, the environment variables + Depending on your system configuration and + supported protocols, the environment variables recognized by lynx may include cso_proxy @@ -998,9 +1003,12 @@ snews_proxy wais_proxy - See Lynx Users Guide for additional details and + See Lynx Users Guide for additional details and examples. + SOCKS5_PROXY Is inspected if -socks5_proxy has not been used + (for the same content). + SSL_CERT_DIR Set to the directory containing trusted certificates. diff --git a/lynx.man b/lynx.man index 14927858..ece7c71b 100644 --- a/lynx.man +++ b/lynx.man @@ -1,4 +1,4 @@ -.\" $LynxId: lynx.man,v 1.130 2020/05/20 00:34:04 tom Exp $ +.\" $LynxId: lynx.man,v 1.131 2020/09/03 00:05:23 Steffen.Nurpmeso Exp $ .\" ************************************************************************** .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds `` \(lq @@ -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. .TP -.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 \*(``proxy.example.com\*('', +\*(``proxy.example.com:1080\*('', \*(``192.168.0.1\*('', or +\*(``192.168.0.1:1080\*('' (and IPv6 notation if so supported). +A SOCKS5 proxy may also be specified via the environment variable +.B SOCKS5_PROXY. +This option controls the builtin SOCKS5 support, which is unrelated to the option \fB\-nosocks\fP. .TP .B \-soft_dquotes @@ -1138,6 +1145,11 @@ wais_proxy .IP See \fBLynx Users Guide\fR for additional details and examples. .TP +.B SOCKS5_PROXY +Is inspected if +.B \-socks5_proxy +has not been used (for the same content). +.TP .B SSL_CERT_DIR Set to the directory containing trusted certificates. .TP diff --git a/src/LYMain.c b/src/LYMain.c index 6d5166d4..68234478 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYMain.c,v 1.289 2020/02/24 00:17:10 Keith.Bowes Exp $ + * $LynxId: LYMain.c,v 1.290 2020/09/03 00:05:23 Steffen.Nurpmeso Exp $ */ #include <HTUtils.h> #include <HTTP.h> @@ -3916,7 +3916,7 @@ saves session to that file on exit" ), #endif PARSE_STR( - "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!)" ), PARSE_SET( |