private void OnBufferWrite(object sender, RawReadEventArgs e) { if (e.sessionOwner.TryGetProcessName(out string processName)) { if (ProcessHandler.TryMatchProcess(processName, out PProcess pp)) { pp.Inbound += e.iCountOfBytes; } } InboundTotal += e.iCountOfBytes; }
private void BeforeRequest(Session oSession) { if (oSession.TryGetProcessName(out string processName)) { if (ProcessHandler.HasRoutingEnabled(processName, out PProcess target)) { if (oSession.TryToInjectHeader(ProxyServer.HasAuthentication, ProxyServer.ProxyURL, ProxyServer.Credentials)) { RoutingRequest?.Invoke(this, new RoutingEventArgs(target, oSession.fullUrl)); } } } }