Skip to content

bok1c4/HTTP-Proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Hop Proxy with an Integrated HTTP Server (Anonymous Web Service)

Phase 1: Basics of HTTP and Proxy Servers - Completed

1. Basic HTTP Server

Goal: Build a simple HTTP server that can handle GET and POST requests.

  • What to Learn:
    • Networking with sockets (boost::asio or std::socket).
    • HTTP request and response parsing.
  • Milestone Output:
    • Serve static HTML files from a directory.
    • Handle simple dynamic responses (e.g., echoing form data).
  • Resources:
    • Beej's Guide to Network Programming.
    • Boost.Beast HTTP Server Example.

2. Basic Proxy Server

Goal: Build a single-hop proxy that forwards HTTP requests and responses between a client and a remote server.

  • What to Learn:
    • HTTP forwarding (request parsing, modification, and response forwarding).
    • Understanding headers like Host and User-Agent.
  • Milestone Output:
    • A client connects to your proxy, which forwards requests to a server and relays responses back to the client.
  • Resources:
    • Simple Proxy Server in C++ Tutorial.

Phase 2: Advanced Proxy Features - Completed

3. Multi-Hop Proxy (No Encryption)

Goal: Extend the single-hop proxy to create a multi-hop chain (e.g., Proxy A → Proxy B → Destination).

Build your own Multi-Hop proxy. Build and start multiple proxies, and route the trafiic between them for every client request. Also we need to have the encryption to have same behaviour as in Tor Network.

  • What to Learn:
    • Chain request forwarding across multiple proxy servers.
    • Network path building and recursive relaying.
  • Milestone Output:
    • Route traffic through two or more proxy nodes.
  • Resources:
    • How Proxies Work.

4. Encryption for Multi-Hop Proxy - Current

Goal: Encrypt traffic between proxy nodes to ensure privacy.

  • What to Learn:
    • Symmetric encryption (AES).
    • Public key cryptography (RSA) for key exchange.
    • Message signing and verification.
  • Milestone Output:
    • Proxy nodes decrypt and re-encrypt traffic as it passes through each hop.
  • Resources:
    • OpenSSL C++ Documentation.
    • Cryptography Engineering by Bruce Schneier.

Phase 3: Integration with HTTP Server

5. Integrate HTTP Server with Proxy

Goal: Build an HTTP server that works as the last hop in your proxy chain.

  • What to Learn:
    • Handling HTTP requests locally after decryption.
    • Serving static files or dynamic content at the final node.
  • Milestone Output:
    • Multi-hop proxy ends with a custom HTTP server delivering web content.
  • Resources:
    • HTTP Server and Proxy in C++ (YouTube).

Phase 4: Anonymous Communication and Routing

6. Implement Onion Routing (Tor-like Behavior)

Goal: Build multi-layer encryption for onion routing.

  • What to Learn:
    • Layered encryption (encrypting data for each hop in the chain).
    • Decentralized routing algorithms (e.g., random path selection).
  • Milestone Output:
    • A client sends data encrypted for each node in the chain. Nodes decrypt and forward the traffic.
  • Resources:
    • How Onion Routing Works.

7. Anonymous Client with Proxy Support

Goal: Build a client application that connects to the proxy chain and can browse anonymously.

  • What to Learn:
    • SOCKS5 proxy protocol for anonymized connections.
    • Custom client design to interface with your proxy.
  • Milestone Output:
    • A client can connect to your proxy, browse websites, and hide its IP address.
  • Resources:
    • SOCKS5 Proxy Protocol Guide.

Phase 5: Optimization and Scalability

8. Performance Optimization

Goal: Improve the performance and scalability of your proxy and HTTP server.

  • What to Learn:
    • Thread pools for concurrent connections.
    • Caching strategies to reduce network load.
  • Milestone Output:
    • Handle thousands of requests concurrently with low latency.
  • Resources:
    • C++ Concurrency in Action by Anthony Williams.

9. Fault Tolerance and Load Balancing

Goal: Make the proxy fault-tolerant and distribute traffic across multiple chains.

  • What to Learn:
    • Load balancing techniques (e.g., round-robin).
    • Node failure detection and recovery.
  • Milestone Output:
    • A resilient proxy network with automatic failover.
  • Resources:
    • Designing Data-Intensive Applications by Martin Kleppmann.

Phase 6: Final Integration

10. Build the Complete Multi-Hop Proxy with HTTP Server

Goal: Combine all components into a unified system.

  • What to Learn:
    • Inter-process communication (IPC) between modules.
    • Deploying the proxy network on multiple machines.
  • Milestone Output:
    • Fully functional multi-hop proxy with an integrated HTTP server and client application.
  • Resources:
    • Docker for Deployment.
    • Tor Protocol Specification.

Additional Resources for C++

  • Books:
    • The C++ Programming Language by Bjarne Stroustrup.
    • Effective Modern C++ by Scott Meyers.
  • Websites:
    • CppReference Documentation.
    • Boost Libraries Documentation.

About

HTTP Server with Multi-Hop Proxy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published