There is a $url which is blocked by gfw.
Now i want to download the content from the $url this way.
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 .
Can my vps_ip be set as a proxy to let wget use with?
Wget supports proxies for both HTTP and FTP retrievals. The standard way to specify proxy location, which Wget recognizes, is using the following environment variables: http_proxy. https_proxy.
The proxy configuration for the wget command can be set via the command line interface during usage of the wget command. The -e use_proxy=yes http_proxy="proxy.linuxtect.com" option can be used to set a temporary proxy for the current command execution time.
Or use wget --no-proxy command line option to override them.
Using cURL with HTTP/HTTPS proxy If you are using a proxy correctly, the page will return an IP address that is different from your machine's, that is, the proxy's IP address. There are multiple ways to run curl with proxy command. The next section will cover sending proxy details as a command line argument.
http://www.baidu.com/search?q=wget+socks+proxy
https://unix.stackexchange.com/questions/38755/how-to-download-a-file-through-an-ssh-server
Option 1, with the use of socksify
from the security/dante
package:
sudo pkg_add dante
ssh -N -C -D 1080 root@$vps_ip &
SOCKS_SERVER=localhost:1080 socksify wget -c $url -O /home/material
Option 2, by piping the download through stdout
/ stdin
:
ssh -C root@$vps_ip "wget -O- $url" >> /home/material
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With