Skip to content

Force Proxy to any Windows/MacOS/Linux Application TCP and UDP traffic

added proxy details in connection logs

Sourav Kalal4a6709c3a470
diff --git a/src/ProxyBridge.c b/src/ProxyBridge.c
index 4fddf62..c94e0bf 100644
--- a/src/ProxyBridge.c
+++ b/src/ProxyBridge.c
@@ -180,7 +180,13 @@ static DWORD WINAPI packet_processor(LPVOID arg)
snprintf(dest_ip_str, sizeof(dest_ip_str), "%d.%d.%d.%d",
(orig_dest_ip >> 0) & 0xFF, (orig_dest_ip >> 8) & 0xFF,
(orig_dest_ip >> 16) & 0xFF, (orig_dest_ip >> 24) & 0xFF);
- g_connection_callback(process_name, pid, dest_ip_str, orig_dest_port);
+
+ char proxy_info[128];
+ snprintf(proxy_info, sizeof(proxy_info), "Redirect Proxy %s://%s:%d",
+ g_proxy_type == PROXY_TYPE_HTTP ? "HTTP" : "SOCKS5",
+ g_proxy_ip, g_proxy_port);
+
+ g_connection_callback(process_name, pid, dest_ip_str, orig_dest_port, proxy_info);
}
}
diff --git a/src/ProxyBridge.h b/src/ProxyBridge.h
index 4092455..a8854c8 100644
--- a/src/ProxyBridge.h
+++ b/src/ProxyBridge.h
@@ -14,7 +14,7 @@ extern "C" {
#endif
typedef void (*LogCallback)(const char* message);
-typedef void (*ConnectionCallback)(const char* process_name, DWORD pid, const char* dest_ip, UINT16 dest_port);
+typedef void (*ConnectionCallback)(const char* process_name, DWORD pid, const char* dest_ip, UINT16 dest_port, const char* proxy_info);
typedef enum {
PROXY_TYPE_HTTP = 0,