diff --git a/local.conf/main.tsp b/local.conf/main.tsp index 171db21..db2d72f 100644 --- a/local.conf/main.tsp +++ b/local.conf/main.tsp @@ -4,38 +4,49 @@ using TypeSpec.JsonSchema; @jsonSchema model LocalConf { - settings?: OptionalProperties; - physical?: OptionalProperties; - virtual?: OptionalProperties; + settings?: Settings; + physical?: Physical; + virtual?: Virtual; } -model Physical is Record; +model Physical is Record>; @extension("additionalProperties", Json) -model PhysicalMap { - blacklist: boolean; +model _Physical{ + blacklist: boolean = false; trustedPathId: uint16; // mtu: uint16; not implemented } -model Virtual is Record; +model Virtual is Record>; @extension("additionalProperties", Json) -model VirtualMap { +model _Virtual { + @summary("Hints on where to reach this peer if no upstreams/roots are online") try: Array; + + @summary("Blacklist a physical path for only this peer. ") blacklist: Array; } -model Settings { +model Settings is OptionalProperties<_Settings>; +model _Settings { @summary("Override default port of 9993 and any command line port. It's preferred to override secondaryPort instead.") primaryPort: Port; @summary("Override default randomly selected secondary port.") secondaryPort: Port; + @summary("Override third randomly selected port. This port is used for mapping") tertiaryPort: Port; - portMappingEnabled: boolean; + + @summary("Enable UPnP and NAT-PMP. Default: True") + portMappingEnabled: boolean = true; + + @summary("Array of interface name prefixes (e.g. eth for eth#) to blacklist for ZT traffic") interfacePrefixBlacklist: Array; + + @summary("If non-NULL, allow JSON/HTTP management from this IP network. Default is 127.0.0.1 only.") allowManagementFrom: Array; @summary("bind to these IPs instead of to each interface")