suez1moeedueg / xrayRepo

MIT License
0 stars 1 forks source link

This project is tested with BrowserStack.

xray

This project is tested with BrowserStack

X-Ray Proxy

X-Ray Proxy is a lightweight, multi-threaded HTTP/HTTPS proxy server implemented in Python. This project serves as a basic example of how to create a transparent proxy that can handle both HTTP and HTTPS traffic.

Features

How It Works

  1. The proxy listens for incoming connections on a specified host and port.
  2. For each new connection, a separate thread is spawned to handle the client.
  3. The client's request is parsed to determine the target server and port.
  4. A connection is established with the target server.
  5. Two additional threads are created to handle bidirectional data flow between the client and the server.
  6. For HTTPS connections, the socket is wrapped with SSL.

Usage

  1. Run the script on your local machine:
    1. Configure your browser or application to use 127.0.0.1:8080 as the proxy server.

Limitations and Disclaimer

This is a basic implementation intended for educational purposes. It lacks many features of a production-ready proxy, such as:

Do not use this in a production environment without significant improvements.

Contributing

Contributions to improve the proxy or add features are welcome. Please feel free to submit a pull request or open an issue to discuss potential changes/additions.

License

MIT License

This project is tested with BrowserStack

Acknowledgements

This project was created as a learning exercise in network programming and proxy server implementation.

This project is tested with BrowserStack.