我的vps_ip可以设置为代理让wget一起使用吗?

Can my vps_ip be set as a proxy to let wget use with?

有个$url被gfw屏蔽了
现在我想通过这种方式从 $url 下载内容。

ssh  root@vps_ip  #to use my vps_ip to break the gfw.      
wget -c  $url  -O /home/material  #to get the content on /home/material in my remote vps disk.      
scp root@vps_ip:/home/material    /home  #to get the /home/material in my remote vps disk into my local disk .  

我的vps_ip可以设置为代理让wget使用吗?

如果你有可以在 http://example.com:8080 使用,那么你可以告诉 wget 使用它:

export HTTP_PROXY=http://example.com:8080
wget http://different.example.com

http://www.baidu.com/search?q=wget+socks+proxy

https://unix.stackexchange.com/questions/38755/how-to-download-a-file-through-an-ssh-server


选项 1,使用 security/dante 包中的 socksify

sudo pkg_add dante

ssh -N -C -D 1080 root@$vps_ip &

SOCKS_SERVER=localhost:1080 socksify wget -c $url -O /home/material

选项 2,通过管道下载 stdout / stdin:

ssh -C root@$vps_ip "wget -O- $url" >> /home/material