{ "$id": "https://github.com/yusing/go-proxy/raw/v0.8/schema/providers.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "GoDoxy standalone include file", "oneOf": [ { "type": "object" }, { "type": "null" } ], "patternProperties": { ".+": { "title": "Proxy entry", "type": "object", "properties": { "scheme": { "title": "Proxy scheme", "oneOf": [ { "type": "string", "enum": [ "http", "https", "tcp", "udp", "tcp:tcp", "udp:udp", "tcp:udp", "udp:tcp" ] }, { "type": "null", "description": "Auto detect base on port format" } ] }, "host": { "default": "localhost", "anyOf": [ { "type": "null", "title": "localhost (default)" }, { "type": "string", "format": "ipv4", "title": "ipv4 address" }, { "type": "string", "format": "ipv6", "title": "ipv6 address" }, { "type": "string", "format": "hostname", "title": "hostname" } ], "title": "Proxy host (ipv4/6 / hostname)" }, "port": {}, "no_tls_verify": {}, "path_patterns": {}, "middlewares": {}, "homepage": { "title": "Dashboard config", "type": "object", "additionalProperties": false, "properties": { "show": { "title": "Show on dashboard", "type": "boolean", "default": true }, "name": { "title": "Display name", "type": "string" }, "icon": { "title": "Display icon", "type": "string", "oneOf": [ { "pattern": "^(png|svg|webp)\\/[\\w\\d\\-_]+\\.\\1$", "title": "Icon from walkxcode/dashboard-icons" }, { "pattern": "^https?://", "title": "Absolute URI", "format": "uri" }, { "pattern": "^@target/", "title": "Relative URI to target" } ] }, "url": { "title": "App URL override", "type": "string", "format": "uri", "pattern": "^https?://" }, "category": { "title": "Category", "type": "string" }, "description": { "title": "Description", "type": "string" }, "widget_config": { "title": "Widget config", "type": "object" } } }, "load_balance": { "type": "object", "additionalProperties": false, "properties": { "link": { "type": "string", "title": "Name and subdomain of load-balancer" }, "mode": { "enum": [ "round_robin", "least_conn", "ip_hash" ], "title": "Load-balance mode", "default": "roundrobin" }, "weight": { "type": "integer", "title": "Reserved for future use", "minimum": 0, "maximum": 100 }, "options": { "type": "object", "title": "load-balance mode specific options" } } }, "healthcheck": { "type": "object", "additionalProperties": false, "properties": { "disable": { "type": "boolean", "default": false, "title": "Disable healthcheck" }, "path": { "type": "string", "title": "Healthcheck path", "default": "/", "format": "uri-reference", "description": "should start with `/`" }, "use_get": { "type": "boolean", "title": "Use GET instead of HEAD", "default": false }, "interval": { "type": "string", "title": "healthcheck Interval", "pattern": "^([0-9]+(ms|s|m|h))+$", "default": "5s", "description": "e.g. 5s, 1m, 2h, 3m30s" } } }, "access_log": { "$ref": "https://github.com/yusing/go-proxy/raw/v0.8/schema/access_log.json" } }, "additionalProperties": false, "allOf": [ { "if": { "properties": { "scheme": { "anyOf": [ { "enum": [ "http", "https" ] }, { "type": "null" } ] } } }, "then": { "properties": { "port": { "title": "Proxy port", "markdownDescription": "From **0** to **65535**", "oneOf": [ { "type": "string", "pattern": "^\\d{1,5}$", "patternErrorMessage": "`port` must be a number" }, { "type": "integer", "minimum": 0, "maximum": 65535 } ] }, "path_patterns": { "title": "Path patterns", "type": "array", "markdownDescription": "See https://pkg.go.dev/net/http#hdr-Patterns-ServeMux", "items": { "type": "string", "pattern": "^(?:([A-Z]+) )?(?:([a-zA-Z0-9.-]+)\\/)?(\\/[^\\s]*)$", "patternErrorMessage": "invalid path pattern" } }, "middlewares": { "type": "object" } } }, "else": { "properties": { "port": { "markdownDescription": "`listening port:proxy port` or `listening port:service name`", "type": "string", "pattern": "^[0-9]+:[0-9a-z]+$", "patternErrorMessage": "invalid syntax" }, "no_tls_verify": { "not": true }, "path_patterns": { "not": true }, "middlewares": { "not": true } }, "required": [ "port" ] } }, { "if": { "properties": { "scheme": { "const": "https" } } }, "then": { "properties": { "no_tls_verify": { "title": "Disable TLS verification for https proxy", "type": "boolean", "default": false } } }, "else": { "properties": { "no_tls_verify": { "not": true } } } } ] } }, "additionalProperties": false }