通过 Tor 获取更新

Ale*_*der 12 apt tor

我正在尝试更新我的 apt-get 列表。在我的国家/地区,许多网站被公司屏蔽或已被公司屏蔽。

当我为整个系统使用代理时,出现错误, Tor在浏览时运行良好。我可以apt-get通过 Tor 的连接进行更新吗?我的意思是我想使用 Tor 连接解除阻止被阻止的站点,这样我就可以毫无错误地执行apt-get update

编辑:我使用的是 Ubuntu 13.10 和 Tor 0.2.21

$ sudo apt-get update
[sudo] password for alexander: 
Ign http://extras.ubuntu.com saucy InRelease                                   
Ign http://security.ubuntu.com saucy-security InRelease                        
Ign http://us.archive.ubuntu.com saucy InRelease                               
Hit http://extras.ubuntu.com saucy Release.gpg                                 
Get:1 http://dl.google.com stable InRelease [1,540 B]
100% [1 InRelease gpgv 1,540 B] [Waiting for headers] [Waiting for headers]        
[WaSplitting up/var/lib/apt/lists/partial/dl.google.com_linux_chrome_deb_dists_stabIgn  
http://dl.google.com stable InRelease                                      
E: GPG error: http://dl.google.com stable InRelease: Clearsigned file isn't valid, 
got 'NODATA' (does the network require authentication?
Run Code Online (Sandbox Code Playgroud)

Fed*_*ico 9

安装该apt-transport-tor包然后:

编辑/etc/apt/sources.list以将前缀添加tor+到您的存储库。

deb     tor+http://deb.debian.org/debian unstable main
deb-src tor+http://deb.debian.org/debian unstable main
Run Code Online (Sandbox Code Playgroud)

这将允许 apt 越过 Tor。

注意:替换http://deb.debian.org/debian unstable main为适合您的发行版的源。


小智 5

您可以使用torsocks,它是 torify 应用程序的外壳包装器,以简化 Tor socks 的使用。

torsocks apt-get update
Run Code Online (Sandbox Code Playgroud)


A1G*_*ard 1

您必须http://dl.google.com从 apt 源中删除,第一种方法是从软件中心删除或/etc/apt/sources.list使用 root 访问权限进行编辑,阅读它。

如果您使用 kubuntu,您可以使用software center并选择源,点击configure source software并选择其他选项卡删除http://dl.google.com

和之后:

sudo apt-get clean
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

  • 这将阻止 Chrome 更新,而问题是找到更新的方法 (2认同)

Mos*_*rha 1

如果您从终端安装了 Tor,则必须具有torify. 如果是这样,您只需从 Tor 传递任何脚本或程序的流量即可。

首先使用 root 身份sudo su然后运行以下命令:

torify apt-get update
Run Code Online (Sandbox Code Playgroud)

然后您可以使用常规方式更新您的 Google Chrome

apt-get upgrade
Run Code Online (Sandbox Code Playgroud)

我在伊朗,面临着和你一样的问题。我刚刚用这个方法更新了我的 Chrome。