All Projects → chaitanya100100 → Proxy Server

chaitanya100100 / Proxy Server

An HTTP proxy server implemented via python socket programming with caching, blacklisting, authentication functionality

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Proxy Server

Proxy Login Automator
A single node.js script to automatically inject user/password to http proxy server via a local forwarder
Stars: ✭ 263 (+995.83%)
Mutual labels:  proxy-server
Outline Server
Outline Manager, developed by Jigsaw. The Outline Manager application creates and manages Outline servers, powered by Shadowsocks. It uses the Electron framework to offer support for Windows, macOS and Linux.
Stars: ✭ 4,102 (+16991.67%)
Mutual labels:  proxy-server
Weaver
An Advanced HTTP Reverse Proxy with Dynamic Sharding Strategies
Stars: ✭ 510 (+2025%)
Mutual labels:  proxy-server
Macos Fortress
Firewall and Privatizing Proxy for Trackers, Attackers, Malware, Adware, and Spammers with Anti-Virus On-Demand and On-Access Scanning (PF, squid, privoxy, hphosts, dshield, emergingthreats, hostsfile, PAC file, clamav)
Stars: ✭ 307 (+1179.17%)
Mutual labels:  proxy-server
Proxy requests
a class that uses scraped proxies to make http GET/POST requests (Python requests)
Stars: ✭ 357 (+1387.5%)
Mutual labels:  proxy-server
Ergo
The management of multiple apps running over different ports made easy
Stars: ✭ 452 (+1783.33%)
Mutual labels:  proxy-server
torxy
Rules-based transparent HTTP/HTTPS proxy for the TOR server.
Stars: ✭ 24 (+0%)
Mutual labels:  proxy-server
Engintron
Engintron for cPanel/WHM is the easiest way to integrate Nginx on your cPanel/WHM server. Engintron will improve the performance & web serving capacity of your server, while reducing CPU/RAM load at the same time, by installing & configuring the popular Nginx webserver to act as a reverse caching proxy in front of Apache.
Stars: ✭ 587 (+2345.83%)
Mutual labels:  proxy-server
Proxy Chain
Node.js implementation of a proxy server (think Squid) with support for SSL, authentication and upstream proxy chaining.
Stars: ✭ 374 (+1458.33%)
Mutual labels:  proxy-server
Wifipumpkin3
Powerful framework for rogue access point attack.
Stars: ✭ 497 (+1970.83%)
Mutual labels:  proxy-server
Free Proxy List
🔥Free proxy servers list / Updated hourly!
Stars: ✭ 326 (+1258.33%)
Mutual labels:  proxy-server
Micro Proxy
[DEPRECATED] Simplest proxy server for microservices
Stars: ✭ 358 (+1391.67%)
Mutual labels:  proxy-server
Rat Via Telegram
Windows Remote Administration Tool via Telegram
Stars: ✭ 453 (+1787.5%)
Mutual labels:  proxy-server
Socks5
A full-fledged high-performance socks5 proxy server written in C#. Plugin support included.
Stars: ✭ 286 (+1091.67%)
Mutual labels:  proxy-server
Awslambdaproxy
An AWS Lambda powered HTTP/SOCKS web proxy
Stars: ✭ 571 (+2279.17%)
Mutual labels:  proxy-server
mtproxy autoinstaller
MTProxy autoinstaller for Ubuntu
Stars: ✭ 25 (+4.17%)
Mutual labels:  proxy-server
Awesome Web Scraping
List of libraries, tools and APIs for web scraping and data processing.
Stars: ✭ 4,510 (+18691.67%)
Mutual labels:  proxy-server
Uproxy P2p
Internet without borders
Stars: ✭ 798 (+3225%)
Mutual labels:  proxy-server
Php Proxy App
Web Proxy Application built on php-proxy library ready to be installed on your server
Stars: ✭ 583 (+2329.17%)
Mutual labels:  proxy-server
Wyproxy
proxying and recording HTTP/HTTPs/Socks5 proxy flow, save to MYSQL database.
Stars: ✭ 477 (+1887.5%)
Mutual labels:  proxy-server

Proxy Server

An HTTP proxy server implemented via python socket programming with caching, blacklisting, authentication functionality

Description

  • proxy.py is the main proxy file
  • Proxy runs on some specific ports, some ports are reserved for clients and some for servers
  • end_systems contains the server and the client codes
    • Client keeps asking any file [1-10].data from server by GET or POST method
    • Server listens to specified port and serves any file as asked
  • Proxy works as middleman between the server and client and it does caching, authentication, etc
  • Only GET and POST requests are handled

Features

  • Receives the request from client and pass it to the server after necessary parsing
  • Threaded proxy server thus able to handle many requests at the same time
  • If one file is requested above the threshold number of times in certain time period, then proxy server caches that request. The threshold number and time limit can be set by changing global constants in proxy.py file
  • To maintain integrity, cached files are accessed by securing mutex locks
  • Cache has limited size, so if the cache is full and proxy wants to store another response then it removes the least recently asked cached response. Cache limit can be set by setting up the constant in proxy.py file
  • Certain servers (their ports) are blacklisted so that normal users can't access it. Blacklisted servers are stored in CIDR format in blacklist.txt file.
  • Special users can access blacklisted servers. They must be authenticated by HTTP authentication. HTTP authentication is done by proxy. Usernames and passwords of priviledged users are stored in username_password.txt file.

How to run

Proxy

  • Specify proxy port while running proxy
    python proxy.py 20000
    It will run proxy on port 20000

Server

  • run server in end_systems/server directory
  • python server.py 19999 to run server on port 19999
  • bash start_servers.sh 19995 19999 to run servers on all ports from 19995 to 19999.
    this script will run servers on screens
  • bash stop_servers.sh to stop all screen processes.

Client

  • curl request can be sent as client request and get the response.
    curl --request GET --proxy 127.0.0.1:20000 --local-port 20001-20010 127.0.0.1:19999/1.data
    this request will ask 1.data file from server 127.0.0.1/19999 by GET request via proxy 127.0.0.1/20000 using one of the ports in range 20001-20010 on localhost.
  • valid username and password should be provided to access blacklisted servers.
    curl --request GET -u username:password --proxy 127.0.0.1:20000 --local-port 20001-20010 127.0.0.1:19998/1.data
  • client script which randomly asks any file from any server is provided in end_systems/client/
    python client.py 20001-20010 20000 19995-19999
    this will run a client which asks, after every 10 seconds, any file from any server in range 19995-19999, using any port in range 20001-20010, via proxy at port 20000
  • In directory end_systems/client/
    bash start_clients.sh 20001 20010 20000 19995 19999
    will run 10 client scripts each on one port in range 20001-20010, in separate screen, asking any file from any server in range 19995-19999 using proxy at port 20000
  • bash stop__clients.sh will terminate all screens.

Miscellaneous

  • stop__clients.sh and stop_servers.sh will terminate all screens including servers and clients.
  • run 5 servers, 10 clients and proxy to see the proxy's features working.
    python proxy.py 20000
    bash start_servers.sh 19995 19999
    bash start_clients.sh 20001 20010 20000 19995 19999
  • set blacklisted server port in blacklist.txt and username password in username_password.txt and try to access blacklisted port using curl command.
  • see the changes in cache directory.

Scope of improvement

  • Remove authentication headers after authentication.
  • Handle HTTPS requests also.
  • Try some security attacks on working proxy and give solutions to secure it.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].