DEV Community

How To Turn Your VPN Into A Proxy Using Python

Tom Hughes on July 02, 2020

I love scraping data. I can write a script that in a few seconds can pull data from a site, filter out all the html tags and javascript mumbo jum...
Collapse
 
kbubu profile image
KBubu

Hey Tom,
This doesn't work.
I'm getting "requests.exceptions.ProxyError: HTTPSConnectionPool(host='httpbin.org', port=443): Max retries exceeded with url: /ip (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))" as an error

Collapse
 
kbubu profile image
KBubu

Just an update on this: it turns out the "proxy technology" was causing the timeout error.
I've now connected successfully using the method discussed in the article.

Collapse
 
tembu profile image
tetemb

Hey KBubu, how did you solve the problem please? I get the same error

Collapse
 
matze0900 profile image
Matze0900

Hey KBubu,
I get the same error. Ive done everything as described in the article. Actually it should work but it doesnt. Could you please describe how you solved the problem?

Thread Thread
 
tembu profile image
tetemb

Hey Matze0900, did you solve the problem? I get the same error..

Collapse
 
luskrew profile image
LusKrew • Edited

Tom you forgot to mention the server needs to be proxy enabled.. i think because of your luck, the first server that you chose happened to be a proxy server as well which caused you to connect without problems, but you need to first check its a proxy server or not by clicking on show advanced option on the Nord page and check the proxy server option.

now this brings a bigger problem, how to find proxy servers of nord? their website only shows the top one, and since there are not that many, its not really useful.

Collapse
 
bonfirebro profile image
bonfirebro

I've followed every step of the thread but for someone reason it doesn't let me connect. I do have @ in my password which i have replaced with %40. It doesn't connect and i get impossible to estasblish connection with the server

Collapse
 
eliasisawesome profile image
Elias

Thanks tom looking everywhere for this... i have a question, so say you want to use 10 different vpns, wouldnt be so difficult to setup right?

i.e connect to 1st vpn connection -> google.com
connect to 2nd vpn connection -> yahoo.com
etc etc

Collapse
 
shirkan profile image
Liran Cohen

Hi, thanks for the great post.
So, if I understand correctly, every request will go to au473.nordvpn.com and then to the end domain of the request, but does it mean the IP changes per each request?
Thanks

Collapse
 
hinman profile image
hinman hanred

Yeah it works sometime and sometime it throws the error(mentioned by others). Using the same account with same server. Anyway, thanks :)

Collapse
 
geotrev profile image
George Treviranus

Hi Tom. Awesome article. I'm wondering if this is possible using a web automation tool like puppeteer.

Collapse
 
nastradacha profile image
NAS

I get response 200 but when I checked the ip address with request.get('ifconfig.me', proxies=proxy). text
I still see the same ip

Collapse
 
eliasisawesome profile image
Elias

Dont public this , lol! Nice work Btw. I need a vpn that supports changing of i.p, aka nordvpn, but also has a list of ip's aka nordvpn from alternate sources.