4pr0n / ripme

Downloads albums in bulk
MIT License
918 stars 204 forks source link

unable to rip any url when connected to VPN #111

Open jhuebert95 opened 10 years ago

jhuebert95 commented 10 years ago

I've noticed this issue in the last few versions. I can't connect to a lot of sites because they are blocked on my network, so I use a VPN to unblock them. For some reason though, whenever my VPN is on, every single download fails. It recognizes the url when I type it in and it also shows the direct download link to each file it's downloading, but it just can't save the file. All it says is error: failed to download. I've tried it with multiple vpn servers; all with the same result. If I use someone else's internet that has no blocks and I don't use a VPN it downloads just as it was meant to.

4pr0n commented 10 years ago

The way RipMe gets the webpage full of images (via Jsoup) is different than the way it downloads the files (using sockets in Java).

It sounds like the naive downloading method does not use default VPN configurations set by the computer.

I found something that might be related: http://www.iliachemodanov.ru/en/blog-en/9-java/18-java7-cisco-vpn-en

The issue is Java7 defaults to use IPv6, but some VPN clients only support IPv4.

The solution from that page is to run the java program with the argument -Djava.net.preferIPv4Stack=true

On command-line, that would be:

java -Djava.net.preferIPv4Stack=true -jar ripme.jar

Give that a try (if your'e comfortable with command line) and let me know if it works.