public void DisableLeakProtection() { if (!LeakProtectionEnabled) { return; } try { _logger.Info("Firewall: Restoring internet"); _sublayer.DestroyAllFilters(); _sublayer.DestroyAllCallouts(); _serverAddressFilters.Clear(); _baseProtectionFilters.Clear(); LeakProtectionEnabled = false; _calloutDriver.Stop(); _logger.Info("Firewall: Internet restored"); } catch (NetworkFilterException ex) { _logger.Error(ex); } }
public void CloseSession(NetworkFilter.IpFilter instance, Sublayer sublayer) { if (instance.Session.Type == SessionType.Permanent) { sublayer.DestroyAllFilters(); } instance.Session.Close(); }