From ef457d7a9c03ce7ceedc0c6808bbcc8cde9570c1 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Sun, 25 Aug 2019 14:57:50 +0400 Subject: [PATCH] fix: Change all Config model properties to var instead of val --- .../yggdrasil/models/config/Config.kt | 38 +++++++++---------- .../models/config/SessionFirewall.kt | 12 +++--- .../yggdrasil/models/config/SwitchOptions.kt | 2 +- .../yggdrasil/models/config/TunnelRouting.kt | 10 ++--- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/Config.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/Config.kt index 270881e..5b4e3d2 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/Config.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/Config.kt @@ -3,23 +3,23 @@ package io.github.chronosx88.yggdrasil.models.config import com.google.gson.annotations.SerializedName data class Config ( - @SerializedName("peers") val peers : List, - @SerializedName("interfacePeers") val interfacePeers : Map>, - @SerializedName("listen") val listen : List, - @SerializedName("adminListen") val adminListen : String, - @SerializedName("multicastInterfaces") val multicastInterfaces : List, - @SerializedName("allowedEncryptionPublicKeys") val allowedEncryptionPublicKeys : List, - @SerializedName("encryptionPublicKey") val encryptionPublicKey : String, - @SerializedName("encryptionPrivateKey") val encryptionPrivateKey : String, - @SerializedName("signingPublicKey") val signingPublicKey : String, - @SerializedName("signingPrivateKey") val signingPrivateKey : String, - @SerializedName("linkLocalTCPPort") val linkLocalTCPPort : Int, - @SerializedName("ifName") val ifName : String, - @SerializedName("ifTAPMode") val ifTAPMode : Boolean, - @SerializedName("ifMTU") val ifMTU : Long, - @SerializedName("sessionFirewall") val sessionFirewall : SessionFirewall, - @SerializedName("tunnelRouting") val tunnelRouting : TunnelRouting, - @SerializedName("switchOptions") val switchOptions : SwitchOptions, - @SerializedName("nodeInfoPrivacy") val nodeInfoPrivacy : Boolean, - @SerializedName("nodeInfo") val nodeInfo : Map + @SerializedName("peers") var peers : List, + @SerializedName("interfacePeers") var interfacePeers : Map>, + @SerializedName("listen") var listen : List, + @SerializedName("adminListen") var adminListen : String, + @SerializedName("multicastInterfaces") var multicastInterfaces : List, + @SerializedName("allowedEncryptionPublicKeys") var allowedEncryptionPublicKeys : List, + @SerializedName("encryptionPublicKey") var encryptionPublicKey : String, + @SerializedName("encryptionPrivateKey") var encryptionPrivateKey : String, + @SerializedName("signingPublicKey") var signingPublicKey : String, + @SerializedName("signingPrivateKey") var signingPrivateKey : String, + @SerializedName("linkLocalTCPPort") var linkLocalTCPPort : Int, + @SerializedName("ifName") var ifName : String, + @SerializedName("ifTAPMode") var ifTAPMode : Boolean, + @SerializedName("ifMTU") var ifMTU : Long, + @SerializedName("sessionFirewall") var sessionFirewall : SessionFirewall, + @SerializedName("tunnelRouting") var tunnelRouting : TunnelRouting, + @SerializedName("switchOptions") var switchOptions : SwitchOptions, + @SerializedName("nodeInfoPrivacy") var nodeInfoPrivacy : Boolean, + @SerializedName("nodeInfo") var nodeInfo : Map ) \ No newline at end of file diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SessionFirewall.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SessionFirewall.kt index 58f9572..fc225e1 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SessionFirewall.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SessionFirewall.kt @@ -3,10 +3,10 @@ package io.github.chronosx88.yggdrasil.models.config import com.google.gson.annotations.SerializedName data class SessionFirewall ( - @SerializedName("enable") val enable : Boolean, // Enable or disable the session firewall. If disabled, network traffic from any node will be allowed. If enabled, the below rules apply. - @SerializedName("allowFromDirect") val allowFromDirect : Boolean, // Allow network traffic from directly connected peers. - @SerializedName("allowFromRemote") val allowFromRemote : Boolean, // Allow network traffic from remote nodes on the network that you are not directly peered with. - @SerializedName("alwaysAllowOutbound") val alwaysAllowOutbound : Boolean, // Allow outbound network traffic regardless of AllowFromDirect or AllowFromRemote. This does allow a remote node to send unsolicited traffic back to you for the length of the session. - @SerializedName("whitelistEncryptionPublicKeys") val whitelistEncryptionPublicKeys : List, // List of public keys from which network traffic is always accepted, regardless of AllowFromDirect or AllowFromRemote. - @SerializedName("blacklistEncryptionPublicKeys") val blacklistEncryptionPublicKeys : List // List of public keys from which network traffic is always rejected, regardless of the whitelist, AllowFromDirect or AllowFromRemote. + @SerializedName("enable") var enable : Boolean, // Enable or disable the session firewall. If disabled, network traffic from any node will be allowed. If enabled, the below rules apply. + @SerializedName("allowFromDirect") var allowFromDirect : Boolean, // Allow network traffic from directly connected peers. + @SerializedName("allowFromRemote") var allowFromRemote : Boolean, // Allow network traffic from remote nodes on the network that you are not directly peered with. + @SerializedName("alwaysAllowOutbound") var alwaysAllowOutbound : Boolean, // Allow outbound network traffic regardless of AllowFromDirect or AllowFromRemote. This does allow a remote node to send unsolicited traffic back to you for the length of the session. + @SerializedName("whitelistEncryptionPublicKeys") var whitelistEncryptionPublicKeys : List, // List of public keys from which network traffic is always accepted, regardless of AllowFromDirect or AllowFromRemote. + @SerializedName("blacklistEncryptionPublicKeys") var blacklistEncryptionPublicKeys : List // List of public keys from which network traffic is always rejected, regardless of the whitelist, AllowFromDirect or AllowFromRemote. ) \ No newline at end of file diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SwitchOptions.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SwitchOptions.kt index e757c86..3893b7c 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SwitchOptions.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/SwitchOptions.kt @@ -3,5 +3,5 @@ package io.github.chronosx88.yggdrasil.models.config import com.google.gson.annotations.SerializedName data class SwitchOptions ( - @SerializedName("maxTotalQueueSize") val maxTotalQueueSize : Int // Maximum size of all switch queues combined (in bytes). + @SerializedName("maxTotalQueueSize") var maxTotalQueueSize : Int // Maximum size of all switch queues combined (in bytes). ) \ No newline at end of file diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/TunnelRouting.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/TunnelRouting.kt index 9075ec4..2386bd4 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/TunnelRouting.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/TunnelRouting.kt @@ -3,9 +3,9 @@ package io.github.chronosx88.yggdrasil.models.config import com.google.gson.annotations.SerializedName data class TunnelRouting ( - @SerializedName("enable") val enable : Boolean, // Enable or disable tunnel routing. - @SerializedName("iPv6Destinations") val iPv6Destinations : Map, // IPv6 CIDR subnets, mapped to the EncryptionPublicKey to which they should be routed, e.g. { "aaaa:bbbb:cccc::/e": "boxpubkey", ... }" - @SerializedName("iPv6Sources") val iPv6Sources : List, // Optional IPv6 source subnets which are allowed to be tunnelled in addition to this node's Yggdrasil address/subnet. If not specified, only traffic originating from this node's Yggdrasil address or subnet will be tunnelled. - @SerializedName("iPv4Destinations") val iPv4Destinations : Map, // IPv4 CIDR subnets, mapped to the EncryptionPublicKey to which they should be routed, e.g. { "a.b.c.d/e": "boxpubkey", ... } - @SerializedName("iPv4Sources") val iPv4Sources : List // IPv4 source subnets which are allowed to be tunnelled. Unlike for IPv6, this option is required for bridging IPv4 traffic. Only traffic with a source matching these subnets will be tunnelled. + @SerializedName("enable") var enable : Boolean, // Enable or disable tunnel routing. + @SerializedName("iPv6Destinations") var iPv6Destinations : Map, // IPv6 CIDR subnets, mapped to the EncryptionPublicKey to which they should be routed, e.g. { "aaaa:bbbb:cccc::/e": "boxpubkey", ... }" + @SerializedName("iPv6Sources") var iPv6Sources : List, // Optional IPv6 source subnets which are allowed to be tunnelled in addition to this node's Yggdrasil address/subnet. If not specified, only traffic originating from this node's Yggdrasil address or subnet will be tunnelled. + @SerializedName("iPv4Destinations") var iPv4Destinations : Map, // IPv4 CIDR subnets, mapped to the EncryptionPublicKey to which they should be routed, e.g. { "a.b.c.d/e": "boxpubkey", ... } + @SerializedName("iPv4Sources") var iPv4Sources : List // IPv4 source subnets which are allowed to be tunnelled. Unlike for IPv6, this option is required for bridging IPv4 traffic. Only traffic with a source matching these subnets will be tunnelled. ) \ No newline at end of file