Re: ..on SOCKS5 support

Steffen Nurpmeso <[email protected]>
Newsgroups gmane.comp.web.lynx.devel
Message-ID <20190907232651.83ho6%[email protected]>
Hello Thomas Dickey.

Thomas Dickey wrote in <20190907195941.c2gqjhnuj2pp44az@prl-debianold-64\
.jexium-island.net>:
 |On Sat, Sep 07, 2019 at 08:51:26PM +0200, Steffen Nurpmeso wrote:
 |> I was forced to use lynx via SOCKS5 proxy, which i never did
 |> before.  To my surprise that did not work, it needs an additional
 |> library.  That increased the surprise, because all one needs for
 |> SOCKS5 support, even including the DNS lookup, is to hook
 |> connect(2) -- that is how i did it, as easy as [1].  And in fact
 |
 |That's changed over time - there's no standard/portable implementation
 |of socks5, and (the last time I looked...) none of the extent versions
 |corresponded to what lynx worked with long ago :-)

Well.. i do not know about the history of implementations.  What
i do know is that my implementation is for SOCKS5, which is RFC
1928 from March 1996.  It is a nice and small RFC :)

 |> i became inspired by Gaetan Bisson's usocks-06.c, which can be
 |> used via $LD_PRELOAD, and which got me going.  I will attach it.
 |> 
 |> Wouldn't it be much nicer if there would be a -socks=[HOST]:PORT
 |> command line argument and a simple, always compiled in, wrapper
 |> around connect, just the way i do it (in [1])?
 |
 |that's a thought...

It would be really nice.  When i implemented it i tested via

  $ ssh -D 10000 USER@HOST
  $ mailx -Ssocks-proxy-USER@HOST=localhost:10000

But it must be said, when using OpenSSH's -D in a session where
firefox bombs its multiple dozens of concurrent connections here
i had to restart the ssh twice already today, because of being
totally stuck.  It might be caused by the weak wireless
connectivity that i have, but i am about to ask ssh for what to
do.  (ControlMaster is in use.)

 |> Just in case i find time and the mentioned way seems interesting,
 |> is there somewhere the current development code can be loaded
 |> from?
 |> 
 |>   [1] https://git.sdaoden.eu/cgit/s-nail.git/tree/src/mx/net-socket.c#n48\
 |>   5
 |
 |I put snapshots here, as I make development changes:
 |
 | https://github.com/ThomasDickey/lynx-snapshots

Yes, i know.  (But we know this git mirror sometimes lags behind,
no, not for lynx in particular but for example vile and mawk
i track via this mirror, and just a couple of days ago you seem to
have pushed something to mawk with a six months delay.  I am not
complaining or something, and maybe it had to mature, i did not
look.  It is just that this mirror lags behind reality sometimes.)

 |but don't accept pull-requests -- see
 |
 | https://invisible-island.net/personal/git-exports.html

That i knew too already, but thanks for the link.  I am not at
github myself, so a pull request would not happen, rather a patch
for discussion here on this ML.  Note that i hate autotools, this
would be very hard.  The rest is complicated rather due to the
lynx context only.

Pretty much so it seems, but i will try.  How about
-socks5-proxy=HOST -> STRING, parsed the first time we enter
HtDoConnect() (or where in main()?), and a special my_connect() as
a replacement for the connect(2)s in there, which looks out for
the global socks5_proxy (address stored locally in the file after
initial parse was successful?), and connects through it instead of
the default.  It is pretty much a jungle here ;).  But does this
sound acceptible somehow?  Maybe i find some time next Tuesday or
Wednesday?

Ciao, and a nice Sunday i wish,

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

_______________________________________________
Lynx-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lynx-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.