I'm working on developing a transparent proxy provider extension, and I am trying to figure out how to handle a change in configuration that would result in a different verdict from handleNewFlow()
Consider the following scenario:
- The proxy provider is started with configuration A, and a bunch of packet flows get a verdict of
NOfromhandleNewFlow(). These flows are now handled by the system and get routed out to the internet normally. - Some application changes the
protocolConfigurationproperty to configuration B, and the proxy provider detects this change via KVO. - This new configuration changes the verdict that would have been returned from
handleNewFlow()toYES, requiring that traffic to be handled by the transparent proxy provider instead of the system. - These flows should be closed (eg: by calling closeReadWithError()) but the proxy provider has no record of them because we previously returned
NO
Is there a way that a transparent proxy provider can get the operating system to close the currently open flows so that they can be re-evaluated by handleNewFlow() and directed into the transparent proxy instead?