mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-30 13:51:52 +02:00
v0.5: (BREAKING) replacing path with path_patterns, improved docker monitoring mechanism, bug fixes
This commit is contained in:
@@ -23,16 +23,19 @@
|
||||
},
|
||||
"cert_path": {
|
||||
"title": "path of cert file to load/store",
|
||||
"description": "default: certs/cert.crt",
|
||||
"default": "certs/cert.crt",
|
||||
"markdownDescription": "default: `certs/cert.crt`",
|
||||
"type": "string"
|
||||
},
|
||||
"key_path": {
|
||||
"title": "path of key file to load/store",
|
||||
"description": "default: certs/priv.key",
|
||||
"default": "certs/priv.key",
|
||||
"markdownDescription": "default: `certs/priv.key`",
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"title": "DNS Challenge Provider",
|
||||
"default": "local",
|
||||
"type": "string",
|
||||
"enum": ["local", "cloudflare", "clouddns", "duckdns"]
|
||||
},
|
||||
@@ -44,10 +47,11 @@
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"not": true,
|
||||
"const": "local"
|
||||
"not": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"const": "local"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -151,7 +155,7 @@
|
||||
},
|
||||
"docker": {
|
||||
"title": "Docker provider configuration",
|
||||
"description": "docker clients (name: address)",
|
||||
"description": "docker clients (name-address pairs)",
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^[a-zA-Z0-9-_]+$": {
|
||||
@@ -194,7 +198,7 @@
|
||||
"minimum": 0
|
||||
},
|
||||
"redirect_to_https": {
|
||||
"title": "Redirect to HTTPS",
|
||||
"title": "Redirect to HTTPS on HTTP requests",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -32,12 +32,17 @@
|
||||
},
|
||||
{
|
||||
"type": "null",
|
||||
"description": "Auto detect base on port number"
|
||||
"description": "Auto detect base on port format"
|
||||
}
|
||||
]
|
||||
},
|
||||
"host": {
|
||||
"default": "localhost",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null",
|
||||
"description": "localhost (default)"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"format": "ipv4",
|
||||
@@ -56,59 +61,38 @@
|
||||
],
|
||||
"title": "Proxy host (ipv4 / ipv6 / hostname)"
|
||||
},
|
||||
"port": {
|
||||
"title": "Proxy port"
|
||||
},
|
||||
"path": {
|
||||
"title": "Proxy path pattern (See https://pkg.go.dev/net/http#ServeMux)"
|
||||
},
|
||||
"no_tls_verify": {
|
||||
"description": "Disable TLS verification for https proxy",
|
||||
"type": "boolean"
|
||||
},
|
||||
"port": {},
|
||||
"no_tls_verify": {},
|
||||
"path_patterns": {},
|
||||
"set_headers": {},
|
||||
"hide_headers": {}
|
||||
},
|
||||
"required": ["host"],
|
||||
"additionalProperties": false,
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"properties": {
|
||||
"scheme": {
|
||||
"properties": {
|
||||
"scheme": {
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": ["http", "https"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"scheme": {
|
||||
"not": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"scheme": {
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"port": {
|
||||
"markdownDescription": "Proxy port from **1** to **65535**",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]{1,5}$",
|
||||
"minimum": 1,
|
||||
"maximum": 65535,
|
||||
"markdownDescription": "Proxy port from **1** to **65535**",
|
||||
"patternErrorMessage": "'port' must be a number"
|
||||
"pattern": "^\\d{1,5}$",
|
||||
"patternErrorMessage": "`port` must be a number"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
@@ -117,11 +101,16 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": {
|
||||
"path_patterns": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Proxy path"
|
||||
"type": "array",
|
||||
"markdownDescription": "A list of [path patterns](https://pkg.go.dev/net/http#hdr-Patterns-ServeMux)",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^((GET|POST|DELETE|PUT|PATCH|HEAD|OPTIONS|CONNECT)\\s)?(/\\w*)+/?$",
|
||||
"patternErrorMessage": "invalid path pattern"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "null",
|
||||
@@ -133,7 +122,6 @@
|
||||
"type": "object",
|
||||
"description": "Proxy headers to set",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -151,12 +139,15 @@
|
||||
"else": {
|
||||
"properties": {
|
||||
"port": {
|
||||
"markdownDescription": "`listening port`:`proxy port | service name`",
|
||||
"markdownDescription": "`listening port:proxy port` or `listening port:service name`",
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+\\:[0-9a-z]+$",
|
||||
"patternErrorMessage": "'port' must be in the format of '<listening port>:<proxy port | service name>'"
|
||||
"patternErrorMessage": "invalid syntax"
|
||||
},
|
||||
"path": {
|
||||
"no_tls_verify": {
|
||||
"not": true
|
||||
},
|
||||
"path_patterns": {
|
||||
"not": true
|
||||
},
|
||||
"set_headers": {
|
||||
@@ -171,15 +162,22 @@
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"not": {
|
||||
"properties": {
|
||||
"scheme": {
|
||||
"const": "https"
|
||||
}
|
||||
"properties": {
|
||||
"scheme": {
|
||||
"const": "https"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"no_tls_verify": {
|
||||
"description": "Disable TLS verification for https proxy",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"properties": {
|
||||
"no_tls_verify": {
|
||||
"not": true
|
||||
|
||||
Reference in New Issue
Block a user