|
|
|
@@ -2,55 +2,59 @@ import "@typespec/json-schema";
|
|
|
|
|
|
|
|
|
|
using TypeSpec.JsonSchema;
|
|
|
|
|
|
|
|
|
|
@extension("additionalProperties", Json<false>)
|
|
|
|
|
@jsonSchema
|
|
|
|
|
model LocalConf {
|
|
|
|
|
model local_conf {
|
|
|
|
|
settings?: Settings;
|
|
|
|
|
physical?: Physical;
|
|
|
|
|
virtual?: Virtual;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
model Physical is Record<OptionalProperties<_Physical>>;
|
|
|
|
|
model Physical is Record<_Physical>;
|
|
|
|
|
|
|
|
|
|
@extension("additionalProperties", Json<false>)
|
|
|
|
|
model _Physical{
|
|
|
|
|
blacklist: boolean = false;
|
|
|
|
|
trustedPathId: uint16;
|
|
|
|
|
blacklist?: boolean = false;
|
|
|
|
|
trustedPathId?: uint16;
|
|
|
|
|
// mtu: uint16; not implemented
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
model Virtual is Record<OptionalProperties<_Virtual>>;
|
|
|
|
|
model Virtual is Record<_Virtual>;
|
|
|
|
|
|
|
|
|
|
@extension("additionalProperties", Json<false>)
|
|
|
|
|
model _Virtual {
|
|
|
|
|
@summary("Hints on where to reach this peer if no upstreams/roots are online")
|
|
|
|
|
try: Array<IPSlashPort>;
|
|
|
|
|
try?: Array<IPSlashPort>;
|
|
|
|
|
|
|
|
|
|
@summary("Blacklist a physical path for only this peer. ")
|
|
|
|
|
blacklist: Array<NetworkSlashBits>;
|
|
|
|
|
blacklist?: Array<NetworkSlashBits>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
model Settings is OptionalProperties<_Settings>;
|
|
|
|
|
model _Settings {
|
|
|
|
|
@extension("additionalProperties", Json<false>)
|
|
|
|
|
model Settings {
|
|
|
|
|
@summary("Override default port of 9993 and any command line port. It's preferred to override secondaryPort instead.")
|
|
|
|
|
primaryPort: Port;
|
|
|
|
|
primaryPort?: Port;
|
|
|
|
|
|
|
|
|
|
@summary("Override default randomly selected secondary port.")
|
|
|
|
|
secondaryPort: Port;
|
|
|
|
|
secondaryPort?: Port;
|
|
|
|
|
|
|
|
|
|
@summary("Override third randomly selected port. This port is used for mapping")
|
|
|
|
|
tertiaryPort: Port;
|
|
|
|
|
tertiaryPort?: Port;
|
|
|
|
|
|
|
|
|
|
@summary("Enable UPnP and NAT-PMP. Default: True")
|
|
|
|
|
portMappingEnabled: boolean = true;
|
|
|
|
|
@summary("false will also disable secondary port. Default: true")
|
|
|
|
|
allowSecondaryPort?: boolean = true;
|
|
|
|
|
|
|
|
|
|
@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<InterfacePrefix>;
|
|
|
|
|
interfacePrefixBlacklist?: Array<InterfacePrefix>;
|
|
|
|
|
|
|
|
|
|
@summary("If non-NULL, allow JSON/HTTP management from this IP network. Default is 127.0.0.1 only.")
|
|
|
|
|
allowManagementFrom: Array<NetworkSlashBits>;
|
|
|
|
|
allowManagementFrom?: Array<NetworkSlashBits>;
|
|
|
|
|
|
|
|
|
|
@summary("bind to these IPs instead of to each interface")
|
|
|
|
|
bind: Array<IP>;
|
|
|
|
|
bind?: Array<IP>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
scalar IPSlashPort extends string;
|
|
|
|
|