当前位置:网站首页>Setting up a proxy for the WGet command
Setting up a proxy for the WGet command
2020-11-09 11:37:00 【xxjbs001】
by wget Command settings agent
Experimental environment :ubuntu 12.04 LTS goagent
Method 1 、 Set the agent in the environment variable
export http_proxy=http://127.0.0.1:8087
Method 2 、 Use profile
by wget Using agents , Can be modified directly /etc/wgetrc, You can also create a new one in the home folder .wgetrc, And edit the content , This paper adopts the latter .
take /etc/wgetrc China and proxy Copy the relevant lines to ~/.wgetrc, And make the following changes :

#You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
https_proxy = http://127.0.0.1:8087/
http_proxy = http://127.0.0.1:8087/
ftp_proxy = http://127.0.0.1:8087/
# If you do not want to use proxy at all, set this to off.
use_proxy = on

here use_proxy = on Opened the agent , If you don't want to use a proxy , It's troublesome to modify this file every time , We can use -Y Parameters are set in the future :
-Y, --proxy=on/off Turn the agent on or off
Method 3 、 Use -e Parameters
wget There is no command line parameter set specifically for the agent itself , But there is one "-e" Parameters , You can specify on the command line that an original appears in ".wgetrc" Settings in . So you can specify a proxy on the command line in disguise :
-e, --execute=COMMAND perform `.wgetrc' Format order
for example :
wget -c -r -np -k -L -p -e "http_proxy=http://127.0.0.1:8087" http://www.subversion.org.cn/svnbook/1.4/
This is especially convenient for using a temporary proxy .
notes : If it is https, Then the parameter is :-e "https_proxy=http://127.0.0.1:8087"
Use https If you want to ignore the server-side certificate verification , have access to -k Parameters .
版权声明
本文为[xxjbs001]所创,转载请带上原文链接,感谢
边栏推荐
- 手写Koa.js源码
- For and for... In, for each and map and for of
- Handwriting Koa.js Source code
- Capture bubbles? Is browser a fish?
- Front end code style practice prettier + eslint + git hook + lint staged
- 理解 OC 中 RunLoop
- nodejs学习笔记(慕课网nodejs从零开发web Server博客项目)
- 配置交换机Trunk接口流量本地优先转发(集群/堆叠)
- Depth analysis based on synchronized lock
- Three practical skills of Medical Project Management
猜你喜欢
医疗项目管理的三种实用技巧
Reading design patterns adapter patterns
Impact of libssl on CentOS login
20201107第16课,使用Apache服务部署静态网站;使用Vsftpd服务传输文件
程序人生|从网瘾少年到微软、BAT、字节offer收割机逆袭之路
Dynamo: a typical distributed system analysis
range_sensor_layer
一个简单的能力,决定你是否会学习!
真正拖垮你的,是沉没成本
Method of creating flat panel simulator by Android studio
随机推荐
开源ERP招聘了
解决IDEA快捷键 Alt+Insert 失效的问题
Adobe Experience Design /Xd 2020软件安装包(附安装教程)
Visit Jingdong | members of Youth Innovation Alliance of China Academy of space technology visit Jingdong headquarters
Recommendation system, in-depth paper analysis gbdt + LR
SQL第二章第三章
1450. 在既定时间做作业的学生人数
iPhone“连到系统上的设备没有发挥作用”原因分析及解决方法 20200105
手写Koa.js源码
Aren't you curious about how the CPU performs tasks?
程序人生|从网瘾少年到微软、BAT、字节offer收割机逆袭之路
Visual Studio (MAC) installation process notes
Android Development - service application, timer implementation (thread + service)
Glsb involves load balancing algorithm
Interview summary on November 7, 2020 (interview 12K)
在企业的降本增效诉求下,Cube如何助力科盾业务容器化“一步到位”?
inet_pton()和inet_ntop()函数详解
“微服务”技术另一个可能更合适的名字
As a user, you can't get rid of the portrait!
From the practice, this paper discusses the problems caused by the inconsistent design of ruby syntax.