電訊茶室's Archiver

角色 發表於 2019-4-2 21:11

Raspberry Pi —— Connecting a proxy server

[i=s] 本帖最後由 角色 於 2019-4-3 08:53 編輯 [/i]

如果你家里有proxy server (上外国网站,如果V2Ray),那么你家里的Raspberry Pi就可以科学上网。假如你家里有一台proxy server,IP address = 192.168.55.22, 还有接过去不需要credentials(login name and password)。在Raspberry Pi forum里,就有一篇关于怎样设置[1],但是具体怎样set,在[1]最后的一个链接最为重要[2]。

1. Edit /etc/apt/apt.conf.d/10proxy[code]
sudo vi /etc/apt/apt.conf.d/10proxy
[/code], 输入下面句子:[code]
Acquire::http::Proxy "http://192.168.55.22:1080";
Acquire::https::Proxy "https://192.168.55.22:1080";
[/code]2. Edit /etc/environment[code]
sudo vi /etc/environment
[/code],

输入下面句子[code]
export http_proxy="http://192.168.55.22:1080"
export https_proxy="https://192.168.55.22:1080"
export no_proxy="localhost, 127.0.0.1"
[/code],

然后重新启动Raspberry  Pi就可以科学上网。

References:
[1] [url]https://www.raspberrypi.org/forums/viewtopic.php?t=18634[/url]
[2] [url]https://theailearner.com/2018/03/13/connecting-raspberry-pi-to-proxy-server/[/url]

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.