fix: Change all Config model properties to var instead of val

This commit is contained in:
ChronosX88 2019-08-25 14:57:50 +04:00
parent cfd86afac3
commit ef457d7a9c
Signed by: ChronosXYZ
GPG Key ID: 085A69A82C8C511A
4 changed files with 31 additions and 31 deletions

View File

@ -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<String>,
@SerializedName("interfacePeers") val interfacePeers : Map<String, List<String>>,
@SerializedName("listen") val listen : List<String>,
@SerializedName("adminListen") val adminListen : String,
@SerializedName("multicastInterfaces") val multicastInterfaces : List<String>,
@SerializedName("allowedEncryptionPublicKeys") val allowedEncryptionPublicKeys : List<String>,
@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<String, Any>
@SerializedName("peers") var peers : List<String>,
@SerializedName("interfacePeers") var interfacePeers : Map<String, List<String>>,
@SerializedName("listen") var listen : List<String>,
@SerializedName("adminListen") var adminListen : String,
@SerializedName("multicastInterfaces") var multicastInterfaces : List<String>,
@SerializedName("allowedEncryptionPublicKeys") var allowedEncryptionPublicKeys : List<String>,
@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<String, Any>
)

View File

@ -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<String>, // List of public keys from which network traffic is always accepted, regardless of AllowFromDirect or AllowFromRemote.
@SerializedName("blacklistEncryptionPublicKeys") val blacklistEncryptionPublicKeys : List<String> // 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<String>, // List of public keys from which network traffic is always accepted, regardless of AllowFromDirect or AllowFromRemote.
@SerializedName("blacklistEncryptionPublicKeys") var blacklistEncryptionPublicKeys : List<String> // List of public keys from which network traffic is always rejected, regardless of the whitelist, AllowFromDirect or AllowFromRemote.
)

View File

@ -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).
)

View File

@ -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<String, String>, // 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<String>, // 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<String, String>, // 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<String> // 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<String, String>, // 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<String>, // 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<String, String>, // 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<String> // 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.
)