diff options
Diffstat (limited to 'app/src/main/java/org/pacien/tincapp/data/VpnInterfaceConfiguration.kt')
-rw-r--r-- | app/src/main/java/org/pacien/tincapp/data/VpnInterfaceConfiguration.kt | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/data/VpnInterfaceConfiguration.kt b/app/src/main/java/org/pacien/tincapp/data/VpnInterfaceConfiguration.kt index 7b699c6..fec9a8e 100644 --- a/app/src/main/java/org/pacien/tincapp/data/VpnInterfaceConfiguration.kt +++ b/app/src/main/java/org/pacien/tincapp/data/VpnInterfaceConfiguration.kt | |||
@@ -25,9 +25,7 @@ data class VpnInterfaceConfiguration(val addresses: List<CidrAddress> = emptyLis | |||
25 | val allowBypass: Boolean = false, | 25 | val allowBypass: Boolean = false, |
26 | val blocking: Boolean = false, | 26 | val blocking: Boolean = false, |
27 | val mtu: Int? = null) { | 27 | val mtu: Int? = null) { |
28 | |||
29 | companion object { | 28 | companion object { |
30 | |||
31 | private val KEY_ADDRESSES = "Address" | 29 | private val KEY_ADDRESSES = "Address" |
32 | private val KEY_ROUTES = "Route" | 30 | private val KEY_ROUTES = "Route" |
33 | private val KEY_DNS_SERVERS = "DNSServer" | 31 | private val KEY_DNS_SERVERS = "DNSServer" |
@@ -63,7 +61,6 @@ data class VpnInterfaceConfiguration(val addresses: List<CidrAddress> = emptyLis | |||
63 | c.getStringList(INVITATION_KEY_ROUTES) | 61 | c.getStringList(INVITATION_KEY_ROUTES) |
64 | .map { it.substringBefore(' ') } | 62 | .map { it.substringBefore(' ') } |
65 | .map { CidrAddress.fromSlashSeparated(it) }) | 63 | .map { CidrAddress.fromSlashSeparated(it) }) |
66 | |||
67 | } | 64 | } |
68 | 65 | ||
69 | fun write(f: File) = FileBasedConfigurationBuilder<FileBasedConfiguration>(PropertiesConfiguration::class.java) | 66 | fun write(f: File) = FileBasedConfigurationBuilder<FileBasedConfiguration>(PropertiesConfiguration::class.java) |
@@ -74,5 +71,4 @@ data class VpnInterfaceConfiguration(val addresses: List<CidrAddress> = emptyLis | |||
74 | } | 71 | } |
75 | builder.save() | 72 | builder.save() |
76 | } | 73 | } |
77 | |||
78 | } | 74 | } |