abhinavsingh / proxy.py

💫 Ngrok FRP Alternative • ⚡ Fast • 🪶 Lightweight • 0️⃣ Dependency • 🔌 Pluggable • 😈 TLS interception • 🔒 DNS-over-HTTPS • 🔥 Poor Man's VPN • ⏪ Reverse & ⏩ Forward • 👮🏿 "Proxy Server" framework • 🌐 "Web Server" framework • ➵ ➶ ➷ ➠ "PubSub" framework • 👷 "Work" acceptor & executor framework
https://abhinavsingh.com/proxy-py-a-lightweight-single-file-http-proxy-server-in-python/
BSD 3-Clause "New" or "Revised" License
2.91k stars 568 forks source link

proxy bypass #1367

Open bejokun opened 3 months ago

bejokun commented 3 months ago

Hii If possible please add feature bypass domain from use proxy upstream/reverse (use direct connection when its resolve to 127.0.0.1/localhost) and print on each client hostname requested. Thanks for your hard work.

abhinavsingh commented 1 month ago

Thank you @bejokun . May be we can add a flag based facility to bypass certain hosts.

To support this via plugins, I looked at code and before_upstream_connection currently returns Optional[HttpParser]. When None is returns by plugins, connection is dropped. Hence, I am unsure how to add support for bypass via before_upstream_connection without changing its signature.