当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Depth analysis based on synchronized lock
- Stack & queue (go) of data structure and algorithm series
- Handwriting Koa.js Source code
- Analysis of the source code of ThinkPHP facade
- Using stream to read and write files to process large files
- 嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:樊文凯
- Handwritten digital image recognition convolution neural network
- 2020.11.07面试总结(面试12k)
- libssl对CentOS登录的影响
- ThinkPHP门面源码解析
猜你喜欢
Capture bubbles? Is browser a fish?
How to ensure that messages are not consumed repeatedly? (how to ensure the idempotent of message consumption)
When Python calls ffmpeg, 'ffmpeg' is not an internal or external command, nor a runnable program
真正拖垮你的,是沉没成本
外贸自建网站域名的选择— Namesilo 域名购买
EFF 认为 RIAA 正在“滥用 DMCA”来关闭 YouTube-DL
How to query by page after 10 billion level data is divided into tables?
1450. 在既定时间做作业的学生人数
安卓开发——服务应用,计时器的实现(线程+服务)
AI应届生年薪涨到40万了,你现在转行还来得及!
随机推荐
微信圈子
Handwriting Koa.js Source code
走进京东 | 中国空间技术研究院青年创新联盟成员莅临参观京东总部
为wget命令设置代理
零基础IM开发入门(四):什么是IM系统的消息时序一致性?
开源ERP招聘了
Capture bubbles? Is browser a fish?
El table dynamic header
JT-day09
使用rem,做到屏幕缩放时,字体大小随之改变
Wealth and freedom? Ant financial services suspended listing, valuation or decline after regulation
Deng Junhui's notes on data structure and algorithm learning - Chapter 9
Depth analysis based on synchronized lock
nodejs学习笔记(慕课网nodejs从零开发web Server博客项目)
《内网安全攻防》配套视频 之 利用PS查询域内信息
Android rights
The choice of domain name of foreign trade self built website
Recommended tools for Mac
When Python calls ffmpeg, 'ffmpeg' is not an internal or external command, nor a runnable program
Interview summary on November 7, 2020 (interview 12K)