Skip to content

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

4.0 beta - added cleanup option

anof-cyber0a0b3bae6f66
diff --git a/Linux/cli/main.c b/Linux/cli/main.c
index eee7b8d..1ed0e04 100644
--- a/Linux/cli/main.c
+++ b/Linux/cli/main.c
@@ -66,7 +66,7 @@ static void show_banner(void)
printf(" | |_) | '__/ _ \\ \\/ / | | | | _ \\| '__| |/ _` |/ _` |/ _ \\\n");
printf(" | __/| | | (_) > <| |_| | | |_) | | | | (_| | (_| | __/\n");
printf(" |_| |_| \\___/_/\\_\\\\__, | |____/|_| |_|\\__,_|\\__, |\\___|\n");
- printf(" |___/ |___/ V3.1.0\n");
+ printf(" |___/ |___/ V4.0-Beta\n");
printf("\n");
printf(" Universal proxy client for Linux applications\n");
printf("\n");
@@ -110,6 +110,9 @@ static void show_help(const char* prog)
printf(" 2 - Show connection events only\n");
printf(" 3 - Show both logs and connections\n\n");
+ printf(" --cleanup Cleanup resources (iptables, etc.) from crashed instance\n");
+ printf(" Use if ProxyBridge crashed without proper cleanup\n\n");
+
printf(" --help, -h Show this help message\n\n");
printf("EXAMPLES:\n");
@@ -294,6 +297,18 @@ static bool is_root(void)
int main(int argc, char *argv[])
{
+ // Check for cleanup flag first - ignores all other args
+ for (int i = 1; i < argc; i++)
+ {
+ if (strcmp(argv[i], "--cleanup") == 0)
+ {
+ printf("Running cleanup...\n");
+ ProxyBridge_Stop();
+ printf("Cleanup complete.\n");
+ return 0;
+ }
+ }
+
char proxy_url[512] = "socks5://127.0.0.1:4444";
ProxyRule rules[MAX_RULES];
int num_rules = 0;
diff --git a/Linux/src/ProxyBridge.c b/Linux/src/ProxyBridge.c
index 8433bb7..4fdf54e 100644
--- a/Linux/src/ProxyBridge.c
+++ b/Linux/src/ProxyBridge.c
@@ -26,6 +26,7 @@
#define LOCAL_PROXY_PORT 34010
#define LOCAL_UDP_RELAY_PORT 34011
#define MAX_PROCESS_NAME 256
+#define VERSION "4.0-Beta"
#define PID_CACHE_SIZE 1024
#define PID_CACHE_TTL_MS 1000
#define NUM_PACKET_THREADS 4