1

I try to setup the Advanced Packaging Tool (apt-get) to work over TOR. The Web-Browser is working fine, YouTube-DL needs --proxy "socks5://127.0.0.1:9050", wget douse not work

wget: unable to resolve host address

and some other Programs working fine over TOR

I already tryd this all:


torrc

SOCKSPort 127.0.0.1:9050
HTTPTunnelPort 127.0.0.1:3030

/etc/environment

http_proxy="http://127.0.0.1:3030"

bash.bashrc

export https_proxy=https://127.0.0.1:3030

/etc/apt/apt.conf

Acquire::http::Proxy "http://127.0.0.1:3030";

System-Proxy-Configuration


apt update


Editors


1

apt-get does not support socks proxies. You need to be sure if the tool you are using does have support to it. That is probably why you get those "405" messages.

Method 1

Privoxy is the guy you should check out to "convert" your socks5 connections into http proxy, so you will have a local http proxy without cache.

First, clear your http_proxy variable, but keep your tor service running and installed. After that, install privoxy:

sudo apt install privoxy

Edit /etc/privoxy/config and add the following line(no mistakes here, there is a dot at the end of the line)

forward-socks5 / localhost:9050 .

This way, all your requests to privoxy will be redirect to tor. Ascii art to help :)

+--------+http +---------+socks5 +------+
| apt|get+-----> privoxy +------>+ tor  +--------> INTERNET
+--------+     +---------+       +------+

Restart privoxy and export the http_variable

sudo systemctl restart privoxy
http_proxy="localhost:8118"

Method 2

Use torsocks to encapsulate all your requests through tor. On this second method, i'm still assuming you have tor already working and configured on it's default ports.

sudo apt install torsocks

Then

sudo torsocks apt update
  • If all the data go´s through a proxy, my online games will have a terrible ping. – Bandoler Apr 5 at 17:32
  • nice... torsocks is working fine. THX -- VLC streaming over *TOR is not working anymore, in Ubuntu 16.04 it works on the same settings as i have now in 18.04? – Bandoler Apr 5 at 18:00
  • Well, about VLC, it seems that it never officially supported socks5 as you can see here - trac.videolan.org/vlc/ticket/20675?cversion=0&cnum_hist=6 - Try using torsocks too :) . If you take a time to think, this "proxy" done by privoxy is only a "translator" from socks5 to http, and it listens to your localhost address. I can't imagine how it would interfere with your gaming if don't use it. – user34720 Apr 5 at 18:23
  • I already try´d torsocks with vlc by starting vlc in command line torsocks vlc but it douse not work. I trying to install Privoxy from source code but it douse not work. I followed the INSTALL instruction but the program won´t get installed. – Bandoler Apr 5 at 19:00
  • It is at least compiling? ( make works but make install dont) – user34720 Apr 5 at 19:07
0

There is a typo on your http(s) settings. It missing a //

It should be:

http_proxy="http://127.0.0.1:3030"
https_proxy="https://127.0.0.1:3030"
  • its just in this trade – Bandoler Apr 5 at 17:02
  • I added the second line https_proxy="127.0.0.1:3030". Still not working. – Bandoler Apr 5 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.