我目前已被http://www.apkmirror.com屏蔽,因此wget
会产生ERROR 403: Forbidden
:
kurt@kurt-ThinkPad:~$ wget http://www.apkmirror.com
--2017-04-21 12:51:42-- http://www.apkmirror.com/
Resolving www.apkmirror.com (www.apkmirror.com)... 104.19.135.58, 104.19.132.58, 104.19.133.58, ...
Connecting to www.apkmirror.com (www.apkmirror.com)|104.19.135.58|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2017-04-21 12:51:42 ERROR 403: Forbidden.
我正在尝试使用https://free-proxy-list.net/中的代理来获取访问权限。例如,在https://www.gnu.org/software/wget/manual/html_node/Proxies.html之后,我尝试了
kurt@kurt-ThinkPad:~$ wget http://www.apkmirror.com@70.32.89.160:3128
--2017-04-21 12:57:56-- http://www.apkmirror.com@70.32.89.160:3128/
Connecting to 70.32.89.160:3128... connected.
HTTP request sent, awaiting response... 400 Bad Request
2017-04-21 12:57:59 ERROR 400: Bad Request.
但我得到ERROR 400: Bad Request
。这个(尝试)使用wget
是否有任何问题?
答案 0 :(得分:6)
你使用了错误的方法,让我告诉你。
使用cd ~
然后使用像vi ~/.wgetrc
并使用以下方法将代理网址粘贴到文件中。
use_proxy = on
http_proxy = http://70.32.89.160:3128
https_proxy = http://70.32.89.160:3128
ftp_proxy = http://70.32.89.160:3128
现在使用以下命令访问被阻止的一方。
wget -e use_proxy=yes -e http_proxy=$proxy http://www.apkmirror.com
或尝试使用wget http://www.apkmirror.com
,您会看到以下输出。
root@ubuntu:~# wget www.apkmirror.co
--2017-04-21 08:12:45-- http://www.apkmirror.co/
Connecting to 70.32.89.160:3128... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: http://www.apkmirror.co/ [following]
--2017-04-21 08:12:47-- http://www.apkmirror.co/
Connecting to 70.32.89.160:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 76512 (75K) [text/html]
Saving to: ‘index.html.8’
100%[===================================================================================================================>] 76,512 447KB/s in 0.2s
2017-04-21 08:12:49 (447 KB/s) - ‘index.html.8’ saved [76512/76512]
答案 1 :(得分:2)
您可以使用,这是:
wget -e use_proxy=yes -e http_proxy=http://ilanni:123456@10.10.10.128:3128 http://oss.aliyuncs.com/aliyunecs/rds_backup_extract.sh
答案 2 :(得分:0)
使用tsocks通过socks5代理启动wget:
sudo apt install tsocks
配置tsocks
# vi /etc/tsocks.conf
server = 127.0.0.1
server_type = 5
server_port = 1080
tsocks wget http://url_to_get