Skip to content

A proxy server named 🦊FOXY build with selenium for chrome webdriver in python

Notifications You must be signed in to change notification settings

milan-sony/foxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icon

FOXYPROXY

A proxy server build with selenium for chrome webdriver in python

💭 BTS

Click Here I recently saw an article on Medium about how to make a proxy server of our own. After reading the article I got a basic idea of how to build one. First I tought to build it by scrapping all the free proxies available and also apply the concept of rotating proxies then pass it to the selenium webdriver. Trust me! most of the free proxies availabe out there are not working and most of them won't works with google too. Scrapping all the proxies available then getting the working one was very time consuming. So I search whether there is any libray for getting free proxies. After some searches I found one named free-proxy I added this library to my code, it gave working proxies and the library also has many parameters, this helps me to find proxies that works with google. Then I created custom options for the Selenium webdriver for chrome and pass the proxy to it, then solved the problems faced by the web driver like stoping the chrome from automatically closin, remote allow origins, accept insecure certificates etc. With Eel-python library I build a UI to enter the URL to search.

There are many websites out there that provies free proxies like croxyproxy, but I just wanted to bulid one for myself :)

Libraries used

  • free_proxy
  • selenium
  • Eel

Read documentation about

Run locally

You will need to install Python on you system, head over to https://www.python.org/downloads/ to download python. (Dont Forget to tick Add Python to PATH while installing Python)

Once you have downloaded Python on your system, run the following command inside your terminal (only if your system is git enabled, otherwise download the zip file and extract it)

  git clone https://github.com/milan-sony/foxy.git

Then go to the project folder

  cd foxy

(This is optional, but strongly recommended) Make a virtual environment

  python -m venv venv

Activate the virtual environment

  venv/Scripts/activate

If error occurs when activating virtual environment, run the following command

  Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

Then Install the dependencies needed for this project

  pip install -r requirements.txt

Now run the script

  python foxy.py

Working

First it will the get the URL to search from the user through UI. This URL is passed into the main function and then the selenium browser will open this URL with proxy server and custom user agent in seperate chrome window.

The proxy server that we get will most probabily a Japanese server. So there might be some language translate issue inside the website

You can add/create new tabs on chrome window that open up and search for anything

Note

Please enter a valid URL with full address

❌ google

✔️ https://www.google.com

Keep in mind

A proxy server mask your IP address, but won't encrypt the data you send and receive.

Screenshot