See my comments in PR #282
Ok I see what the code does.
There are two scenarios for a Proxy configuration:
In both scenario's you don't need a ProxyPlugin. In scenario 1 you can use the PreCrawlingPlugin just like all the other stuff you might want to set-up before running a crawl. You can clean-up/tear-down the proxy server when you are done in a PostCrawling plugin. Stopping the service isn't even covered in the current proxy plugin.
If you want to use a dynamic port for the proxy (like I do) because you don't know which ports are available on a given computer, you need to setup the proxy before you configure Crawljax. This is because the configuration is immutable. A proxy plugin doesn't help here either.
In scenario 2 you don't need a plugin either, because you just pass the proxy configuration to the configuration builder and you're done.
you can show me to how about using PreCrawlingPlugin and PostCrawling. I can't find that. You can write a demo example..thank you so much!!!
Here's an example that uses the OnNewState plugin: https://github.com/crawljax/crawljax/blob/master/examples/src/main/java/com/crawljax/examples/PluginExample.java