当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:樊文凯
- Wealth and freedom? Ant financial services suspended listing, valuation or decline after regulation
- 1450. 在既定时间做作业的学生人数
- Visual Studio (MAC) installation process notes
- 真正拖垮你的,是沉没成本
- Visit Jingdong | members of Youth Innovation Alliance of China Academy of space technology visit Jingdong headquarters
- Commodity management system -- implementation of local preservation of new commodities
- From coding, network transmission, architecture design, Tencent cloud high quality, high availability real-time audio and video technology practice
- 为wget命令设置代理
- ThinkPHP框架执行流程源码解析
猜你喜欢
解决python调用 ffmpeg时 ‘ffmpeg‘ 不是内部或外部命令,也不是可运行的程序
Kubernetes业务日志收集与监控
Handwritten digital image recognition convolution neural network
1450. 在既定时间做作业的学生人数
《内网安全攻防》配套视频 之 利用PS查询域内信息
Open source ERP recruitment
Three practical skills of Medical Project Management
An attempt to read or write to protected memory occurred using the CopyMemory API. This usually indicates that other memory is corrupted.
El table dynamic header
Impact of libssl on CentOS login
随机推荐
Recommendation system, in-depth paper analysis gbdt + LR
After SQL group query, get the first n records of each group
Show profile analysis of SQL statement performance overhead
1486. Array XOR operation
Principle analysis and performance tuning of elasticsearch
Sql分组查询后取每组的前N条记录
A simple way to realize terminal text paste board
Understanding runloop in OC
Python zero basics tutorial (01)
AI fresh student's annual salary has increased to 400000, you can still make a career change now!
用一种简单的方式实现终端文字粘贴板
Chrome browser engine blink & V8
1450. Number of students doing homework at a given time
iPhone“连到系统上的设备没有发挥作用”原因分析及解决方法 20200105
利用 Python 一键下载网易云音乐 10W+ 乐库
美国大选拜登获胜!硅谷的Python开发者用这种方式调侃懂王
ThinkPHP门面源码解析
VisualStudio(Mac)安装过程笔记
GitHub 上适合新手的开源项目(Python 篇)
EFF 认为 RIAA 正在“滥用 DMCA”来关闭 YouTube-DL