private void PermitPrivateNetwork(uint weight) { _ipLayer.ApplyToIpv4(layer => { _baseProtectionFilters.Add(_sublayer.CreateRemoteNetworkIPv4Filter( new DisplayData("ProtonVPN permit private network", ""), Action.HardPermit, layer, weight, new NetworkAddress("10.0.0.0", "255.0.0.0"))); }); _ipLayer.ApplyToIpv4(layer => { _baseProtectionFilters.Add(_sublayer.CreateRemoteNetworkIPv4Filter( new DisplayData("ProtonVPN permit private network", ""), Action.HardPermit, layer, weight, new NetworkAddress("172.16.0.0", "255.240.0.0"))); }); _ipLayer.ApplyToIpv4(layer => { _baseProtectionFilters.Add(_sublayer.CreateRemoteNetworkIPv4Filter( new DisplayData("ProtonVPN permit private network", ""), Action.HardPermit, layer, weight, new NetworkAddress("192.168.0.0", "255.255.0.0"))); }); _ipLayer.ApplyToIpv4(layer => { _baseProtectionFilters.Add(_sublayer.CreateRemoteNetworkIPv4Filter( new DisplayData("ProtonVPN permit private network", ""), Action.HardPermit, layer, weight, new NetworkAddress("224.0.0.0", "240.0.0.0"))); }); _ipLayer.ApplyToIpv4(layer => { _baseProtectionFilters.Add(_sublayer.CreateRemoteNetworkIPv4Filter( new DisplayData("ProtonVPN permit private network", ""), Action.HardPermit, layer, weight, new NetworkAddress("255.255.255.255", "255.255.255.255"))); }); }
public void Add(string address, Action action) { if (_list.ContainsKey(address)) { return; } var networkAddress = new Common.OS.Net.NetworkAddress(address); if (!networkAddress.Valid()) { return; } _list[address] = new List <Guid>(); _ipLayer.ApplyToIpv4(layer => { var guid = _sublayer.CreateRemoteNetworkIPv4Filter( new DisplayData("ProtonVPN permit remote address", ""), action, layer, 14, new NetworkAddress(networkAddress.Ip, networkAddress.Mask)); _list[address].Add(guid); }); }
private void PermitPrivateNetwork(uint weight) { _ipLayer.ApplyToIpv4(layer => { _sublayer.CreateRemoteNetworkIPv4Filter(new DisplayData( "ProtonVPN allow private network", "Permit network address"), Action.HardPermit, layer, weight, new NetworkAddress("127.0.0.0", "255.0.0.0")); }); _ipLayer.ApplyToIpv4(layer => { _sublayer.CreateRemoteNetworkIPv4Filter(new DisplayData( "ProtonVPN allow private network", "Permit network address"), Action.HardPermit, layer, weight, new NetworkAddress("10.0.0.0", "255.0.0.0")); }); _ipLayer.ApplyToIpv4(layer => { _sublayer.CreateRemoteNetworkIPv4Filter(new DisplayData( "ProtonVPN allow private network", "Permit network address"), Action.HardPermit, layer, weight, new NetworkAddress("172.16.0.0", "255.240.0.0")); }); _ipLayer.ApplyToIpv4(layer => { _sublayer.CreateRemoteNetworkIPv4Filter( new DisplayData( "ProtonVPN allow private network", "Permit network address"), Action.HardPermit, layer, weight, new NetworkAddress("192.168.0.0", "255.255.0.0")); }); }