diff options
| author | Emīls Piņķis <emils@mullvad.net> | 2019-02-12 17:16:05 +0000 |
|---|---|---|
| committer | Emīls Piņķis <emils@mullvad.net> | 2019-02-14 11:15:36 +0000 |
| commit | 77e71877c860e0a38e44397344a0cb6eb7821fe4 (patch) | |
| tree | dfcd99cd61ca3d73569d990ea6a5863cbbb7a1b1 | |
| parent | 89161480feb19b0356f1f3c96ea0a7eaf9ab1c63 (diff) | |
| download | mullvadvpn-77e71877c860e0a38e44397344a0cb6eb7821fe4.tar.xz mullvadvpn-77e71877c860e0a38e44397344a0cb6eb7821fe4.zip | |
Move all_of_the_internet to talpid-types::net
| -rw-r--r-- | talpid-types/src/net/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/talpid-types/src/net/mod.rs b/talpid-types/src/net/mod.rs index 74b3e8bfb1..6fffd88828 100644 --- a/talpid-types/src/net/mod.rs +++ b/talpid-types/src/net/mod.rs @@ -162,3 +162,11 @@ pub struct GenericTunnelOptions { /// forwarded through the tunnel. pub enable_ipv6: bool, } + +/// Returns a vector of IP networks representing all of the internet. +pub fn all_of_the_internet() -> Vec<ipnetwork::IpNetwork> { + vec![ + "0.0.0.0/0".parse().expect("Failed to parse ipv6 network"), + "::0/0".parse().expect("Failed to parse ipv6 network"), + ] +} |
