Пример #1
0
        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;
        }
Пример #2
0
 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));
             }
         }
     }
 }