-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.schema.json
223 lines (223 loc) · 6.78 KB
/
config.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
{
"pluginAlias": "CloudflaredTunnel",
"pluginType": "platform",
"singular": true,
"customUi": true,
"customUiPath": "./dist/homebridge-ui",
"headerDisplay": "<p align='center'><img width='250px' src='https://raw.githubusercontent.com/homebridge-plugins/homebridge-cloudflared-tunnel/latest/branding/Homebridge_x_CloudflaredTunnel.svg'></p>\n\n<p>The Homebridge Cloudflared Tunnel plugin allows you to run a Cloudflare-Tunnel for exposing your Homebridge instance for remote access.",
"footerDisplay": "Your CloudflaredTunnel has been created. Please raise any issues on our [project page](https://github.com/homebridge-plugins/homebridge-cloudflared-tunnel/issues).\n\nIf you would like to have other features, fill out [Feature Request Form](https://github.com/homebridge-plugins/homebridge-cloudflared-tunnel/issues/new?assignees=&labels=&template=feature_request.md).",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
"default": "CloudflaredTunnel",
"required": true
},
"domain": {
"type": "string",
"title": "Domain",
"description": "The domain of the self specified tunnel.",
"required": false
},
"token": {
"type": "string",
"title": "Token",
"description": "The token to use for the self specified tunnel.",
"required": false,
"condition": {
"functionBody": "return (!model.url || (!model.protocol && !model.hostname && !model.port));"
}
},
"acceptCloudflareNotice": {
"type": "boolean",
"title": "Auto Start Tunnel Install",
"required": true,
"description": "Automatically start the Cloudflared Tunnel install process.",
"condition": {
"functionBody": "return (!model.token && !model.domain);"
}
},
"url": {
"type": "string",
"title": "URL",
"placeholder": "http://localhost:8581",
"pattern": "^https?://",
"required": false,
"condition": {
"functionBody": "return ((!model.port && !model.hostname && !model.protocol) || (!model.domain && !model.token));"
},
"description": "The URL to tunnel to. If you are using a URL, you do not need to specify the protocol, hostname, or port.",
"default": "",
"format": "uri",
"patternErrorMessage": "URL must start with http:// or https://",
"validationMessage": "URL must start with http:// or https://",
"validationKeywords": [
"pattern"
],
"validation": {
"pattern": "^https?://"
}
},
"protocol": {
"type": "string",
"title": "Protocol",
"required": false,
"default": "",
"oneOf": [
{
"title": "HTTP",
"enum": [
"http"
]
},
{
"title": "HTTPS",
"enum": [
"https"
]
}
],
"description": "The protocol to use for the tunnel. If you are using a URL, you do not need to specify the protocol, hostname, or port.",
"condition": {
"functionBody": "return (!model.url || (!model.domain && !model.token));"
}
},
"hostname": {
"type": "string",
"title": "hostname",
"placeholder": "homebridge.local",
"required": false,
"description": "The hostname to tunnel to. If you are using a URL, you do not need to specify the protocol, hostname, or port.",
"validation": {
"pattern": "^(?!\\s*$).+",
"functionBody": "return (!model.url);"
},
"validationMessage": "Hostname must be specified if not using a URL",
"pattern": "^(?!\\s*$).+",
"patternErrorMessage": "Hostname must be specified if not using a URL",
"validationKeywords": [
"pattern"
],
"condition": {
"functionBody": "return (!model.url || (!model.domain && !model.token));"
}
},
"port": {
"type": "number",
"title": "Port",
"placeholder": "8581",
"required": false,
"description": "The port to tunnel to. If you are using a URL, you do not need to specify the protocol, hostname, or port.",
"minimum": 1,
"maximum": 65535,
"validationMessage": "Port must be between 1 and 65535",
"validationKeywords": [
"minimum",
"maximum"
],
"validation": {
"minimum": 1,
"maximum": 65535,
"functionBody": "return (!model.url || (!model.domain && !model.token));"
},
"condition": {
"functionBody": "return (!model.url || (!model.domain && !model.token));"
}
},
"verifyTLS": {
"type": "boolean",
"title": "Verify TLS",
"required": false,
"default": false,
"description": "Verify the TLS certificate of the origin server.",
"condition": {
"functionBody": "return ((!model.url || (!model.protocol && !model.hostname && !model.port)) || (!model.domain && !model.token));"
},
"validation": {
"functionBody": "return ((!model.url || (!model.protocol && !model.hostname && !model.port)) || (!model.domain && !model.token));"
}
},
"logging": {
"title": "Plugin Logging Setting",
"type": "string",
"required": true,
"default": "",
"oneOf": [
{
"title": "Default Logging",
"enum": [
""
]
},
{
"title": "Standard Logging",
"enum": [
"standard"
]
},
{
"title": "No Logging",
"enum": [
"none"
]
},
{
"title": "Debug Logging",
"enum": [
"debug"
]
}
]
}
},
"dependentRequired": {
"domain": [
"token"
],
"token": [
"domain"
],
"protocol": [
"hostname",
"port"
],
"hostname": [
"protocol",
"port"
],
"port": [
"protocol",
"hostname"
]
}
},
"layout": [
{
"type": "fieldset",
"title": "Cloudflared Tunnel Settings",
"expandable": true,
"expanded": false,
"items": [
"domain",
"token",
"acceptCloudflareNotice",
"url",
"protocol",
"hostname",
"port",
"verifyTLS"
]
},
{
"type": "fieldset",
"title": "Advanced Settings",
"expandable": true,
"expanded": false,
"items": [
"logging"
]
}
]
}