有一个$ 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 .
Run Code Online (Sandbox Code Playgroud)
我的vps_ip可以设置为让wget使用的代理吗?
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,使用包socksify
中的security/dante
:
sudo pkg_add dante
ssh -N -C -D 1080 root@$vps_ip &
SOCKS_SERVER=localhost:1080 socksify wget -c $url -O /home/material
Run Code Online (Sandbox Code Playgroud)
stdout
选项 2,通过/管道下载stdin
:
ssh -C root@$vps_ip "wget -O- $url" >> /home/material
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
172 次 |
最近记录: |