A high-performance Windows application for intelligent network route management with automatic traffic monitoring and optimization.
Route Manager Pro automatically creates and manages Windows network routes based on application traffic. It monitors which applications are making network connections and intelligently routes their traffic through specified gateways - perfect for VPN split tunneling, multi-WAN setups, or network optimization.
- ๐ Real-time Traffic Monitoring - Captures network flows using WinDivert
- ๐ฏ Process-based Routing - Routes traffic based on executable names
- ๐ง Smart Route Optimization - Automatically aggregates routes to minimize routing table size
- ๐พ Persistent Routes - Survives reboots with automatic state restoration
- ๐ฎ Game & App Detection - Special handling for games, Discord, development tools
- ๐ Performance Optimized - Multi-level caching, async operations, minimal overhead
- Windows 10/11 (64-bit)
- Administrator privileges
- Visual C++ Redistributables 2022
- ~50MB RAM
- WinDivert driver (included)
- Download the latest release from Releases
- Extract to your preferred location
- Run
RouteManagerPro.exe
as Administrator
-
Configure Gateway
- Set your VPN or secondary gateway IP (default:
10.200.210.1
) - Adjust metric if needed (lower = higher priority)
- Set your VPN or secondary gateway IP (default:
-
Select Applications
- Choose applications from the left list
- Click
>
to add to monitoring - Selected apps will have their traffic routed through your gateway
-
Enable Monitoring
- Routes are created automatically when selected apps make connections
- No manual configuration needed!
Enable "Preload IPs" to pre-configure routes for popular services:
- Discord voice servers
- Cloud gaming platforms
- AI services (ChatGPT, Claude)
- CDN networks
Edit preload_ips.json
to customize IP ranges.
Click "Optimize Routes" to:
- Aggregate multiple /32 routes into larger subnets
- Remove redundant entries
- Reduce routing table size by up to 80%
VPN Split Tunneling
- Route only specific apps through VPN
- Keep other traffic on main connection
- Perfect for gaming while working
Multi-WAN Load Balancing
- Route bandwidth-heavy apps through secondary connection
- Keep latency-sensitive apps on primary
- Optimize network usage
Development & Testing
- Route development tools through corporate VPN
- Keep personal apps on home network
- Isolate test traffic
- Sub-millisecond route decisions using memory-mapped caches
- Zero-copy packet inspection with WinDivert
- Lock-free data structures for concurrent access
- 98%+ cache hit rates on critical paths
- Automatic route aggregation reduces routing table bloat
- Reference counting prevents premature route removal
- Process caching eliminates redundant system calls
- Adaptive optimization based on traffic patterns
- Graceful degradation if services fail
- Automatic recovery from network changes
- Persistent state across reboots
- Watchdog monitoring prevents resource leaks
This isn't just another route manager - it's a masterclass in modern C++ system programming.
Service-Based Architecture
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ UI Layer โโโโโโถโ IPC Protocol โโโโโโถโ Service โ
โ (HWND/GDI) โ โ (Named Pipes)โ โ Core โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโ
โ โ
โโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโ
โ Network โ โ Route โ
โ Monitor โ โ Controller โ
โโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโ
โ โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโผโโโโโโโ
โ WinDivert โ
โ Driver โ
โโโโโโโโโโโโโโ
C++23 Goodness
std::format
for type-safe string formattingstd::ranges
algorithms for cleaner codestd::chrono
for all time operationsstd::filesystem
for path handling- Concepts and constraints for template safety
Smart Memory Management
// RAII everywhere
std::unique_ptr<RouteController> routeController;
std::shared_mutex cachesMutex; // Reader-writer optimization
// Custom deleters for Windows handles
struct HandleDeleter {
void operator()(HANDLE h) {
if (h && h != INVALID_HANDLE_VALUE) CloseHandle(h);
}
};
using UniqueHandle = std::unique_ptr<void, HandleDeleter>;
Multi-Level Caching System
// 1. Process cache with LRU eviction
ThreadSafeLRUCache<DWORD, CachedProcessInfo> m_pidCache;
// 2. String conversion cache (98.5% hit rate!)
ThreadSafeLRUCache<std::wstring, std::string> m_wstringToStringCache;
// 3. Route optimization cache
std::unordered_map<size_t, CachedOptimization> optimizationCache;
Lock-Free Where Possible
std::atomic<bool> running{true};
std::atomic<uint64_t> hits{0};
mutable std::shared_mutex cachesMutex; // Multiple readers, single writer
Async Everything
- Background route verification thread
- Async logging with buffering
- Non-blocking IPC communication
- Deferred route optimization
Comprehensive Error Handling
// Result<T> monad for error propagation
template<typename T>
class Result {
std::variant<T, RouteError> data;
public:
bool IsSuccess() const;
T& Value();
RouteError& Error();
};
Graceful Shutdown Coordination
class ShutdownCoordinator {
std::atomic<bool> isShuttingDown{false};
HANDLE shutdownEvent;
void WaitForThreads(std::chrono::milliseconds timeout);
};
Resource Leak Prevention
- RAII for all resources
- Watchdog monitors memory usage
- Automatic garbage collection
- Handle leak detection in debug builds
Route Optimization Engine
- Trie-based route aggregation
- Waste threshold calculations
- Prefix length optimization
- O(n log n) complexity
Network Flow Correlation
- Process โ Connection mapping
- Efficient flow tracking
- Connection state machine
- Automatic cleanup
Built-in Performance Profiling
PERF_TIMER("NetworkMonitor::ProcessFlowEvent");
PERF_COUNT("RouteOptimizer.CacheHit");
// Automatic timing and counting
class ScopedTimer {
std::chrono::high_resolution_clock::time_point start;
~ScopedTimer() {
RecordOperation(op, duration);
}
};
Detailed Statistics
- Cache hit rates
- Operation timings
- Route optimization metrics
- Memory usage tracking
Contributions are welcome!
This project is licensed under the MIT License.
Built with โค๏ธ using modern C++ and a passion for performance