linux配置代理
Ⅰ Kali linux設置宿主網路代理
這里使用的是clash代理軟體,首先開啟clash找到埠:
接下來打開虛擬機,在這我使用的是Virvirtual box,打開終端輸入:「ip route show」 找到ip地址:
這里我的ip是:10.0.2.2。
接下來打開代理設置:
把Network Proxy設置為手動,將代理ip全部填寫為之前找到的ip地址(我的為:10.0.2.2),埠則是宿主機上的clash埠,最後一行忽略主機無需更改。
填寫完畢直接點X關閉
到此代理設置完畢,接下來可以打開瀏覽器見證奇跡吧!
Ⅱ 如何在Linux上,設置全局代理
設置全局代理,方法如下:
修改 /etc/profile 文件,添加下面內容:
http_proxy=http://username:password@yourproxy:8080/
ftp_proxy=http://username:password@yourproxy:8080/
export http_proxy
export ftp_proxy
如果沒有密碼限制,則以上內容可以修改為以下內容:
http_proxy=http://yourproxy:8080/
ftp_proxy=http://yourproxy:8080/
export http_proxy
export ftp_proxy
Ⅲ linux 設置代理上網
Linux下有很多程序都只有命令行介面,對於這類程序,它們通過代理伺服器(proxy)訪問網路的方式也不盡相同。在本文中Easwy總結了一些常用Linux程序配置代理伺服器的方法。
對於大多數Linux控制台程序,例如Debian或Ubuntu中的 apt-get 和 aptitude 命令、 git 命令、 wget 命令,這些程序都使用 http_proxy 和 ftp_proxy 環境變數來獲取代理服務的配置。
方法是在你的 ~/.bashrc 里加上類似下面的話:
如果你的代理伺服器需要用戶名和密碼才能訪問,需要填寫上面的username和passwd部分,否則的話,省略這兩部分。
這樣配置之後,退出再登錄一次,或者直接使用下面的命令source一下 .bashrc :
現在,上述程序就可以通過代理伺服器訪問網路了。
Ⅳ linux伺服器如何使用代理
不同的代理伺服器設置略有 不同,具體分類操作如下:
設置HTTP及HTTPS代理
對於http及https類型的請求,可以通過設置http_proxy或。方法是export http_proxy=http://proxyaddress:port。
可以寫在$HOME/.bash_profile或/etc/profile中。
設置tsocks代理
見:http://renyongjie668.blog.163.com/blog/static/16005312011824112410588/
有了tsocks代理,其實後面其他設置方式都不是很重要了,幾乎都可以用tsocks來做。
設置SSH代理
同樣用tsocks來實現代理。
Ubuntu中apt-get代理設置
新版的Ubuntu已經不支持export http_proxy就能給apt-get設置代理的方式了。這種方法要用到/etc/apt/文件夾下的apt.conf文件。注意: 某些情況下,系統安裝過程中沒有建立apt配置文件。下面的操作將視情況修改現有的配置文件或者新建配置文件。
sudo vi /etc/apt/apt.conf
在您的apt.conf文件中加入下面這行(根據你的實際情況替換yourproxyaddress和proxyport)。
Acquire::http::Proxy "http://proxyaddress:port";
如果需要用戶名密碼登陸:
Acquire::http::Proxy "http://username:password@proxyaddress:port";
保存apt.conf文件。(其他的協議自己可以適當修改)
Ⅳ linux 如何設置代理
linux設置代理linux系統設置yum,wget,rpm命令使用代理:1.Using
yum
with
a
proxyserver---------------------------------------To
enable
yum
operations
to
use
aproxy
server
you
should
first
add
the
following
parameter
to
/etc/yum.conf
proxy=http://yourproxy:8080/
where
yourproxy
is
the
name
of
the
proxy
server
you
want
to
access
and
8080
isthe
proxy
port.
If
the
server
requires
authentication
you
can
specify
the
logincredentials
like:proxy=http://username:password@yourproxy:8080/---------------------------------------2.
The
rpm
package
manager
makesuse
of
the
proxy
environment
variable.
This
can
be
set
system
wide
in
/etc/profile
or
user
specific
in
~/.bash_profile:export
http_proxy=http://yourproxy:8080/export
ftp_proxy=http://yourproxy:8080/---------------------------------------3.
To
use
wget
throug
a
proxy
serveradd
the
following
lines
to
/etc/wgetrc
http_proxy
=
http://yourproxy:8080/
ftp_proxy
=
http://yourproxy:8080/
Ⅵ 如何在Linux下配置socks5代理
ssh -D xxxx user@hostaddr:port (ssh轉發實現socks5代理.)
使用通設定socks5全局代理.或者瀏覽器使用代理.或者用代理軟體(軟體名socks5.)
例:ssh -D 11111 [email protected]登錄本打11111埠.埠代理埠.使用瀏覽器代理需要填入127.0.0.1:11111配置.通瀏覽器使用代理.
Linux各種各代理程序用象用Squidhttp/https代理能代理ftp請求實際HTTP代理程序ftp代理能處理ftp代理請求象瀏覽器處理ftp請求工作些程序能設置使用socks代理象CuteFTP;象Wu-FTP能設置使用ftp代理(ftp代理標准ftp代理Squid所支持種式);ICQ 2000能同接受https代理Socks代理;NetVampire能接受標准HTTP(GET/POST)代理(Squid支持)HTTP(CONNECT)代理(Squid支持)
使用Cute-FTP,除IP偽裝外要使用Socks代理現讓我看看配置Socks5程:
1. 載文件
載新版socks5源文件/tmp目錄socks5-v1.0r11.tgz
2. 防火牆編譯並安裝(該防火牆應直接連至internet,安裝兩塊網卡雙宿主機假設內部網段
192.168.0.0/24)
cd /tmp
tar -xvfz socks5-v1.0r11.tgz
cd /tmp/socks5-v1.0r11
./configure --with-threads
make
make install
3. 配置文件/etc/socks5.conf
# /etc/socks5.conf
set SOCKS5_MAXCHILD 3
set SOCKS5_NOIDENT
set SOCKS5_TIMEOUT 5
interface 192.168.0. - eth1
auth 192.168.0. - u
permit u - 192.168.0. - - - jephe
permit u - 192.168.0. - - - jack
deny - - - - - - -
4. 配置文件/etc/socks5.passwd
# /etc/socks5.passwd
jephe password_of_jephe_is_here
jack password_of_jephe_is_here
5.始測試
/usr/local/bin/socks5 -f -s
現面信息表示測試功
18210: Socks5 starting at Mon Dec 14 18:23:45 1998 in normal mode
退socks5,始式運行背景模式:
6. 式運行
/usr/local/bin/socks5 -t -s 2> /var/log/socks5
7. 加/etc/rc.d/rc.local
echo "/usr/local/bin/socks5 -t -s 2> /var/log/socks5" >> /etc/rc.d/rc.local
Ⅶ 如何在Linux上,設置全局代理
你好,
如何在Linux上,設置全局代理
vi /etc/profile
最後加入
http_proxy=http://ip:port
export http_proxy
保存、退出
source /etc/profile