A lightweight, visual local reverse proxy tool designed for Windows users.
In local development, we often run into these pain points:
- CORS issues: Front-end calls to back-end APIs get blocked by the browser.
- Port mismatch: The back-end runs on
8000, but the front-end can only call80. - HTTPS debugging: Many services only allow HTTPS callbacks, while local development uses
http://localhost.
LocalReverse works like a traffic commander: it quietly forwards requests sent to localhost:any-port to any address you choose (your dev server, an external API, or a test environment) — with no browser proxy extensions required.
- 🖥️ Graphical Interface (GUI): No black windows or command lines — just point and click.
- ⚡️ Real-Time Changes: Add or modify rules and they apply immediately, no service restart needed.
- 🔄 Multiple Rules in Parallel: Listen on multiple local ports at once, forwarding to different targets.
- 🌐 CORS Problem Solver: Effortlessly resolve CORS errors in local development.
- 🌍 Bilingual UI: Switch between Chinese and English with one click.
- 🔌 Listen Mode Switch: Listens on localhost (127.0.0.1) by default; switch to LAN mode (0.0.0.0) with one click so other devices on the same LAN can access it too.
- Download
LocalReverse.exefrom Releases. - Double-click to run.
- Add a rule and click "Start All Services".
git clone https://github.com/FatFatYoung/LocalReverse.git
cd LocalReverse
pip install requests
python src/main.py- Your front-end:
http://localhost:3000 - Your back-end:
http://192.168.1.100:8080(no CORS headers configured) - LocalReverse setup:
- Local port:
8080 - Target URL:
http://192.168.1.100:8080
- Local port:
- Result: The front-end requests
http://localhost:8080/api/user, LocalReverse forwards it to the back-end, and the browser treats it as a same-origin request — no more blocking!
- You want to test callbacks to
https://api.example.com, but locally you only havehttp. - Setup: Listen on local port
80or443(requires administrator privileges) and forward tohttps://api.example.com.
LocalReverse/
├── src/ # Source code
│ ├── main.py # Core GUI application
│ ├── i18n.py # Internationalization module
│ ├── proxy.py # Generic command-line version (optional)
│ └── demo.py # Port 80 quick demo (optional)
├── resources/ # Build resources
│ └── file_version_info.txt # EXE version metadata (used by build.bat)
├── dist/ # Build output (LocalReverse.exe, not committed)
├── build.bat # Build script (Windows)
├── config.json # Configuration file (build dependency)
├── README.md # Documentation (incl. changelog)
├── THIRD_PARTY_NOTICES.md # Third-party license notices
├── LICENSE # MIT license
└── .gitignore # Git ignore rules
If you prefer the command line, the project includes two scripts:
proxy.py: Generic version — prompts for the port and target URL at startup.demo.py: Demo version — forwardslocalhost:80straight to the GitHub homepage (requires administrator privileges).
Issues and Pull Requests are welcome!
- GitHub: @FatFatYoung
This project is licensed under the MIT License — see the LICENSE file for details.
For third-party open-source component notices, see THIRD_PARTY_NOTICES.md.
- Listen mode switch: GUI toggle /
listen_modeconfig field switches between local (127.0.0.1) and LAN (0.0.0.0) listening; running proxies rebind immediately.
- Repository layout tidied: sources live under
src/, build resources underresources/; the project root keeps only standard entry files. Run from source withpython src/main.py.
- Threading server: switched to
ThreadingHTTPServer; concurrent requests no longer block each other and slow clients can no longer stall the service. - Request header forwarding: browser headers (Cookie, User-Agent, Authorization, etc.) are now forwarded to the target (hop-by-hop headers stripped).
- Error pages no longer expose exception details; details go to the server-side log only.
- Request body forwarding: POST/PUT/PATCH/DELETE bodies are now read and forwarded instead of being silently dropped.
- Response
Content-Length: sent with the correct value instead of being stripped. - HEAD: responses no longer carry a body.
- Rule changes take effect immediately: editing a rule hot-updates the running proxy target (no restart); a port change migrates & rebuilds the proxy; deleting a rule stops its proxy.
- Mode switch cannot fail partially or silently: malformed rules (missing
target_url, numeric/string port mismatch) are skipped with an error log instead of aborting the switch mid-way; every proxy start logs its actual bound address so the active listen mode is visible in the GUI log. - Stopping a rule leaves no zombie listener: a stopped/disabled proxy used to occasionally keep serving traffic (Winsock does not reliably cancel a blocking
accept()when the socket is closed). The accept loop now polls with a bounded interval and shutdown is deterministic; live/in-flight connections are force-closed on stop, so "stopped" means zero traffic afterwards.
- GUI Interface: Full-featured Tkinter interface for managing reverse proxy rules.
- Multi-Rule Support: Map multiple local ports to different target URLs simultaneously.
- i18n: Support for Chinese and English.
- Dynamic Rules: Add, edit, or disable rules without restarting the service.
main.py: The main GUI application.proxy.py: Command-line generic version.demo.py: One-click demo (Port 80 -> GitHub).