This tool allows you to intercept connections made from a java application
You can run the agent using
java -javaagent:ConnectionInterceptor-1.0-SNAPSHOT.jar -jar application.jarto disable connections you can use:
java -javaagent:ConnectionInterceptor-1.0-SNAPSHOT.jar=disable -jar application.jarand yes this can be dynamically attached from another application.