dev-proxy
dev-proxy copied to clipboard
[Feature Request]: Add Timer/Time Out option to stop dev proxy
It would be nice to add some sort of timer, that devproxy stops itself after that time passes as an additional safety net where it can be left open, in particular in CI/CD scenarios.
devproxy --timer 180
// will stop dev proxy after 3 minutes
Thanks for the suggestion @OnurGumus. Could you give us some more information behind the thinking and how you'd prefer this over explicitly closing proxy by sending a SIGINT?
Hi,
I was thinking something like timeout command on linux. But perhaps triggers if there are no requests for given duration. It's a sort of safety net against devproxy left open.
Thanks for clarifying. Nice suggestion!
Hi, can i give it a try? I would implement as @OnurGumus suggested and use the event in the ProxyEngine to listen to BeforeRequest and reset a timer on it(--timeout sets the seconds as long to which the timer will be reset at a request), when the timer is expired i would call "StopProxy".
Cool! Please do @joshua-siw. Looking forward to seeing what you'll build.