导航:首页 > 配服务器 > linux中如何添加代理服务器

linux中如何添加代理服务器

发布时间:2024-01-30 22:42:03

❶ 【proxy】linux上各类代理设置

代理服务器(Proxy Server)是个人网络和Internet服务商之间的中间代理机构,它负责转发合法的网络信息,对转发进行控制和登记。

代理服务器作为连接Internet(广域网)与Intranet(局域网)的桥梁,在实际应用中发挥着极其重要的作用。

Linux下有很多程序都只有命令行接口,对于这类程序,它们通过代理服务器(proxy)访问网络的方式也不尽相同。

本文总结了一些常用Windows/Linux程序配置代理服务器的方法。

对于大多数Linux控制台程序,例如 Debian 或Ubuntu中的apt-get和aptitude命令、 git命令 、wget命令,这些程序都使用http_proxy和ftp_proxy环境变量来获取代理服务的配置。

# export  http_proxy="http://username:password@proxyServer:port/"

# export  https_proxy="http://username:password@proxyServer:port/"

# export ftp_proxy="http://username:password@proxyServer:port/"

# export no_proxy="127.0.0.1,192.168.124.0/16,*.example.com"

如果你的代理服务器需要用户名和密码才能访问,需要填写上面的username和passwd部分,否则的话,省略这两部分。

proxyServer为代理服务器的域名(如果能解析)或者IP。

no_proxy 设置你明确不需要走代理的IP 域名 网段之类,用逗号隔开,如网络要求访问外网走代理,访问内网无需走代理的情况。

# export  http_proxy="http://proxyServer:port/"

# export  https_proxy="http:/proxyServer:port/"

# export ftp_proxy="http://proxyServer:port/"

将代理设置添加到环境文件

# cat  >>  /etc/profile  << EOF

export  http_proxy="http://username:password@proxyServer:port/"

export  https_proxy="http://username:password@proxyServer:port/"

export ftp_proxy="http://username:password@proxyServer:port/"

export no_proxy="127.0.0.1,192.168.124.0/16,*.example.com"

EOF

#  source    /etc/profile 

#  unset  http_proxy

#  unset https_proxy

#  unset  ftp_proxy

#  unset  no_proxy

set  http_proxy="http://username:password@proxyServer:port/"

set https_proxy="http://username:password@proxyServer:port/"

set  ftp_proxy="http://username:password@proxyServer:port/"

set  no_proxy="127.0.0.1,192.168.124.0/16,*.example.com"

谷歌浏览器访问:chrome://settings/

其他浏览器代理设置,大同小异,无需赘言了!

因为某些原因,国内网络访问 Docker Hub 拉取官方 Docker 镜像时经常超时。怎么解决呢?可以使用 HTTP 代理来加速访问。

国内稍具规模的中大型技术公司应该有正常访问国外网站的代理服务器。

#  mkdir -p  /etc/systemd/system/docker.service.d

#  vim  /etc/systemd/system/docker.service.d/http-proxy.conf

###############################################################

[Service]

Environment="HTTP_PROXY=http://username:password@proxyServer:port/"

Environment="HTTPS_PROXY=http://username:password@proxyServer:port/"

Environment="NO_PROXY=localhost,127.0.0.1"

###############################################################

# systemctl  daemon-reload

# systemctl restart docker

# docker info  | grep  -i proxy

# docker build  --help

# docker build  \

--build-arg  http_proxy="http://username:password@proxyServer:port/"  \ 

--build-arg  https_proxy="http://username:password@proxyServer:port/"  \

-f Dockerfile  \

-t  sonatype/nexus3:3.5.2  .

Linux下代理服务器(proxy)配置

https://www.cnblogs.com/klb561/p/9175583.html

docker代理配置

https://blog.frognew.com/2017/01/docker-http-proxy.html

Control Docker with systemd

https://docs.docker.com/config/daemon/systemd/#httphttps-proxy

❷ 如何在Linux下使用代理服务器

linux自带firefox 打开FireFox,编辑->首选项->常规->连接 设置FF访问因特网的方式 连接设置 手动配置代理 然后输入代理服务器IP和端口号即可。

❸ 如何在linux环境下搭建Tor代理服务器

以下的安装在是centos6.5_64x系统上进行的。
centos系统默认yum源是找不到tor安装包的,若yum install tor提示未找到安装包,需要添加epel yum外部源。EPEL (Extra Packages for Enterprise Linux) 是Fedora小组维护的一个软件仓库项目,为RHEL/CentOS提供他们默认不提供的软件包。稿闷这个源兼容RHEL及像CentOS和Scientific Linux这样的衍生版本。
安装步骤如下:
yum install tor 若是提示未找到tor安装包,查看 /etc/yum.repos.d/下是否有epel.repo文件,若没有,说明系统未添加epel yum外部源,需要手动添加,若已经添加epel外部源,可直接安装tor,则跳过2-6步骤。
根据你的操作系统,从网站获取对应的epel 的安装包,centos6.5_64位系统获取的安装包如下 (查誉孙看系统版本指令lsb_release -a && uname -a)wgethttp://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-5.noarch.rpm
安装成功后可看到 /etc/键虚弯yum.repos.d/目录下多了epel.repo 与epel-testing.repo文件
yum clean all
yum makecache
yum install tor

❹ 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下使用代理服务器

本用xp+ccproxy做代理服务器总掉线查原所想用linux做代理服务器没用linux知道需要用哪些软件配置哪位高手能指点奉我所积累数QQ能够线问我笨

阅读全文

与linux中如何添加代理服务器相关的资料

热点内容
eb蜜罐原理及源码 浏览:803
命令界面怎么调大小 浏览:890
公共测试服务器做什么的 浏览:746
湖南网络服务器云空间 浏览:365
做博客需要什么app 浏览:548
查看网站编程语言 浏览:302
我的世界服务器的密码怎么弄 浏览:644
电脑文件夹如何传输视频不压缩 浏览:145
安卓对单片机编程 浏览:728
被加密的txt 浏览:927
单片机汇编调用子程序 浏览:253
小米定位服务器地址 浏览:612
有什么好的学画app 浏览:882
5线4相步进电机单片机控制 浏览:293
linux重启php命令行 浏览:999
加密软件gif 浏览:761
取字符串的前几位java 浏览:312
车铣复合雕花编程教学 浏览:904
android图片等比例缩放 浏览:355
javaset使用方法 浏览:339