browsermob-proxy icon indicating copy to clipboard operation
browsermob-proxy copied to clipboard

How to programmatically manage proxy

Open jriker1 opened this issue 5 years ago • 0 comments

I have successfully used browsermob but having one logistical challenge. On Windows. When you run browsermob-proxy.bat the cursor doesn't come back so technically that window stays open and can't be used further. But you don't have a proxy yet. You still need to create one with a curl command. But can't do it thru the same window so guessing can't add it to the existing batch file.

Hope that makes sense. So programatically how am I supposed to launch the batch file, and then create the proxy on I guess would be port 8081? Am I supposed to have that dos window running all the time and do a curl call thru in my case C# to create the proxy and then when done destroy it but the dos window always has to run?

Could I run the batch file thru C# and then run the curl command and then do my thing and destroy it? Not sure if the batch opening thru C# would persist but curious the right way to do this. A bit confused to be honest why an initial proxy isn't created on startup or is there a way to do this?

jriker1 avatar Dec 02 '20 17:12 jriker1