rkd77 / elinks

Fork of elinks
Other
344 stars 36 forks source link

Please add support for SOCKS4a/5 proxies #31

Open aelmahmoudy opened 5 years ago

aelmahmoudy commented 5 years ago

Please add support for SOCKS4a/5 proxies, they are useful as they send DNS requests through the proxy. Browsing of .onion addresses wouldn't be possible without this support (except using socat workarounds, which is really ugly)

rkd77 commented 5 years ago

socksify is not sufficient?

rkd77 commented 5 years ago

SOCKS_SERVER=$somehost:$port socksify elinks --no-libevent socksify is part of dante-client package. I surely won't do it better.

aelmahmoudy commented 5 years ago

On Thu, May 02, 2019 at 11:28:10AM -0700, rkd77 wrote:

SOCKS_SERVER=$somehost:$port socksify elinks --no-libevent socksify is part of dante-client package. I surely won't do it better. ---end quoted text---

socksify is not available here. I tried tsocks, but it failed.

-- ‎أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer GPG KeyIDs: 4096R/A7EF5671 2048R/EDDDA1B7 GPG Fingerprints: 6E2E E4BB 72E2 F417 D066 6ABF 7B30 B496 A7EF 5761 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

rkd77 commented 5 years ago

I tried ssh -N -D 1080 localhost . In the second terminal: tsocks elinks --no-libevent and I was able to visit some sites.

aelmahmoudy commented 5 years ago

I tried ssh -N -D 1080 localhost . In the second terminal:

what does this line do ? How does tsocks use port 1080 ?

were you able to visit .onion websites ?

-- ‎أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer GPG KeyIDs: 4096R/A7EF5671 2048R/EDDDA1B7 GPG Fingerprints: 6E2E E4BB 72E2 F417 D066 6ABF 7B30 B496 A7EF 5761 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

aelmahmoudy commented 5 years ago

I tried: SOCKS_PASSWORD=foo SOCKS5_SERVER=localhost:9050 socksify elinks --no-libevent --no-connect

yet it also doesn't work with *.onion websites

the problem is that DNS requests seem to not be routed through the socks proxy even though I am using socks5

-- ‎أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer GPG KeyIDs: 4096R/A7EF5671 2048R/EDDDA1B7 GPG Fingerprints: 6E2E E4BB 72E2 F417 D066 6ABF 7B30 B496 A7EF 5761 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

rkd77 commented 5 years ago

You can try to disable async dns in elinks and run torsocks instead of socksify or tsocks.

aelmahmoudy commented 5 years ago

You can try to disable async dns in elinks and run torsocks instead of socksify or tsocks.

That worked ! Thanks..

-- ‎أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer GPG KeyIDs: 4096R/A7EF5671 2048R/EDDDA1B7 GPG Fingerprints: 6E2E E4BB 72E2 F417 D066 6ABF 7B30 B496 A7EF 5761 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7

slackhead commented 4 years ago

Hi,

I just want to add that I've been using proxychains-ng with elinks/felinks successfully for a while now. Once there is a config file you only need to:

proxychains4 -q elinks

Different config files can be used with -f.

Hope this helps.