当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Gather in Beijing! Openi / O 2020 Qizhi Developer Conference enters countdown
- Wealth and freedom? Ant financial services suspended listing, valuation or decline after regulation
- 理解Task和和async await
- Handwriting Koa.js Source code
- 一个简单的能力,决定你是否会学习!
- Android 复选框 以及回显
- Android Development - service application, timer implementation (thread + service)
- 抢球鞋?预测股市走势?淘宝秒杀?Python表示要啥有啥
- 使用流读文件写文件处理大文件
- AI应届生年薪涨到40万了,你现在转行还来得及!
猜你喜欢

安卓开发——服务应用,计时器的实现(线程+服务)

Analysis of the source code of ThinkPHP facade

What details does C + + improve on the basis of C

AI应届生年薪涨到40万了,你现在转行还来得及!

彩虹排序 | 荷兰旗问题

使用rem,做到屏幕缩放时,字体大小随之改变

《内网安全攻防》配套视频 之 利用PS查询域内信息

Stack & queue (go) of data structure and algorithm series

From the practice, this paper discusses the problems caused by the inconsistent design of ruby syntax.

1486. 数组异或操作
随机推荐
Reading design patterns adapter patterns
How to ensure that messages are not consumed repeatedly? (how to ensure the idempotent of message consumption)
Rainbow sorting | Dutch flag problem
开源ERP招聘了
AI fresh student's annual salary has increased to 400000, you can still make a career change now!
Understanding task and async await
Sql分组查询后取每组的前N条记录
为wget命令设置代理
典型分布式系统分析:Dynamo
From the practice, this paper discusses the problems caused by the inconsistent design of ruby syntax.
When Python calls ffmpeg, 'ffmpeg' is not an internal or external command, nor a runnable program
Commodity management system -- implementation of local preservation of new commodities
inet_pton()和inet_ntop()函数详解
Jsliang job series - 08 - handwritten promise
Deng Junhui's notes on data structure and algorithm learning - Chapter 9
GitHub 上适合新手的开源项目(Python 篇)
nodejs学习笔记(慕课网nodejs从零开发web Server博客项目)
Safety (miscellany)
《内网安全攻防》配套视频 之 利用PS查询域内信息
大型项目Objective-C - NSURLSession接入短信验证码应用实例分享