Skip to content

Commit 22a1298

Browse files
committed
Add missing TOML schemas
1 parent b3af61a commit 22a1298

File tree

3 files changed

+176
-0
lines changed

3 files changed

+176
-0
lines changed

schema/dhcpmgr.schema.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"$schema": "https://json-schema.org/draft-04/schema",
3+
"$id": "dhcpmgr.schema.json",
4+
"title": "dhcpmgr",
5+
"description": "dhcpmgr configuration",
6+
"type": "object",
7+
"properties": {
8+
"interface": {
9+
"description": "The network interface to host on. Leaving it undefined will host on a random interface - this is not recommended for most uses, so make sure to set it.",
10+
"type": "string"
11+
},
12+
"firstaddr": {
13+
"description": "The first address to assign to clients.",
14+
"type": "string"
15+
},
16+
"lastaddr": {
17+
"description": "The last address to assign to clients.",
18+
"type": "string"
19+
},
20+
"netmask": {
21+
"description": "The network mask for assigned addresses. If not set, the mask will be inferred from the first and last addresses.",
22+
"type": "string"
23+
},
24+
"gateway": {
25+
"description": "The gateway address to report to clients. Leave unset to not report a gateway.",
26+
"type": "string"
27+
},
28+
"dns": {
29+
"description": "The DNS server addresses to report to clients. Leave unset to not report DNS.",
30+
"type": "array",
31+
"items": {"type": "string"}
32+
},
33+
"leasetime": {
34+
"description": "The length of a DHCP lease, in seconds. Unset means the lease never expires.",
35+
"type": "number"
36+
},
37+
"allowrequests": {
38+
"description": "Whether to allow clients to request static addresses.",
39+
"type": "boolean"
40+
},
41+
"storeassignments": {
42+
"description": "Whether to store address assignments for clients permanently. If this is enabled, the server will store the first address assigned to a client, and will prefer to use that address if available.",
43+
"type": "boolean"
44+
},
45+
"forcereassign": {
46+
"description": "Whether to force re-assigning addresses if a client requests an IP before its lease expires.",
47+
"type": "boolean"
48+
},
49+
"static": {
50+
"description": "Static address assignments. This maps computer IDs to IP addresses.",
51+
"type": "object",
52+
"patternProperties": {
53+
"^\\d+$": {
54+
"type": "string"
55+
}
56+
},
57+
"additionalProperties": false
58+
},
59+
"options": {
60+
"description": "Other options to provide to clients.",
61+
"type": "object"
62+
}
63+
},
64+
"required": ["firstaddr", "lastaddr", "allowrequests", "storeassignments", "forcereassign", "static", "options"]
65+
}

schema/ftpmgr.schema.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"$schema": "https://json-schema.org/draft-04/schema",
3+
"$id": "ftpmgr.schema.json",
4+
"title": "ftpmgr",
5+
"description": "ftpmgr configuration",
6+
"type": "object",
7+
"properties": {
8+
"ip": {
9+
"description": "The IP address to serve on. \"0.0.0.0\" indicates any IP/interface.",
10+
"type": "string"
11+
},
12+
"port": {
13+
"description": "The port to serve the command stream on. FTP standard is 21.",
14+
"type": "number"
15+
},
16+
"passivePortRange": {
17+
"description": "The range of ports to reserve for passive connections.",
18+
"type": "array",
19+
"items": {"type": "number"},
20+
"minItems": 2,
21+
"maxItems": 2
22+
},
23+
"allUsers": {
24+
"description": "Set this to allow any user registered on the system to log in.",
25+
"type": "boolean"
26+
},
27+
"users": {
28+
"description": "The users allowed to connect. A special \"anonymous\" user is used for connections without a login - if not present, clients will be required to log in before accessing files.",
29+
"type": "object",
30+
"patternProperties": {
31+
".*": {
32+
"type": "object",
33+
"properties": {
34+
"systemUser": {
35+
"description": "The Phoenix username to run the server as.",
36+
"type": "string"
37+
},
38+
"useSystemLogin": {
39+
"description": "Whether to use usermgr to authenticate logins.",
40+
"type": "boolean",
41+
"default": true
42+
},
43+
"allowWrite": {
44+
"description": "Whether to allow the user to write files.",
45+
"type": "boolean",
46+
"default": false
47+
},
48+
"root": {
49+
"description": "The filesystem root visible to the user.",
50+
"type": "string"
51+
},
52+
"password": {
53+
"description": "The password for the user (plaintext!).",
54+
"type": "string"
55+
},
56+
"passwordHash": {
57+
"description": "The hash of the password in SHA-256.",
58+
"type": "string"
59+
},
60+
"passwordSalt": {
61+
"description": "The salt applied to the end of the password.",
62+
"type": "string"
63+
}
64+
}
65+
}
66+
}
67+
}
68+
},
69+
"required": ["ip", "port", "passivePortRange", "users"]
70+
}

schema/netmgr.schema.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "https://json-schema.org/draft-04/schema",
3+
"$id": "netmgr.schema.json",
4+
"title": "netmgr",
5+
"description": "netmgr configuration",
6+
"type": "object",
7+
"patternProperties": {
8+
".*": {
9+
"description": "Default configuration",
10+
"type": "object",
11+
"properties": {
12+
"acquire": {
13+
"description": "Sets the way to acquire a network address.",
14+
"type": "string",
15+
"enum": ["none", "dhcp", "dhcp-static", "static"]
16+
},
17+
"address": {
18+
"description": "The IP address to use for a static address",
19+
"type": "string"
20+
},
21+
"netmask": {
22+
"description": "The network mask to use for a static address.",
23+
"type": "string"
24+
},
25+
"gateway": {
26+
"description": "The gateway (router) address to use for a static address.",
27+
"type": "string"
28+
},
29+
"dns": {
30+
"description": "DNS servers to use when resolving domain names.",
31+
"type": "array",
32+
"items": {
33+
"type": "string"
34+
}
35+
}
36+
},
37+
"required": ["acquire"]
38+
}
39+
}
40+
}
41+

0 commit comments

Comments
 (0)