skyjake/lagrange Issue #182: Add support for SOCKS 5

Repo Home
Issues

2021-02-27 01:35:00 ElonSatoshi

There are lots of gopherholes that end in .onion.

Comments (13)

2021-02-27 22:23:01 Br0000k

I think SOCKS4 and SOCKS5 are worth implementing but I don't think we should start implementing Tor. lagrange is a small project that is still in early days and has multiple bugs, and I don't think deciding whether to support a protocol or not should be taken lightly.

Tor is an anonymity network and implementing it would be unnecessary and inappropriate for Geminispace. Finding critical bugs and vulnerabilities in lagrange to improves its security would be much more useful.

There are lots of gopherholes that end in .onion.

I don't think the prevalence of gopherholes ending in .onion really matters.

2021-02-28 03:33:52 ElonSatoshi

If socks5 support is implemented, people will be able to set the proxy to socks5://127.0.0.1:9050 and use Lagrange over Tor. That's really all I was hoping for when I made this issue.

I don't think the prevalence of gopherholes ending in .onion really matters.

Connections to hidden services over Tor are secured by Tor's encryption, much like TLS secures Gemini connections or HTTPS connections. This can be done without needing to extend the gopher protocol to include TLS and requiring a server and client that support it. So even just having socks5 proxy support would allow people to connect more securely to gopherholes that run over Tor.

2021-02-28 04:35:47 skyjake

SOCKS 5 has other uses beyond Tor access, so it would be a nice to have feature.

2021-02-28 18:47:22 Br0000k

SOCKS 5 has other uses beyond Tor access, so it would be a nice to have feature.

I agree. SOCKS4 might also be worth implementing and it shouldn't be too difficult.

2021-03-08 03:58:52 ElonSatoshi

In the meantime, I just discovered that Lagrange works perfectly (so far) with Torsocks. To use Lagrange over Tor:

1. Download the appimage.

2. Run it in a terminal with: `torsocks ./Lagrange-*.AppImage`.

Tested by loading a gemini capsule, a gopherhole, and a .onion gopherhole.

Edit: Assuming you're using the appimage (tested on Fedora 33), all Lagrange files (cookies, history, settings etc) should be in ~/.config/lagrange/. To reset it entirely, use a secure delete tool like `wipe`, `shred`, or `srm` to delete that folder, or just certain stuff from there such as history.

However, Lagrange's documentation says that its history doesn't log every single time you visit or revisit a site at exactly what time, instead it shows a list of unique URLs you've visited with the ones you've visited or revisited most recently shown first. It may also be useful to note that I don't think Gopher or Gemini have cookies, referers, or send info about what client you're using to servers. And every page you load makes only 1 request, there are no pictures automatically loaded, CSS themes, javascript, or embedded third party pages.

Nevertheless, do your own research, be careful, and use Tails OS if you can.

2021-04-18 18:50:25 ghost

This feature would be very useful even outside of the Tor context, as sometimes in a corporate environment the user must use an HTTP or SOCKS proxy for internet access. So far I can use `proxychains-ng` to get around this and pipe all traffic through a SOCKS5 proxy, but unfortunately this prevents me from using flatpak as `proxychains-ng` is not available in the runtime.

2021-11-09 23:07:39 tidux

Even ignoring TOR entirely there are some use cases like circumventing DNS filtering or public wifi blocking everything but "well known" ports that are useful to use a SOCKS5 proxy like `ssh -D` to avoid. The user action for that looks something like this:

$ ssh -p443 -nND 8080 user@remote.host &
$ lagrange --socks5-proxy=localhost:8080

2022-07-21 17:27:52 marek22k

This feature would also be interesting for I2P (https://geti2p.net/). I2P is a darknet similar to Tor, but with a focus on internal services. In I2P there was already a discussion how to do it (http://zzz.i2p/topics/3113-gemini-protocol-over-i2p). The easiest way would be to have SOCKS support, since I2P (like Tor) also offers a SOCKS proxy.

2022-07-30 03:06:02 ggramaize

This feature would also be helpful for communication over constrained channels where performance enhancing proxies are used to establish and handle communications (eg SATCOM services, HF radio).

2023-01-06 09:45:37 CyberTailor

afaik, [dante](https://github.com/nextgis/dante/blob/master/doc/README.usage) is a go-to library for socks proxy support

just include `socks.h`, link with `-lsocks` and use [`SOCKS_SERVER`](https://www.inet.no/dante/doc/1.4.x/socksify.1.html) environment variable

2023-01-07 10:17:33 CyberTailor

Found a small library that allows configuration, see example:

https://github.com/brechtsanders/proxysocket/blob/master/examples/ipify.c

2023-01-13 22:08:54 CyberTailor

Tried to get Dante working with Lagrange... It seems like the_Foundation needs to be linked against it, however I doubt if it is desired.

2024-04-29 00:45:17 d47081

Signed to subject, wanted for [Yggstack](https://github.com/yggdrasil-network/yggstack) connection also