mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-12-06 08:16:51 +00:00
Compare commits
10 Commits
5d6916dcf0
...
lang-persi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32208f3864 | ||
|
|
52ab4844dc | ||
|
|
24216f1f2f | ||
|
|
52e528f217 | ||
|
|
4709f9826c | ||
|
|
74a8c5d806 | ||
|
|
82a1a86c3a | ||
|
|
95957a192c | ||
|
|
906ce8ced2 | ||
|
|
89abb9d559 |
@@ -195,11 +195,11 @@ const internalAccessList = {
|
||||
);
|
||||
|
||||
await internalAccessList.build(freshRow)
|
||||
if (Number.parseInt(row.proxy_host_count, 10)) {
|
||||
await internalNginx.bulkGenerateConfigs("proxy_host", row.proxy_hosts);
|
||||
if (Number.parseInt(freshRow.proxy_host_count, 10)) {
|
||||
await internalNginx.bulkGenerateConfigs("proxy_host", freshRow.proxy_hosts);
|
||||
}
|
||||
await internalNginx.reload();
|
||||
return internalAccessList.maskItems(row);
|
||||
return internalAccessList.maskItems(freshRow);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -381,14 +381,14 @@ const internalNginx = {
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {String} host_type
|
||||
* @param {String} hostType
|
||||
* @param {Array} hosts
|
||||
* @returns {Promise}
|
||||
*/
|
||||
bulkGenerateConfigs: (host_type, hosts) => {
|
||||
bulkGenerateConfigs: (hostType, hosts) => {
|
||||
const promises = [];
|
||||
hosts.map((host) => {
|
||||
promises.push(internalNginx.generateConfig(host_type, host));
|
||||
promises.push(internalNginx.generateConfig(hostType, host));
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ export default function (tokenString) {
|
||||
schemas: [roleSchema, permsSchema, objectSchema, permissionSchema],
|
||||
});
|
||||
|
||||
const valid = ajv.validate("permissions", dataSchema);
|
||||
const valid = await ajv.validate("permissions", dataSchema);
|
||||
return valid && dataSchema[permission];
|
||||
} catch (err) {
|
||||
err.permission = permission;
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
"body-parser": "^1.20.3",
|
||||
"compression": "^1.7.4",
|
||||
"express": "^4.20.0",
|
||||
"express-fileupload": "^1.1.9",
|
||||
"gravatar": "^1.8.0",
|
||||
"jsonwebtoken": "^9.0.0",
|
||||
"express-fileupload": "^1.5.2",
|
||||
"gravatar": "^1.8.2",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"knex": "2.4.2",
|
||||
"liquidjs": "10.6.1",
|
||||
"lodash": "^4.17.21",
|
||||
@@ -38,7 +38,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@apidevtools/swagger-parser": "^10.1.0",
|
||||
"@biomejs/biome": "^2.3.1",
|
||||
"@biomejs/biome": "^2.3.2",
|
||||
"chalk": "4.1.2",
|
||||
"nodemon": "^2.0.2"
|
||||
},
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
"description": "Unique identifier",
|
||||
"readOnly": true,
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
"minimum": 1,
|
||||
"example": 11
|
||||
},
|
||||
"expand": {
|
||||
"anyOf": [
|
||||
@@ -38,35 +39,42 @@
|
||||
"created_on": {
|
||||
"description": "Date and time of creation",
|
||||
"readOnly": true,
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "2025-10-28T04:17:54.000Z"
|
||||
},
|
||||
"modified_on": {
|
||||
"description": "Date and time of last update",
|
||||
"readOnly": true,
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "2025-10-28T04:17:54.000Z"
|
||||
},
|
||||
"user_id": {
|
||||
"description": "User ID",
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
"minimum": 1,
|
||||
"example": 2
|
||||
},
|
||||
"certificate_id": {
|
||||
"description": "Certificate ID",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
"minimum": 0,
|
||||
"example": 5
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^new$"
|
||||
"pattern": "^new$",
|
||||
"example": "new"
|
||||
}
|
||||
]
|
||||
],
|
||||
"example": 5
|
||||
},
|
||||
"access_list_id": {
|
||||
"description": "Access List ID",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
"minimum": 0,
|
||||
"example": 3
|
||||
},
|
||||
"domain_names": {
|
||||
"description": "Domain Names separated by a comma",
|
||||
@@ -77,44 +85,157 @@
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[^&| @!#%^();:/\\\\}{=+?<>,~`'\"]+$"
|
||||
}
|
||||
},
|
||||
"example": ["example.com", "www.example.com"]
|
||||
},
|
||||
"enabled": {
|
||||
"description": "Is Enabled",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": false
|
||||
},
|
||||
"ssl_forced": {
|
||||
"description": "Is SSL Forced",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"hsts_enabled": {
|
||||
"description": "Is HSTS Enabled",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"hsts_subdomains": {
|
||||
"description": "Is HSTS applicable to all subdomains",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"ssl_provider": {
|
||||
"type": "string",
|
||||
"pattern": "^(letsencrypt|other)$"
|
||||
"pattern": "^(letsencrypt|other)$",
|
||||
"example": "letsencrypt"
|
||||
},
|
||||
"http2_support": {
|
||||
"description": "HTTP2 Protocol Support",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"block_exploits": {
|
||||
"description": "Should we block common exploits",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": false
|
||||
},
|
||||
"caching_enabled": {
|
||||
"description": "Should we cache assets",
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"email": {
|
||||
"description": "Email address",
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$"
|
||||
"pattern": "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$",
|
||||
"example": "me@example.com"
|
||||
},
|
||||
"directive": {
|
||||
"type": "string",
|
||||
"enum": ["allow", "deny"],
|
||||
"example": "allow"
|
||||
},
|
||||
"address": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))?$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))?$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^all$"
|
||||
}
|
||||
],
|
||||
"example": "192.168.0.11"
|
||||
},
|
||||
"access_items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"username": "admin",
|
||||
"password": "pass"
|
||||
}
|
||||
},
|
||||
"example": [
|
||||
{
|
||||
"username": "admin",
|
||||
"password": "pass"
|
||||
}
|
||||
]
|
||||
},
|
||||
"access_clients": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"address": {
|
||||
"$ref": "#/properties/address"
|
||||
},
|
||||
"directive": {
|
||||
"$ref": "#/properties/directive"
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"directive": "allow",
|
||||
"address": "192.168.0.0/24"
|
||||
}
|
||||
},
|
||||
"example": [
|
||||
{
|
||||
"directive": "allow",
|
||||
"address": "192.168.0.0/24"
|
||||
}
|
||||
]
|
||||
},
|
||||
"certificate_files": {
|
||||
"description": "Certificate Files",
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["certificate", "certificate_key"],
|
||||
"properties": {
|
||||
"certificate": {
|
||||
"type": "string",
|
||||
"example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----"
|
||||
},
|
||||
"certificate_key": {
|
||||
"type": "string",
|
||||
"example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----"
|
||||
},
|
||||
"intermediate_certificate": {
|
||||
"type": "string",
|
||||
"example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"certificate": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----",
|
||||
"certificate_key": "-----BEGIN PRIVATE\nMIID...-----END CERTIFICATE-----"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"type": "object",
|
||||
"description": "Access List object",
|
||||
"required": ["id", "created_on", "modified_on", "owner_user_id", "name", "directive", "address", "satisfy_any", "pass_auth", "meta"],
|
||||
"additionalProperties": false,
|
||||
"required": ["id", "created_on", "modified_on", "owner_user_id", "name", "meta", "satisfy_any", "pass_auth", "proxy_host_count"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "../common.json#/properties/id"
|
||||
@@ -18,36 +17,25 @@
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"directive": {
|
||||
"type": "string",
|
||||
"enum": ["allow", "deny"]
|
||||
},
|
||||
"address": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))?$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))?$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^all$"
|
||||
}
|
||||
]
|
||||
},
|
||||
"satisfy_any": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pass_auth": {
|
||||
"type": "boolean"
|
||||
"minLength": 1,
|
||||
"example": "My Access List"
|
||||
},
|
||||
"meta": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"example": {}
|
||||
},
|
||||
"satisfy_any": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"pass_auth": {
|
||||
"type": "boolean",
|
||||
"example": false
|
||||
},
|
||||
"proxy_host_count": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"example": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,16 +26,19 @@
|
||||
"$ref": "../common.json#/properties/user_id"
|
||||
},
|
||||
"object_type": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "certificate"
|
||||
},
|
||||
"object_id": {
|
||||
"$ref": "../common.json#/properties/id"
|
||||
},
|
||||
"action": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "created"
|
||||
},
|
||||
"meta": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"example": {}
|
||||
},
|
||||
"user": {
|
||||
"$ref": "./user-object.json"
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
},
|
||||
"nice_name": {
|
||||
"type": "string",
|
||||
"description": "Nice Name for the custom certificate"
|
||||
"description": "Nice Name for the custom certificate",
|
||||
"example": "My Custom Cert"
|
||||
},
|
||||
"domain_names": {
|
||||
"description": "Domain Names separated by a comma",
|
||||
@@ -31,12 +32,14 @@
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[^&| @!#%^();:/\\\\}{=+?<>,~`'\"]+$"
|
||||
}
|
||||
},
|
||||
"example": ["example.com", "www.example.com"]
|
||||
},
|
||||
"expires_on": {
|
||||
"description": "Date and time of expiration",
|
||||
"readOnly": true,
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "2025-10-28T04:17:54.000Z"
|
||||
},
|
||||
"owner": {
|
||||
"$ref": "./user-object.json"
|
||||
@@ -56,10 +59,10 @@
|
||||
"dns_challenge": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"dns_provider": {
|
||||
"dns_provider_credentials": {
|
||||
"type": "string"
|
||||
},
|
||||
"dns_provider_credentials": {
|
||||
"dns_provider": {
|
||||
"type": "string"
|
||||
},
|
||||
"letsencrypt_certificate": {
|
||||
@@ -69,6 +72,9 @@
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"dns_challenge": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,13 +35,30 @@
|
||||
"$ref": "../common.json#/properties/http2_support"
|
||||
},
|
||||
"advanced_config": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": ""
|
||||
},
|
||||
"enabled": {
|
||||
"$ref": "../common.json#/properties/enabled"
|
||||
},
|
||||
"meta": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"example": {}
|
||||
},
|
||||
"certificate": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null",
|
||||
"example": null
|
||||
},
|
||||
{
|
||||
"$ref": "./certificate-object.json"
|
||||
}
|
||||
],
|
||||
"example": null
|
||||
},
|
||||
"owner": {
|
||||
"$ref": "./user-object.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
"required": ["code", "message"],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer"
|
||||
"type": "integer",
|
||||
"example": 400
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "Bad Request"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,15 +27,18 @@
|
||||
"properties": {
|
||||
"major": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
"minimum": 0,
|
||||
"example": 2
|
||||
},
|
||||
"minor": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
"minimum": 0,
|
||||
"example": 10
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
"minimum": 0,
|
||||
"example": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,37 +5,44 @@
|
||||
"visibility": {
|
||||
"type": "string",
|
||||
"description": "Visibility Type",
|
||||
"enum": ["all", "user"]
|
||||
"enum": ["all", "user"],
|
||||
"example": "all"
|
||||
},
|
||||
"access_lists": {
|
||||
"type": "string",
|
||||
"description": "Access Lists Permissions",
|
||||
"enum": ["hidden", "view", "manage"]
|
||||
"enum": ["hidden", "view", "manage"],
|
||||
"example": "view"
|
||||
},
|
||||
"dead_hosts": {
|
||||
"type": "string",
|
||||
"description": "404 Hosts Permissions",
|
||||
"enum": ["hidden", "view", "manage"]
|
||||
"enum": ["hidden", "view", "manage"],
|
||||
"example": "manage"
|
||||
},
|
||||
"proxy_hosts": {
|
||||
"type": "string",
|
||||
"description": "Proxy Hosts Permissions",
|
||||
"enum": ["hidden", "view", "manage"]
|
||||
"enum": ["hidden", "view", "manage"],
|
||||
"example": "hidden"
|
||||
},
|
||||
"redirection_hosts": {
|
||||
"type": "string",
|
||||
"description": "Redirection Permissions",
|
||||
"enum": ["hidden", "view", "manage"]
|
||||
"enum": ["hidden", "view", "manage"],
|
||||
"example": "view"
|
||||
},
|
||||
"streams": {
|
||||
"type": "string",
|
||||
"description": "Streams Permissions",
|
||||
"enum": ["hidden", "view", "manage"]
|
||||
"enum": ["hidden", "view", "manage"],
|
||||
"example": "manage"
|
||||
},
|
||||
"certificates": {
|
||||
"type": "string",
|
||||
"description": "Certificates Permissions",
|
||||
"enum": ["hidden", "view", "manage"]
|
||||
"enum": ["hidden", "view", "manage"],
|
||||
"example": "hidden"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
"hsts_enabled",
|
||||
"hsts_subdomains"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "../common.json#/properties/id"
|
||||
@@ -44,12 +43,14 @@
|
||||
"forward_host": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 255
|
||||
"maxLength": 255,
|
||||
"example": "127.0.0.1"
|
||||
},
|
||||
"forward_port": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
"maximum": 65535,
|
||||
"example": 8080
|
||||
},
|
||||
"access_list_id": {
|
||||
"$ref": "../common.json#/properties/access_list_id"
|
||||
@@ -67,22 +68,28 @@
|
||||
"$ref": "../common.json#/properties/block_exploits"
|
||||
},
|
||||
"advanced_config": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": ""
|
||||
},
|
||||
"meta": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"example": {
|
||||
"nginx_online": true,
|
||||
"nginx_err": null
|
||||
}
|
||||
},
|
||||
"allow_websocket_upgrade": {
|
||||
"description": "Allow Websocket Upgrade for all paths",
|
||||
"example": true,
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"http2_support": {
|
||||
"$ref": "../common.json#/properties/http2_support"
|
||||
},
|
||||
"forward_scheme": {
|
||||
"type": "string",
|
||||
"enum": ["http", "https"]
|
||||
"enum": ["http", "https"],
|
||||
"example": "http"
|
||||
},
|
||||
"enabled": {
|
||||
"$ref": "../common.json#/properties/enabled"
|
||||
@@ -118,7 +125,15 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": [
|
||||
{
|
||||
"path": "/app",
|
||||
"forward_scheme": "http",
|
||||
"forward_host": "example.com",
|
||||
"forward_port": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"hsts_enabled": {
|
||||
"$ref": "../common.json#/properties/hsts_enabled"
|
||||
@@ -129,12 +144,14 @@
|
||||
"certificate": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null"
|
||||
"type": "null",
|
||||
"example": null
|
||||
},
|
||||
{
|
||||
"$ref": "./certificate-object.json"
|
||||
}
|
||||
]
|
||||
],
|
||||
"example": null
|
||||
},
|
||||
"owner": {
|
||||
"$ref": "./user-object.json"
|
||||
@@ -142,12 +159,14 @@
|
||||
"access_list": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null"
|
||||
"type": "null",
|
||||
"example": null
|
||||
},
|
||||
{
|
||||
"$ref": "./access-list-object.json"
|
||||
}
|
||||
]
|
||||
],
|
||||
"example": null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
{
|
||||
"type": "object",
|
||||
"description": "Redirection Host object",
|
||||
"required": ["id", "created_on", "modified_on", "owner_user_id", "domain_names", "forward_http_code", "forward_scheme", "forward_domain_name", "preserve_path", "certificate_id", "ssl_forced", "hsts_enabled", "hsts_subdomains", "http2_support", "block_exploits", "advanced_config", "enabled", "meta"],
|
||||
"required": [
|
||||
"id",
|
||||
"created_on",
|
||||
"modified_on",
|
||||
"owner_user_id",
|
||||
"domain_names",
|
||||
"forward_http_code",
|
||||
"forward_scheme",
|
||||
"forward_domain_name",
|
||||
"preserve_path",
|
||||
"certificate_id",
|
||||
"ssl_forced",
|
||||
"hsts_enabled",
|
||||
"hsts_subdomains",
|
||||
"http2_support",
|
||||
"block_exploits",
|
||||
"advanced_config",
|
||||
"enabled",
|
||||
"meta"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -21,25 +40,30 @@
|
||||
},
|
||||
"forward_http_code": {
|
||||
"description": "Redirect HTTP Status Code",
|
||||
"example": 302,
|
||||
"type": "integer",
|
||||
"minimum": 300,
|
||||
"maximum": 308
|
||||
"maximum": 308,
|
||||
"example": 302
|
||||
},
|
||||
"forward_scheme": {
|
||||
"type": "string",
|
||||
"enum": ["auto", "http", "https"]
|
||||
"enum": [
|
||||
"auto",
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"example": "http"
|
||||
},
|
||||
"forward_domain_name": {
|
||||
"description": "Domain Name",
|
||||
"example": "jc21.com",
|
||||
"type": "string",
|
||||
"pattern": "^(?:[^.*]+\\.?)+[^.]$"
|
||||
"pattern": "^(?:[^.*]+\\.?)+[^.]$",
|
||||
"example": "jc21.com"
|
||||
},
|
||||
"preserve_path": {
|
||||
"description": "Should the path be preserved",
|
||||
"example": true,
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"certificate_id": {
|
||||
"$ref": "../common.json#/properties/certificate_id"
|
||||
@@ -60,13 +84,33 @@
|
||||
"$ref": "../common.json#/properties/block_exploits"
|
||||
},
|
||||
"advanced_config": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": ""
|
||||
},
|
||||
"enabled": {
|
||||
"$ref": "../common.json#/properties/enabled"
|
||||
},
|
||||
"meta": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"example": {
|
||||
"nginx_online": true,
|
||||
"nginx_err": null
|
||||
}
|
||||
},
|
||||
"certificate": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null",
|
||||
"example": null
|
||||
},
|
||||
{
|
||||
"$ref": "./certificate-object.json"
|
||||
}
|
||||
],
|
||||
"example": null
|
||||
},
|
||||
"owner": {
|
||||
"$ref": "./user-object.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"BearerAuth": {
|
||||
"bearerAuth": {
|
||||
"type": "http",
|
||||
"scheme": "bearer"
|
||||
"scheme": "bearer",
|
||||
"bearerFormat": "JWT",
|
||||
"description": "JWT Bearer Token authentication"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
{
|
||||
"type": "object",
|
||||
"description": "Stream object",
|
||||
"required": ["id", "created_on", "modified_on", "owner_user_id", "incoming_port", "forwarding_host", "forwarding_port", "tcp_forwarding", "udp_forwarding", "enabled", "meta"],
|
||||
"required": [
|
||||
"id",
|
||||
"created_on",
|
||||
"modified_on",
|
||||
"owner_user_id",
|
||||
"incoming_port",
|
||||
"forwarding_host",
|
||||
"forwarding_port",
|
||||
"tcp_forwarding",
|
||||
"udp_forwarding",
|
||||
"enabled",
|
||||
"meta"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -19,15 +31,16 @@
|
||||
"incoming_port": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
"maximum": 65535,
|
||||
"example": 9090
|
||||
},
|
||||
"forwarding_host": {
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "Domain Name",
|
||||
"example": "jc21.com",
|
||||
"type": "string",
|
||||
"pattern": "^(?:[^.*]+\\.?)+[^.]$"
|
||||
"pattern": "^(?:[^.*]+\\.?)+[^.]$",
|
||||
"example": "example.com"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
@@ -37,18 +50,22 @@
|
||||
"type": "string",
|
||||
"format": "ipv6"
|
||||
}
|
||||
]
|
||||
],
|
||||
"example": "example.com"
|
||||
},
|
||||
"forwarding_port": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
"maximum": 65535,
|
||||
"example": 80
|
||||
},
|
||||
"tcp_forwarding": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"udp_forwarding": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": false
|
||||
},
|
||||
"enabled": {
|
||||
"$ref": "../common.json#/properties/enabled"
|
||||
@@ -57,10 +74,8 @@
|
||||
"$ref": "../common.json#/properties/certificate_id"
|
||||
},
|
||||
"meta": {
|
||||
"type": "object"
|
||||
},
|
||||
"owner": {
|
||||
"$ref": "./user-object.json"
|
||||
"type": "object",
|
||||
"example": {}
|
||||
},
|
||||
"certificate": {
|
||||
"oneOf": [
|
||||
@@ -70,7 +85,11 @@
|
||||
{
|
||||
"$ref": "./certificate-object.json"
|
||||
}
|
||||
]
|
||||
],
|
||||
"example": null
|
||||
},
|
||||
"owner": {
|
||||
"$ref": "./user-object.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,37 +77,37 @@
|
||||
"proxy_hosts": {
|
||||
"type": "string",
|
||||
"description": "Proxy Hosts access level",
|
||||
"example": "all",
|
||||
"example": "manage",
|
||||
"pattern": "^(manage|view|hidden)$"
|
||||
},
|
||||
"redirection_hosts": {
|
||||
"type": "string",
|
||||
"description": "Redirection Hosts access level",
|
||||
"example": "all",
|
||||
"example": "manage",
|
||||
"pattern": "^(manage|view|hidden)$"
|
||||
},
|
||||
"dead_hosts": {
|
||||
"type": "string",
|
||||
"description": "Dead Hosts access level",
|
||||
"example": "all",
|
||||
"example": "manage",
|
||||
"pattern": "^(manage|view|hidden)$"
|
||||
},
|
||||
"streams": {
|
||||
"type": "string",
|
||||
"description": "Streams access level",
|
||||
"example": "all",
|
||||
"example": "manage",
|
||||
"pattern": "^(manage|view|hidden)$"
|
||||
},
|
||||
"access_lists": {
|
||||
"type": "string",
|
||||
"description": "Access Lists access level",
|
||||
"example": "all",
|
||||
"example": "hidden",
|
||||
"pattern": "^(manage|view|hidden)$"
|
||||
},
|
||||
"certificates": {
|
||||
"type": "string",
|
||||
"description": "Certificates access level",
|
||||
"example": "all",
|
||||
"example": "view",
|
||||
"pattern": "^(manage|view|hidden)$"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "getAuditLogs",
|
||||
"summary": "Get Audit Logs",
|
||||
"tags": ["Audit Log"],
|
||||
"tags": ["audit-log"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["audit-log"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
{
|
||||
"operationId": "getAuditLog",
|
||||
"summary": "Get Audit Log Event",
|
||||
"tags": [
|
||||
"Audit Log"
|
||||
],
|
||||
"tags": ["audit-log"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": [
|
||||
"audit-log"
|
||||
"bearerAuth": [
|
||||
"admin"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -15,6 +13,7 @@
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "Audit Log Event ID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"operationId": "health",
|
||||
"summary": "Returns the API health status",
|
||||
"tags": ["Public"],
|
||||
"tags": ["public"],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"operationId": "getAccessLists",
|
||||
"summary": "Get all access lists",
|
||||
"tags": ["Access Lists"],
|
||||
"tags": ["access-lists"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["access_lists"]
|
||||
"bearerAuth": [
|
||||
"access_lists.view"
|
||||
]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -14,7 +16,12 @@
|
||||
"description": "Expansions",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": ["owner", "items", "clients", "proxy_hosts"]
|
||||
"enum": [
|
||||
"owner",
|
||||
"items",
|
||||
"clients",
|
||||
"proxy_hosts"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -23,22 +30,16 @@
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": [
|
||||
{
|
||||
"id": 1,
|
||||
"created_on": "2024-10-08T22:15:40.000Z",
|
||||
"modified_on": "2024-10-08T22:15:40.000Z",
|
||||
"owner_user_id": 1,
|
||||
"name": "test1234",
|
||||
"meta": {},
|
||||
"satisfy_any": true,
|
||||
"pass_auth": false,
|
||||
"proxy_host_count": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
"example": {
|
||||
"id": 1,
|
||||
"created_on": "2024-10-08T22:15:40.000Z",
|
||||
"modified_on": "2024-10-08T22:15:40.000Z",
|
||||
"owner_user_id": 1,
|
||||
"name": "test1234",
|
||||
"meta": {},
|
||||
"satisfy_any": true,
|
||||
"pass_auth": false,
|
||||
"proxy_host_count": 0
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "../../../components/access-list-object.json"
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "deleteAccessList",
|
||||
"summary": "Delete a Access List",
|
||||
"tags": ["Access Lists"],
|
||||
"tags": ["access-lists"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["access_lists"]
|
||||
"bearerAuth": ["access_lists.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "listID",
|
||||
"description": "Access List ID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,49 +1,54 @@
|
||||
{
|
||||
"operationId": "getAccessList",
|
||||
"summary": "Get a access List",
|
||||
"tags": ["Access Lists"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["access_lists"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "listID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"required": true,
|
||||
"example": 1
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 1,
|
||||
"created_on": "2020-01-30T09:36:08.000Z",
|
||||
"modified_on": "2020-01-30T09:41:04.000Z",
|
||||
"is_disabled": false,
|
||||
"email": "jc@jc21.com",
|
||||
"name": "Jamie Curnow",
|
||||
"nickname": "James",
|
||||
"avatar": "//www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?default=mm",
|
||||
"roles": ["admin"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "../../../../components/access-list-object.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"operationId": "getAccessList",
|
||||
"summary": "Get a access List",
|
||||
"tags": [
|
||||
"access-lists"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": [
|
||||
"access_lists.view"
|
||||
]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "listID",
|
||||
"description": "Access List ID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"required": true,
|
||||
"example": 1
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 1,
|
||||
"created_on": "2025-10-28T04:06:55.000Z",
|
||||
"modified_on": "2025-10-29T22:48:20.000Z",
|
||||
"owner_user_id": 1,
|
||||
"name": "My Access List",
|
||||
"meta": {},
|
||||
"satisfy_any": false,
|
||||
"pass_auth": false,
|
||||
"proxy_host_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "../../../../components/access-list-object.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "updateAccessList",
|
||||
"summary": "Update a Access List",
|
||||
"tags": ["Access Lists"],
|
||||
"tags": ["access-lists"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["access_lists"]
|
||||
"bearerAuth": ["access_lists.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "listID",
|
||||
"description": "Access List ID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
@@ -39,50 +40,29 @@
|
||||
"$ref": "../../../../components/access-list-object.json#/properties/pass_auth"
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
"$ref": "../../../../common.json#/properties/access_items"
|
||||
},
|
||||
"clients": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"address": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))?$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))?$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^all$"
|
||||
}
|
||||
]
|
||||
},
|
||||
"directive": {
|
||||
"$ref": "../../../../components/access-list-object.json#/properties/directive"
|
||||
}
|
||||
}
|
||||
}
|
||||
"$ref": "../../../../common.json#/properties/access_clients"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"name": "My Access List",
|
||||
"satisfy_any": true,
|
||||
"pass_auth": false,
|
||||
"items": [
|
||||
{
|
||||
"username": "admin2",
|
||||
"password": "pass2"
|
||||
}
|
||||
],
|
||||
"clients": [
|
||||
{
|
||||
"directive": "allow",
|
||||
"address": "192.168.0.0/24"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,7 +88,6 @@
|
||||
"id": 1,
|
||||
"created_on": "2024-10-07T22:43:55.000Z",
|
||||
"modified_on": "2024-10-08T12:52:54.000Z",
|
||||
"is_deleted": false,
|
||||
"is_disabled": false,
|
||||
"email": "admin@example.com",
|
||||
"name": "Administrator",
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"operationId": "createAccessList",
|
||||
"summary": "Create a Access List",
|
||||
"tags": ["Access Lists"],
|
||||
"tags": ["access-lists"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["access_lists"]
|
||||
"bearerAuth": [
|
||||
"access_lists.manage"
|
||||
]
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
@@ -15,7 +17,9 @@
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["name"],
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"$ref": "../../../components/access-list-object.json#/properties/name"
|
||||
@@ -27,54 +31,29 @@
|
||||
"$ref": "../../../components/access-list-object.json#/properties/pass_auth"
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
"$ref": "../../../common.json#/properties/access_items"
|
||||
},
|
||||
"clients": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"address": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))?$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))?$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^all$"
|
||||
}
|
||||
]
|
||||
},
|
||||
"directive": {
|
||||
"$ref": "../../../components/access-list-object.json#/properties/directive"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"$ref": "../../../components/access-list-object.json#/properties/meta"
|
||||
"$ref": "../../../common.json#/properties/access_clients"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"name": "My Access List",
|
||||
"satisfy_any": true,
|
||||
"pass_auth": false,
|
||||
"items": [
|
||||
{
|
||||
"username": "admin",
|
||||
"password": "pass"
|
||||
}
|
||||
],
|
||||
"clients": [
|
||||
{
|
||||
"directive": "allow",
|
||||
"address": "192.168.0.0/24"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,13 +79,14 @@
|
||||
"id": 1,
|
||||
"created_on": "2024-10-07T22:43:55.000Z",
|
||||
"modified_on": "2024-10-08T12:52:54.000Z",
|
||||
"is_deleted": false,
|
||||
"is_disabled": false,
|
||||
"email": "admin@example.com",
|
||||
"name": "Administrator",
|
||||
"nickname": "some guy",
|
||||
"avatar": "//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?default=mm",
|
||||
"roles": ["admin"]
|
||||
"roles": [
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "deleteCertificate",
|
||||
"summary": "Delete a Certificate",
|
||||
"tags": ["Certificates"],
|
||||
"tags": ["certificates"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["certificates"]
|
||||
"bearerAuth": ["certificates.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "certID",
|
||||
"description": "Certificate ID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "downloadCertificate",
|
||||
"summary": "Downloads a Certificate",
|
||||
"tags": ["Certificates"],
|
||||
"tags": ["certificates"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["certificates"]
|
||||
"bearerAuth": ["certificates.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "certID",
|
||||
"description": "Certificate ID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "getCertificate",
|
||||
"summary": "Get a Certificate",
|
||||
"tags": ["Certificates"],
|
||||
"tags": ["certificates"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["certificates"]
|
||||
"bearerAuth": ["certificates.view"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "certID",
|
||||
"description": "Certificate ID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "renewCertificate",
|
||||
"summary": "Renews a Certificate",
|
||||
"tags": ["Certificates"],
|
||||
"tags": ["certificates"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["certificates"]
|
||||
"bearerAuth": ["certificates.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "certID",
|
||||
"description": "Certificate ID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
@@ -32,7 +33,6 @@
|
||||
"id": 4,
|
||||
"created_on": "2024-10-09T05:31:58.000Z",
|
||||
"owner_user_id": 1,
|
||||
"is_deleted": false,
|
||||
"provider": "letsencrypt",
|
||||
"nice_name": "My Test Cert",
|
||||
"domain_names": ["test.jc21.supernerd.pro"],
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "uploadCertificate",
|
||||
"summary": "Uploads a custom Certificate",
|
||||
"tags": ["Certificates"],
|
||||
"tags": ["certificates"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["certificates"]
|
||||
"bearerAuth": ["certificates.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "certID",
|
||||
"description": "Certificate ID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
@@ -20,28 +21,7 @@
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "Certificate Files",
|
||||
"required": true,
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["certificate", "certificate_key"],
|
||||
"properties": {
|
||||
"certificate": {
|
||||
"type": "string"
|
||||
},
|
||||
"certificate_key": {
|
||||
"type": "string"
|
||||
},
|
||||
"intermediate_certificate": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"$ref": "../../../../../common.json#/properties/certificate_files"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
@@ -63,15 +43,18 @@
|
||||
"properties": {
|
||||
"certificate": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----"
|
||||
},
|
||||
"certificate_key": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----"
|
||||
},
|
||||
"intermediate_certificate": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
{
|
||||
"operationId": "getDNSProviders",
|
||||
"summary": "Get DNS Providers for Certificates",
|
||||
"tags": [
|
||||
"Certificates"
|
||||
],
|
||||
"tags": ["certificates"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": [
|
||||
"certificates"
|
||||
]
|
||||
"bearerAuth": ["certificates.view"]
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "getCertificates",
|
||||
"summary": "Get all certificates",
|
||||
"tags": ["Certificates"],
|
||||
"tags": ["certificates"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["certificates"]
|
||||
"bearerAuth": ["certificates.view"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "createCertificate",
|
||||
"summary": "Create a Certificate",
|
||||
"tags": ["Certificates"],
|
||||
"tags": ["certificates"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["certificates"]
|
||||
"bearerAuth": ["certificates.manage"]
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
@@ -30,6 +30,13 @@
|
||||
"$ref": "../../../components/certificate-object.json#/properties/meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"provider": "letsencrypt",
|
||||
"domain_names": ["test.example.com"],
|
||||
"meta": {
|
||||
"dns_challenge": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,7 +54,6 @@
|
||||
"id": 5,
|
||||
"created_on": "2024-10-09 05:28:35",
|
||||
"owner_user_id": 1,
|
||||
"is_deleted": false,
|
||||
"provider": "letsencrypt",
|
||||
"nice_name": "test.example.com",
|
||||
"domain_names": ["test.example.com"],
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "testHttpReach",
|
||||
"summary": "Test HTTP Reachability",
|
||||
"tags": ["Certificates"],
|
||||
"tags": ["certificates"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["certificates"]
|
||||
"bearerAuth": ["certificates.view"]
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
|
||||
@@ -1,35 +1,14 @@
|
||||
{
|
||||
"operationId": "validateCertificates",
|
||||
"summary": "Validates given Custom Certificates",
|
||||
"tags": ["Certificates"],
|
||||
"tags": ["certificates"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["certificates"]
|
||||
"bearerAuth": ["certificates.manage"]
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "Certificate Files",
|
||||
"required": true,
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["certificate", "certificate_key"],
|
||||
"properties": {
|
||||
"certificate": {
|
||||
"type": "string"
|
||||
},
|
||||
"certificate_key": {
|
||||
"type": "string"
|
||||
},
|
||||
"intermediate_certificate": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"$ref": "../../../../common.json#/properties/certificate_files"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
@@ -62,10 +41,12 @@
|
||||
"required": ["cn", "issuer", "dates"],
|
||||
"properties": {
|
||||
"cn": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "example.com"
|
||||
},
|
||||
"issuer": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "C = US, O = Let's Encrypt, CN = E5"
|
||||
},
|
||||
"dates": {
|
||||
"type": "object",
|
||||
@@ -78,12 +59,17 @@
|
||||
"to": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"from": 1728448218,
|
||||
"to": 1736224217
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"certificate_key": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "getDeadHosts",
|
||||
"summary": "Get all 404 hosts",
|
||||
"tags": ["404 Hosts"],
|
||||
"tags": ["404-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["dead_hosts"]
|
||||
"bearerAuth": ["dead_hosts.view"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "deleteDeadHost",
|
||||
"summary": "Delete a 404 Host",
|
||||
"tags": ["404 Hosts"],
|
||||
"tags": ["404-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["dead_hosts"]
|
||||
"bearerAuth": ["dead_hosts.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the 404 Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "disableDeadHost",
|
||||
"summary": "Disable a 404 Host",
|
||||
"tags": ["404 Hosts"],
|
||||
"tags": ["404-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["dead_hosts"]
|
||||
"bearerAuth": ["dead_hosts.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the 404 Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "enableDeadHost",
|
||||
"summary": "Enable a 404 Host",
|
||||
"tags": ["404 Hosts"],
|
||||
"tags": ["404-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["dead_hosts"]
|
||||
"bearerAuth": ["dead_hosts.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the 404 Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "getDeadHost",
|
||||
"summary": "Get a 404 Host",
|
||||
"tags": ["404 Hosts"],
|
||||
"tags": ["404-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["dead_hosts"]
|
||||
"bearerAuth": ["dead_hosts.view"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the 404 Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "updateDeadHost",
|
||||
"summary": "Update a 404 Host",
|
||||
"tags": ["404 Hosts"],
|
||||
"tags": ["404-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["dead_hosts"]
|
||||
"bearerAuth": ["dead_hosts.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the 404 Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
@@ -86,7 +87,6 @@
|
||||
"id": 1,
|
||||
"created_on": "2024-10-09T00:59:56.000Z",
|
||||
"modified_on": "2024-10-09T00:59:56.000Z",
|
||||
"is_deleted": false,
|
||||
"is_disabled": false,
|
||||
"email": "admin@example.com",
|
||||
"name": "Administrator",
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"operationId": "create404Host",
|
||||
"summary": "Create a 404 Host",
|
||||
"tags": ["404 Hosts"],
|
||||
"tags": ["404-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["dead_hosts"]
|
||||
"bearerAuth": [
|
||||
"dead_hosts.manage"
|
||||
]
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
@@ -15,7 +17,9 @@
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["domain_names"],
|
||||
"required": [
|
||||
"domain_names"
|
||||
],
|
||||
"properties": {
|
||||
"domain_names": {
|
||||
"$ref": "../../../components/dead-host-object.json#/properties/domain_names"
|
||||
@@ -42,6 +46,18 @@
|
||||
"$ref": "../../../components/dead-host-object.json#/properties/meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"domain_names": [
|
||||
"test.example.com"
|
||||
],
|
||||
"certificate_id": 0,
|
||||
"ssl_forced": false,
|
||||
"advanced_config": "",
|
||||
"http2_support": false,
|
||||
"hsts_enabled": false,
|
||||
"hsts_subdomains": false,
|
||||
"meta": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,7 +74,9 @@
|
||||
"created_on": "2024-10-09T01:38:52.000Z",
|
||||
"modified_on": "2024-10-09T01:38:52.000Z",
|
||||
"owner_user_id": 1,
|
||||
"domain_names": ["test.example.com"],
|
||||
"domain_names": [
|
||||
"test.example.com"
|
||||
],
|
||||
"certificate_id": 0,
|
||||
"ssl_forced": false,
|
||||
"advanced_config": "",
|
||||
@@ -72,13 +90,14 @@
|
||||
"id": 1,
|
||||
"created_on": "2024-10-09T00:59:56.000Z",
|
||||
"modified_on": "2024-10-09T00:59:56.000Z",
|
||||
"is_deleted": false,
|
||||
"is_disabled": false,
|
||||
"email": "admin@example.com",
|
||||
"name": "Administrator",
|
||||
"nickname": "Admin",
|
||||
"avatar": "",
|
||||
"roles": ["admin"]
|
||||
"roles": [
|
||||
"admin"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"operationId": "getProxyHosts",
|
||||
"summary": "Get all proxy hosts",
|
||||
"tags": ["Proxy Hosts"],
|
||||
"tags": ["proxy-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["proxy_hosts"]
|
||||
"bearerAuth": [
|
||||
"proxy_hosts.view"
|
||||
]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -14,7 +16,11 @@
|
||||
"description": "Expansions",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": ["access_list", "owner", "certificate"]
|
||||
"enum": [
|
||||
"access_list",
|
||||
"owner",
|
||||
"certificate"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -28,14 +34,16 @@
|
||||
"value": [
|
||||
{
|
||||
"id": 1,
|
||||
"created_on": "2024-10-08T23:23:03.000Z",
|
||||
"modified_on": "2024-10-08T23:23:04.000Z",
|
||||
"created_on": "2025-10-28T01:10:26.000Z",
|
||||
"modified_on": "2025-10-28T04:07:16.000Z",
|
||||
"owner_user_id": 1,
|
||||
"domain_names": ["test.example.com"],
|
||||
"domain_names": [
|
||||
"test.jc21com"
|
||||
],
|
||||
"forward_host": "127.0.0.1",
|
||||
"forward_port": 8989,
|
||||
"access_list_id": 0,
|
||||
"certificate_id": 0,
|
||||
"forward_port": 8081,
|
||||
"access_list_id": 1,
|
||||
"certificate_id": 1,
|
||||
"ssl_forced": false,
|
||||
"caching_enabled": false,
|
||||
"block_exploits": false,
|
||||
@@ -48,7 +56,7 @@
|
||||
"http2_support": false,
|
||||
"forward_scheme": "http",
|
||||
"enabled": true,
|
||||
"locations": null,
|
||||
"locations": [],
|
||||
"hsts_enabled": false,
|
||||
"hsts_subdomains": false
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "deleteProxyHost",
|
||||
"summary": "Delete a Proxy Host",
|
||||
"tags": ["Proxy Hosts"],
|
||||
"tags": ["proxy-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["proxy_hosts"]
|
||||
"bearerAuth": ["proxy_hosts.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the Proxy Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "disableProxyHost",
|
||||
"summary": "Disable a Proxy Host",
|
||||
"tags": ["Proxy Hosts"],
|
||||
"tags": ["proxy-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["proxy_hosts"]
|
||||
"bearerAuth": ["proxy_hosts.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the Proxy Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "enableProxyHost",
|
||||
"summary": "Enable a Proxy Host",
|
||||
"tags": ["Proxy Hosts"],
|
||||
"tags": ["proxy-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["proxy_hosts"]
|
||||
"bearerAuth": ["proxy_hosts.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the Proxy Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
{
|
||||
"operationId": "getProxyHost",
|
||||
"summary": "Get a Proxy Host",
|
||||
"tags": ["Proxy Hosts"],
|
||||
"tags": ["proxy-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["proxy_hosts"]
|
||||
"bearerAuth": [
|
||||
"proxy_hosts.view"
|
||||
]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the Proxy Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
@@ -27,13 +30,15 @@
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 1,
|
||||
"created_on": "2024-10-08T23:23:03.000Z",
|
||||
"modified_on": "2024-10-08T23:26:38.000Z",
|
||||
"id": 3,
|
||||
"created_on": "2025-10-30T01:12:05.000Z",
|
||||
"modified_on": "2025-10-30T01:12:05.000Z",
|
||||
"owner_user_id": 1,
|
||||
"domain_names": ["test.example.com"],
|
||||
"forward_host": "192.168.0.10",
|
||||
"forward_port": 8989,
|
||||
"domain_names": [
|
||||
"test.example.com"
|
||||
],
|
||||
"forward_host": "127.0.0.1",
|
||||
"forward_port": 8080,
|
||||
"access_list_id": 0,
|
||||
"certificate_id": 0,
|
||||
"ssl_forced": false,
|
||||
@@ -48,9 +53,22 @@
|
||||
"http2_support": false,
|
||||
"forward_scheme": "http",
|
||||
"enabled": true,
|
||||
"locations": null,
|
||||
"locations": [],
|
||||
"hsts_enabled": false,
|
||||
"hsts_subdomains": false
|
||||
"hsts_subdomains": false,
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"created_on": "2025-10-28T00:50:24.000Z",
|
||||
"modified_on": "2025-10-28T00:50:24.000Z",
|
||||
"is_disabled": false,
|
||||
"email": "jc@jc21.com",
|
||||
"name": "jamiec",
|
||||
"nickname": "jamiec",
|
||||
"avatar": "//www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?default=mm",
|
||||
"roles": [
|
||||
"admin"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
{
|
||||
"operationId": "updateProxyHost",
|
||||
"summary": "Update a Proxy Host",
|
||||
"tags": ["Proxy Hosts"],
|
||||
"tags": ["proxy-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["proxy_hosts"]
|
||||
"bearerAuth": [
|
||||
"proxy_hosts.manage"
|
||||
]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the Proxy Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
@@ -93,13 +96,15 @@
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 1,
|
||||
"created_on": "2024-10-08T23:23:03.000Z",
|
||||
"modified_on": "2024-10-08T23:26:37.000Z",
|
||||
"id": 3,
|
||||
"created_on": "2025-10-30T01:12:05.000Z",
|
||||
"modified_on": "2025-10-30T01:17:06.000Z",
|
||||
"owner_user_id": 1,
|
||||
"domain_names": ["test.example.com"],
|
||||
"forward_host": "192.168.0.10",
|
||||
"forward_port": 8989,
|
||||
"domain_names": [
|
||||
"test.example.com"
|
||||
],
|
||||
"forward_host": "127.0.0.1",
|
||||
"forward_port": 8080,
|
||||
"access_list_id": 0,
|
||||
"certificate_id": 0,
|
||||
"ssl_forced": false,
|
||||
@@ -114,19 +119,21 @@
|
||||
"http2_support": false,
|
||||
"forward_scheme": "http",
|
||||
"enabled": true,
|
||||
"locations": [],
|
||||
"hsts_enabled": false,
|
||||
"hsts_subdomains": false,
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"created_on": "2024-10-07T22:43:55.000Z",
|
||||
"modified_on": "2024-10-08T12:52:54.000Z",
|
||||
"is_deleted": false,
|
||||
"created_on": "2025-10-28T00:50:24.000Z",
|
||||
"modified_on": "2025-10-28T00:50:24.000Z",
|
||||
"is_disabled": false,
|
||||
"email": "admin@example.com",
|
||||
"name": "Administrator",
|
||||
"nickname": "some guy",
|
||||
"avatar": "//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?default=mm",
|
||||
"roles": ["admin"]
|
||||
"email": "jc@jc21.com",
|
||||
"name": "jamiec",
|
||||
"nickname": "jamiec",
|
||||
"avatar": "//www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?default=mm",
|
||||
"roles": [
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
"certificate": null,
|
||||
"access_list": null
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"operationId": "createProxyHost",
|
||||
"summary": "Create a Proxy Host",
|
||||
"tags": ["Proxy Hosts"],
|
||||
"tags": ["proxy-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["proxy_hosts"]
|
||||
"bearerAuth": [
|
||||
"proxy_hosts.manage"
|
||||
]
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
@@ -15,7 +17,12 @@
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["domain_names", "forward_scheme", "forward_host", "forward_port"],
|
||||
"required": [
|
||||
"domain_names",
|
||||
"forward_scheme",
|
||||
"forward_host",
|
||||
"forward_port"
|
||||
],
|
||||
"properties": {
|
||||
"domain_names": {
|
||||
"$ref": "../../../components/proxy-host-object.json#/properties/domain_names"
|
||||
@@ -69,6 +76,14 @@
|
||||
"$ref": "../../../components/proxy-host-object.json#/properties/locations"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"domain_names": [
|
||||
"test.example.com"
|
||||
],
|
||||
"forward_scheme": "http",
|
||||
"forward_host": "127.0.0.1",
|
||||
"forward_port": 8080
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,13 +96,15 @@
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 1,
|
||||
"created_on": "2024-10-08T23:23:03.000Z",
|
||||
"modified_on": "2024-10-08T23:23:03.000Z",
|
||||
"id": 3,
|
||||
"created_on": "2025-10-30T01:12:05.000Z",
|
||||
"modified_on": "2025-10-30T01:12:05.000Z",
|
||||
"owner_user_id": 1,
|
||||
"domain_names": ["test.example.com"],
|
||||
"domain_names": [
|
||||
"test.example.com"
|
||||
],
|
||||
"forward_host": "127.0.0.1",
|
||||
"forward_port": 8989,
|
||||
"forward_port": 8080,
|
||||
"access_list_id": 0,
|
||||
"certificate_id": 0,
|
||||
"ssl_forced": false,
|
||||
@@ -99,20 +116,22 @@
|
||||
"http2_support": false,
|
||||
"forward_scheme": "http",
|
||||
"enabled": true,
|
||||
"locations": [],
|
||||
"hsts_enabled": false,
|
||||
"hsts_subdomains": false,
|
||||
"certificate": null,
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"created_on": "2024-10-07T22:43:55.000Z",
|
||||
"modified_on": "2024-10-08T12:52:54.000Z",
|
||||
"is_deleted": false,
|
||||
"created_on": "2025-10-28T00:50:24.000Z",
|
||||
"modified_on": "2025-10-28T00:50:24.000Z",
|
||||
"is_disabled": false,
|
||||
"email": "admin@example.com",
|
||||
"name": "Administrator",
|
||||
"nickname": "some guy",
|
||||
"avatar": "//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?default=mm",
|
||||
"roles": ["admin"]
|
||||
"email": "jc@jc21.com",
|
||||
"name": "jamiec",
|
||||
"nickname": "jamiec",
|
||||
"avatar": "//www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?default=mm",
|
||||
"roles": [
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
"access_list": null
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "getRedirectionHosts",
|
||||
"summary": "Get all Redirection hosts",
|
||||
"tags": ["Redirection Hosts"],
|
||||
"tags": ["redirection-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["redirection_hosts"]
|
||||
"bearerAuth": ["redirection_hosts.view"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "deleteRedirectionHost",
|
||||
"summary": "Delete a Redirection Host",
|
||||
"tags": ["Redirection Hosts"],
|
||||
"tags": ["redirection-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["redirection_hosts"]
|
||||
"bearerAuth": ["redirection_hosts.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the Redirection Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "disableRedirectionHost",
|
||||
"summary": "Disable a Redirection Host",
|
||||
"tags": ["Redirection Hosts"],
|
||||
"tags": ["redirection-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["redirection_hosts"]
|
||||
"bearerAuth": ["redirection_hosts.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the Redirection Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "enableRedirectionHost",
|
||||
"summary": "Enable a Redirection Host",
|
||||
"tags": ["Redirection Hosts"],
|
||||
"tags": ["redirection-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["redirection_hosts"]
|
||||
"bearerAuth": ["redirection_hosts.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the Redirection Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "getRedirectionHost",
|
||||
"summary": "Get a Redirection Host",
|
||||
"tags": ["Redirection Hosts"],
|
||||
"tags": ["redirection-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["redirection_hosts"]
|
||||
"bearerAuth": ["redirection_hosts.view"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the Redirection Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "updateRedirectionHost",
|
||||
"summary": "Update a Redirection Host",
|
||||
"tags": ["Redirection Hosts"],
|
||||
"tags": ["redirection-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["redirection_hosts"]
|
||||
"bearerAuth": ["redirection_hosts.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "hostID",
|
||||
"description": "The ID of the Redirection Host",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
@@ -106,7 +107,6 @@
|
||||
"id": 1,
|
||||
"created_on": "2024-10-09T00:59:56.000Z",
|
||||
"modified_on": "2024-10-09T00:59:56.000Z",
|
||||
"is_deleted": false,
|
||||
"is_disabled": false,
|
||||
"email": "admin@example.com",
|
||||
"name": "Administrator",
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"operationId": "createRedirectionHost",
|
||||
"summary": "Create a Redirection Host",
|
||||
"tags": ["Redirection Hosts"],
|
||||
"tags": ["redirection-hosts"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["redirection_hosts"]
|
||||
"bearerAuth": [
|
||||
"redirection_hosts.manage"
|
||||
]
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
@@ -15,7 +17,12 @@
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["domain_names", "forward_scheme", "forward_http_code", "forward_domain_name"],
|
||||
"required": [
|
||||
"domain_names",
|
||||
"forward_scheme",
|
||||
"forward_http_code",
|
||||
"forward_domain_name"
|
||||
],
|
||||
"properties": {
|
||||
"domain_names": {
|
||||
"$ref": "../../../components/redirection-host-object.json#/properties/domain_names"
|
||||
@@ -57,6 +64,23 @@
|
||||
"$ref": "../../../components/redirection-host-object.json#/properties/meta"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"domain_names": [
|
||||
"test.example.com"
|
||||
],
|
||||
"forward_domain_name": "example.com",
|
||||
"forward_scheme": "auto",
|
||||
"forward_http_code": 301,
|
||||
"preserve_path": false,
|
||||
"block_exploits": false,
|
||||
"certificate_id": 0,
|
||||
"ssl_forced": false,
|
||||
"http2_support": false,
|
||||
"hsts_enabled": false,
|
||||
"hsts_subdomains": false,
|
||||
"advanced_config": "",
|
||||
"meta": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,12 +93,14 @@
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"id": 1,
|
||||
"created_on": "2024-10-09T01:13:12.000Z",
|
||||
"modified_on": "2024-10-09T01:13:12.000Z",
|
||||
"id": 2,
|
||||
"created_on": "2025-10-30T01:27:04.000Z",
|
||||
"modified_on": "2025-10-30T01:27:04.000Z",
|
||||
"owner_user_id": 1,
|
||||
"domain_names": ["test.example.com"],
|
||||
"forward_domain_name": "something-else.com",
|
||||
"domain_names": [
|
||||
"test.example.com"
|
||||
],
|
||||
"forward_domain_name": "example.com",
|
||||
"preserve_path": false,
|
||||
"certificate_id": 0,
|
||||
"ssl_forced": false,
|
||||
@@ -85,20 +111,21 @@
|
||||
"enabled": true,
|
||||
"hsts_enabled": false,
|
||||
"hsts_subdomains": false,
|
||||
"forward_scheme": "http",
|
||||
"forward_scheme": "auto",
|
||||
"forward_http_code": 301,
|
||||
"certificate": null,
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"created_on": "2024-10-09T00:59:56.000Z",
|
||||
"modified_on": "2024-10-09T00:59:56.000Z",
|
||||
"is_deleted": false,
|
||||
"created_on": "2025-10-28T00:50:24.000Z",
|
||||
"modified_on": "2025-10-28T00:50:24.000Z",
|
||||
"is_disabled": false,
|
||||
"email": "admin@example.com",
|
||||
"name": "Administrator",
|
||||
"nickname": "Admin",
|
||||
"avatar": "",
|
||||
"roles": ["admin"]
|
||||
"email": "jc@jc21.com",
|
||||
"name": "jamiec",
|
||||
"nickname": "jamiec",
|
||||
"avatar": "//www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?default=mm",
|
||||
"roles": [
|
||||
"admin"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "getStreams",
|
||||
"summary": "Get all streams",
|
||||
"tags": ["Streams"],
|
||||
"tags": ["streams"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["streams"]
|
||||
"bearerAuth": ["streams.view"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"operationId": "createStream",
|
||||
"summary": "Create a Stream",
|
||||
"tags": ["Streams"],
|
||||
"tags": ["streams"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["streams"]
|
||||
"bearerAuth": [
|
||||
"streams.manage"
|
||||
]
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
@@ -15,7 +17,11 @@
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["incoming_port", "forwarding_host", "forwarding_port"],
|
||||
"required": [
|
||||
"incoming_port",
|
||||
"forwarding_host",
|
||||
"forwarding_port"
|
||||
],
|
||||
"properties": {
|
||||
"incoming_port": {
|
||||
"$ref": "../../../components/stream-object.json#/properties/incoming_port"
|
||||
@@ -42,6 +48,15 @@
|
||||
"$ref": "../../../components/dead-host-object.json#/properties/domain_names"
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"incoming_port": 8888,
|
||||
"forwarding_host": "127.0.0.1",
|
||||
"forwarding_port": 8080,
|
||||
"tcp_forwarding": true,
|
||||
"udp_forwarding": false,
|
||||
"certificate_id": 0,
|
||||
"meta": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,13 +87,14 @@
|
||||
"id": 1,
|
||||
"created_on": "2024-10-09T02:33:16.000Z",
|
||||
"modified_on": "2024-10-09T02:33:16.000Z",
|
||||
"is_deleted": false,
|
||||
"is_disabled": false,
|
||||
"email": "admin@example.com",
|
||||
"name": "Administrator",
|
||||
"nickname": "Admin",
|
||||
"avatar": "",
|
||||
"roles": ["admin"]
|
||||
"roles": [
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
"certificate_id": 0
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "deleteStream",
|
||||
"summary": "Delete a Stream",
|
||||
"tags": ["Streams"],
|
||||
"tags": ["streams"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["streams"]
|
||||
"bearerAuth": ["streams.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "streamID",
|
||||
"description": "The ID of the Stream",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "disableStream",
|
||||
"summary": "Disable a Stream",
|
||||
"tags": ["Streams"],
|
||||
"tags": ["streams"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["streams"]
|
||||
"bearerAuth": ["streams.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "streamID",
|
||||
"description": "The ID of the Stream",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "enableStream",
|
||||
"summary": "Enable a Stream",
|
||||
"tags": ["Streams"],
|
||||
"tags": ["streams"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["streams"]
|
||||
"bearerAuth": ["streams.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "streamID",
|
||||
"description": "The ID of the Stream",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "getStream",
|
||||
"summary": "Get a Stream",
|
||||
"tags": ["Streams"],
|
||||
"tags": ["streams"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["streams"]
|
||||
"bearerAuth": ["streams.view"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "streamID",
|
||||
"description": "The ID of the Stream",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{
|
||||
"operationId": "updateStream",
|
||||
"summary": "Update a Stream",
|
||||
"tags": ["Streams"],
|
||||
"tags": ["streams"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["streams"]
|
||||
"bearerAuth": ["streams.manage"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "streamID",
|
||||
"description": "The ID of the Stream",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
@@ -81,7 +82,6 @@
|
||||
"id": 1,
|
||||
"created_on": "2024-10-09T02:33:16.000Z",
|
||||
"modified_on": "2024-10-09T02:33:16.000Z",
|
||||
"is_deleted": false,
|
||||
"is_disabled": false,
|
||||
"email": "admin@example.com",
|
||||
"name": "Administrator",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "reportsHosts",
|
||||
"summary": "Report on Host Statistics",
|
||||
"tags": ["Reports"],
|
||||
"tags": ["reports"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["reports"]
|
||||
"bearerAuth": []
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -27,19 +27,23 @@
|
||||
"properties": {
|
||||
"proxy": {
|
||||
"type": "integer",
|
||||
"description": "Proxy Hosts Count"
|
||||
"description": "Proxy Hosts Count",
|
||||
"example": 20
|
||||
},
|
||||
"redirection": {
|
||||
"type": "integer",
|
||||
"description": "Redirection Hosts Count"
|
||||
"description": "Redirection Hosts Count",
|
||||
"example": 2
|
||||
},
|
||||
"stream": {
|
||||
"type": "integer",
|
||||
"description": "Streams Count"
|
||||
"description": "Streams Count",
|
||||
"example": 0
|
||||
},
|
||||
"dead": {
|
||||
"type": "integer",
|
||||
"description": "404 Hosts Count"
|
||||
"description": "404 Hosts Count",
|
||||
"example": 3
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"operationId": "schema",
|
||||
"summary": "Returns this swagger API schema",
|
||||
"tags": ["Public"],
|
||||
"tags": ["public"],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "getSettings",
|
||||
"summary": "Get all settings",
|
||||
"tags": ["Settings"],
|
||||
"tags": ["settings"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["settings"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "getSetting",
|
||||
"summary": "Get a setting",
|
||||
"tags": ["Settings"],
|
||||
"tags": ["settings"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["settings"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "updateSetting",
|
||||
"summary": "Update a setting",
|
||||
"tags": ["Settings"],
|
||||
"tags": ["settings"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["settings"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -34,7 +34,8 @@
|
||||
"value": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"enum": ["congratulations", "404", "444", "redirect", "html"]
|
||||
"enum": ["congratulations", "404", "444", "redirect", "html"],
|
||||
"example": "html"
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
@@ -46,9 +47,16 @@
|
||||
"html": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"html": "<p>hello world</p>"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"value": "congratulations",
|
||||
"meta": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "refreshToken",
|
||||
"summary": "Refresh your access token",
|
||||
"tags": ["Tokens"],
|
||||
"tags": ["tokens"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["tokens"]
|
||||
"bearerAuth": []
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"operationId": "requestToken",
|
||||
"summary": "Request a new access token from credentials",
|
||||
"tags": ["Tokens"],
|
||||
"tags": ["tokens"],
|
||||
"requestBody": {
|
||||
"description": "Credentials Payload",
|
||||
"required": true,
|
||||
@@ -12,20 +12,27 @@
|
||||
"properties": {
|
||||
"identity": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "me@example.com"
|
||||
},
|
||||
"scope": {
|
||||
"minLength": 1,
|
||||
"type": "string",
|
||||
"enum": ["user"]
|
||||
"enum": ["user"],
|
||||
"example": "user"
|
||||
},
|
||||
"secret": {
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "bigredhorsebanana"
|
||||
}
|
||||
},
|
||||
"required": ["identity", "secret"],
|
||||
"type": "object"
|
||||
},
|
||||
"example": {
|
||||
"identity": "me@example.com",
|
||||
"secret": "bigredhorsebanana"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,10 +44,8 @@
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": {
|
||||
"expires": "2025-02-04T20:40:46.340Z",
|
||||
"token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4"
|
||||
}
|
||||
"expires": "2025-02-04T20:40:46.340Z",
|
||||
"token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "getUsers",
|
||||
"summary": "Get all users",
|
||||
"tags": ["Users"],
|
||||
"tags": ["users"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["users"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "createUser",
|
||||
"summary": "Create a User",
|
||||
"tags": ["Users"],
|
||||
"tags": ["users"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["users"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "updateUserAuth",
|
||||
"summary": "Update a User's Authentication",
|
||||
"tags": ["Users"],
|
||||
"tags": ["users"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["users"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "deleteUser",
|
||||
"summary": "Delete a User",
|
||||
"tags": ["Users"],
|
||||
"tags": ["users"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["users"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "getUser",
|
||||
"summary": "Get a user",
|
||||
"tags": ["Users"],
|
||||
"tags": ["users"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["users"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "loginAsUser",
|
||||
"summary": "Login as this user",
|
||||
"tags": ["Users"],
|
||||
"tags": ["users"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["users"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -35,11 +35,11 @@
|
||||
"created_on": "2020-01-30T10:43:44.000Z",
|
||||
"modified_on": "2020-01-30T10:43:44.000Z",
|
||||
"is_disabled": false,
|
||||
"email": "jc@jc21.com",
|
||||
"name": "Jamie Curnow",
|
||||
"nickname": "James",
|
||||
"email": "user2@example.com",
|
||||
"name": "John Doe",
|
||||
"nickname": "Jonny",
|
||||
"avatar": "//www.gravatar.com/avatar/3c8d73f45fd8763f827b964c76e6032a?default=mm",
|
||||
"roles": ["admin"]
|
||||
"roles": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,16 +50,15 @@
|
||||
"required": ["expires", "token", "user"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"expires": {
|
||||
"description": "Token Expiry Unix Time",
|
||||
"example": 1566540249,
|
||||
"minimum": 1,
|
||||
"type": "number"
|
||||
},
|
||||
"token": {
|
||||
"description": "JWT Token",
|
||||
"example": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4",
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"example": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4"
|
||||
},
|
||||
"expires": {
|
||||
"description": "Token Expiry Timestamp",
|
||||
"type": "string",
|
||||
"example": "2020-01-30T10:43:44.000Z"
|
||||
},
|
||||
"user": {
|
||||
"$ref": "../../../../components/user-object.json"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "updateUserPermissions",
|
||||
"summary": "Update a User's Permissions",
|
||||
"tags": ["Users"],
|
||||
"tags": ["users"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["users"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -27,6 +27,15 @@
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../../../../components/permission-object.json"
|
||||
},
|
||||
"example": {
|
||||
"visibility": "all",
|
||||
"access_lists": "view",
|
||||
"certificates": "hidden",
|
||||
"dead_hosts": "hidden",
|
||||
"proxy_hosts": "manage",
|
||||
"redirection_hosts": "hidden",
|
||||
"streams": "hidden"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"operationId": "updateUser",
|
||||
"summary": "Update a User",
|
||||
"tags": ["Users"],
|
||||
"tags": ["users"],
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": ["users"]
|
||||
"bearerAuth": ["admin"]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
"openapi": "3.1.0",
|
||||
"info": {
|
||||
"title": "Nginx Proxy Manager API",
|
||||
"version": "2.x.x"
|
||||
"version": "2.x.x",
|
||||
"description": "This is the official API documentation for Nginx Proxy Manager.\n\nMost endpoints require authentication via Bearer Token (JWT). You can generate a token by logging in via the `POST /tokens` endpoint.\n\nFor more information, visit the [Nginx Proxy Manager Documentation](https://nginxproxymanager.com)."
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
@@ -11,13 +12,59 @@
|
||||
],
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"bearerAuth": {
|
||||
"type": "http",
|
||||
"scheme": "bearer",
|
||||
"bearerFormat": "JWT"
|
||||
}
|
||||
"$ref": "./components/security-schemes.json"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "public",
|
||||
"description": "Endpoints that do not require authentication"
|
||||
},
|
||||
{
|
||||
"name": "audit-log",
|
||||
"description": "Endpoints related to Audit Logs"
|
||||
},
|
||||
{
|
||||
"name": "access-lists",
|
||||
"description": "Endpoints related to Access Lists"
|
||||
},
|
||||
{
|
||||
"name": "certificates",
|
||||
"description": "Endpoints related to Certificates"
|
||||
},
|
||||
{
|
||||
"name": "404-hosts",
|
||||
"description": "Endpoints related to 404 Hosts"
|
||||
},
|
||||
{
|
||||
"name": "proxy-hosts",
|
||||
"description": "Endpoints related to Proxy Hosts"
|
||||
},
|
||||
{
|
||||
"name": "redirection-hosts",
|
||||
"description": "Endpoints related to Redirection Hosts"
|
||||
},
|
||||
{
|
||||
"name": "streams",
|
||||
"description": "Endpoints related to Streams"
|
||||
},
|
||||
{
|
||||
"name": "reports",
|
||||
"description": "Endpoints for viewing reports"
|
||||
},
|
||||
{
|
||||
"name": "settings",
|
||||
"description": "Endpoints for managing application settings"
|
||||
},
|
||||
{
|
||||
"name": "tokens",
|
||||
"description": "Endpoints for managing authentication tokens"
|
||||
},
|
||||
{
|
||||
"name": "users",
|
||||
"description": "Endpoints for managing users"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/": {
|
||||
"get": {
|
||||
|
||||
@@ -43,59 +43,59 @@
|
||||
ajv-draft-04 "^1.0.0"
|
||||
call-me-maybe "^1.0.2"
|
||||
|
||||
"@biomejs/biome@^2.3.1":
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-2.3.1.tgz#d1a9284f52986324f288cdaf450331a0f3fb1da7"
|
||||
integrity sha512-A29evf1R72V5bo4o2EPxYMm5mtyGvzp2g+biZvRFx29nWebGyyeOSsDWGx3tuNNMFRepGwxmA9ZQ15mzfabK2w==
|
||||
"@biomejs/biome@^2.3.2":
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-2.3.2.tgz#aeeb5f12c39571a18f36a919be63ba7dbc7b290a"
|
||||
integrity sha512-8e9tzamuDycx7fdrcJ/F/GDZ8SYukc5ud6tDicjjFqURKYFSWMl0H0iXNXZEGmcmNUmABgGuHThPykcM41INgg==
|
||||
optionalDependencies:
|
||||
"@biomejs/cli-darwin-arm64" "2.3.1"
|
||||
"@biomejs/cli-darwin-x64" "2.3.1"
|
||||
"@biomejs/cli-linux-arm64" "2.3.1"
|
||||
"@biomejs/cli-linux-arm64-musl" "2.3.1"
|
||||
"@biomejs/cli-linux-x64" "2.3.1"
|
||||
"@biomejs/cli-linux-x64-musl" "2.3.1"
|
||||
"@biomejs/cli-win32-arm64" "2.3.1"
|
||||
"@biomejs/cli-win32-x64" "2.3.1"
|
||||
"@biomejs/cli-darwin-arm64" "2.3.2"
|
||||
"@biomejs/cli-darwin-x64" "2.3.2"
|
||||
"@biomejs/cli-linux-arm64" "2.3.2"
|
||||
"@biomejs/cli-linux-arm64-musl" "2.3.2"
|
||||
"@biomejs/cli-linux-x64" "2.3.2"
|
||||
"@biomejs/cli-linux-x64-musl" "2.3.2"
|
||||
"@biomejs/cli-win32-arm64" "2.3.2"
|
||||
"@biomejs/cli-win32-x64" "2.3.2"
|
||||
|
||||
"@biomejs/cli-darwin-arm64@2.3.1":
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.1.tgz#607835f8ef043e1a80f9ad2a232c9e860941ab60"
|
||||
integrity sha512-ombSf3MnTUueiYGN1SeI9tBCsDUhpWzOwS63Dove42osNh0PfE1cUtHFx6eZ1+MYCCLwXzlFlYFdrJ+U7h6LcA==
|
||||
"@biomejs/cli-darwin-arm64@2.3.2":
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.2.tgz#93f866161abe32e702987ccbddf492c1aabe016f"
|
||||
integrity sha512-4LECm4kc3If0JISai4c3KWQzukoUdpxy4fRzlrPcrdMSRFksR9ZoXK7JBcPuLBmd2SoT4/d7CQS33VnZpgBjew==
|
||||
|
||||
"@biomejs/cli-darwin-x64@2.3.1":
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.1.tgz#654fe4aaa8ea5d5bde5457db4961ad5d214713ac"
|
||||
integrity sha512-pcOfwyoQkrkbGvXxRvZNe5qgD797IowpJPovPX5biPk2FwMEV+INZqfCaz4G5bVq9hYnjwhRMamg11U4QsRXrQ==
|
||||
"@biomejs/cli-darwin-x64@2.3.2":
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.2.tgz#9c3dffdac12e4f4d8db7680ca20f58ace1f38c23"
|
||||
integrity sha512-jNMnfwHT4N3wi+ypRfMTjLGnDmKYGzxVr1EYAPBcauRcDnICFXN81wD6wxJcSUrLynoyyYCdfW6vJHS/IAoTDA==
|
||||
|
||||
"@biomejs/cli-linux-arm64-musl@2.3.1":
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.1.tgz#5fe502082a575c31ef808cf080cbcd4485964167"
|
||||
integrity sha512-+DZYv8l7FlUtTrWs1Tdt1KcNCAmRO87PyOnxKGunbWm5HKg1oZBSbIIPkjrCtDZaeqSG1DiGx7qF+CPsquQRcg==
|
||||
"@biomejs/cli-linux-arm64-musl@2.3.2":
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.2.tgz#a0424d2fe355cc43c375b3fbf3e42d39b7221d0e"
|
||||
integrity sha512-2Zz4usDG1GTTPQnliIeNx6eVGGP2ry5vE/v39nT73a3cKN6t5H5XxjcEoZZh62uVZvED7hXXikclvI64vZkYqw==
|
||||
|
||||
"@biomejs/cli-linux-arm64@2.3.1":
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.1.tgz#81c02547905d379dbb312e6ff24b04908c2e320f"
|
||||
integrity sha512-td5O8pFIgLs8H1sAZsD6v+5quODihyEw4nv2R8z7swUfIK1FKk+15e4eiYVLcAE4jUqngvh4j3JCNgg0Y4o4IQ==
|
||||
"@biomejs/cli-linux-arm64@2.3.2":
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.2.tgz#f85717c04d420ede20523d173a1fc10df60d4d37"
|
||||
integrity sha512-amnqvk+gWybbQleRRq8TMe0rIv7GHss8mFJEaGuEZYWg1Tw14YKOkeo8h6pf1c+d3qR+JU4iT9KXnBKGON4klw==
|
||||
|
||||
"@biomejs/cli-linux-x64-musl@2.3.1":
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.1.tgz#c7c00beb5eda1ad25185544897e66eeec6be3b0b"
|
||||
integrity sha512-Y3Ob4nqgv38Mh+6EGHltuN+Cq8aj/gyMTJYzkFZV2AEj+9XzoXB9VNljz9pjfFNHUxvLEV4b55VWyxozQTBaUQ==
|
||||
"@biomejs/cli-linux-x64-musl@2.3.2":
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.2.tgz#d3e114c744c32d2c50a77c13476bd941819c92d8"
|
||||
integrity sha512-gzB19MpRdTuOuLtPpFBGrV3Lq424gHyq2lFj8wfX9tvLMLdmA/R9C7k/mqBp/spcbWuHeIEKgEs3RviOPcWGBA==
|
||||
|
||||
"@biomejs/cli-linux-x64@2.3.1":
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.1.tgz#7481d2e7be98d4de574df233766a5bdda037c897"
|
||||
integrity sha512-PYWgEO7up7XYwSAArOpzsVCiqxBCXy53gsReAb1kKYIyXaoAlhBaBMvxR/k2Rm9aTuZ662locXUmPk/Aj+Xu+Q==
|
||||
"@biomejs/cli-linux-x64@2.3.2":
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.2.tgz#f66ce85d2d757d45e6edecce04753a805bd816f0"
|
||||
integrity sha512-8BG/vRAhFz1pmuyd24FQPhNeueLqPtwvZk6yblABY2gzL2H8fLQAF/Z2OPIc+BPIVPld+8cSiKY/KFh6k81xfA==
|
||||
|
||||
"@biomejs/cli-win32-arm64@2.3.1":
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.1.tgz#dac8c7c7223e97f86cd0eed7aa95584984761481"
|
||||
integrity sha512-RHIG/zgo+69idUqVvV3n8+j58dKYABRpMyDmfWu2TITC+jwGPiEaT0Q3RKD+kQHiS80mpBrST0iUGeEXT0bU9A==
|
||||
"@biomejs/cli-win32-arm64@2.3.2":
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.2.tgz#b46f8b47a3d97e766cc5ad5eb67d90eeb230b2cb"
|
||||
integrity sha512-lCruqQlfWjhMlOdyf5pDHOxoNm4WoyY2vZ4YN33/nuZBRstVDuqPPjS0yBkbUlLEte11FbpW+wWSlfnZfSIZvg==
|
||||
|
||||
"@biomejs/cli-win32-x64@2.3.1":
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.1.tgz#f8818ab2c1e3a6e2ed8a656935173e5ce4c720be"
|
||||
integrity sha512-izl30JJ5Dp10mi90Eko47zhxE6pYyWPcnX1NQxKpL/yMhXxf95oLTzfpu4q+MDBh/gemNqyJEwjBpe0MT5iWPA==
|
||||
"@biomejs/cli-win32-x64@2.3.2":
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.2.tgz#a14f5e220dd496705278315ee3e5e028dd657344"
|
||||
integrity sha512-6Ee9P26DTb4D8sN9nXxgbi9Dw5vSOfH98M7UlmkjKB2vtUbrRqCbZiNfryGiwnPIpd6YUoTl7rLVD2/x1CyEHQ==
|
||||
|
||||
"@gar/promisify@^1.0.1":
|
||||
version "1.1.3"
|
||||
@@ -861,7 +861,7 @@ expand-template@^2.0.3:
|
||||
resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c"
|
||||
integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==
|
||||
|
||||
express-fileupload@^1.1.9:
|
||||
express-fileupload@^1.5.2:
|
||||
version "1.5.2"
|
||||
resolved "https://registry.yarnpkg.com/express-fileupload/-/express-fileupload-1.5.2.tgz#4da70ba6f2ffd4c736eab0776445865a9dbd9bfa"
|
||||
integrity sha512-wxUJn2vTHvj/kZCVmc5/bJO15C7aSMyHeuXYY3geKpeKibaAoQGcEv5+sM6nHS2T7VF+QHS4hTWPiY2mKofEdg==
|
||||
@@ -1108,7 +1108,7 @@ graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.2.0, graceful-fs@^4.2.6:
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
||||
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
|
||||
|
||||
gravatar@^1.8.0:
|
||||
gravatar@^1.8.2:
|
||||
version "1.8.2"
|
||||
resolved "https://registry.yarnpkg.com/gravatar/-/gravatar-1.8.2.tgz#f298642b1562ed685af2ae938dbe31ec0c542cc1"
|
||||
integrity sha512-GdRwLM3oYpFQKy47MKuluw9hZ2gaCtiKPbDGdcDEuYDKlc8eNnW27KYL9LVbIDzEsx88WtDWQm2ClBcsgBnj6w==
|
||||
@@ -1352,7 +1352,7 @@ json-schema-traverse@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
|
||||
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
|
||||
|
||||
jsonwebtoken@^9.0.0:
|
||||
jsonwebtoken@^9.0.2:
|
||||
version "9.0.2"
|
||||
resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3"
|
||||
integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==
|
||||
|
||||
@@ -37,6 +37,7 @@ export * from "./getToken";
|
||||
export * from "./getUser";
|
||||
export * from "./getUsers";
|
||||
export * from "./helpers";
|
||||
export * from "./loginAsUser";
|
||||
export * from "./models";
|
||||
export * from "./refreshToken";
|
||||
export * from "./renewCertificate";
|
||||
|
||||
8
frontend/src/api/backend/loginAsUser.ts
Normal file
8
frontend/src/api/backend/loginAsUser.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import * as api from "./base";
|
||||
import type { LoginAsTokenResponse } from "./responseTypes";
|
||||
|
||||
export async function loginAsUser(id: number): Promise<LoginAsTokenResponse> {
|
||||
return await api.post({
|
||||
url: `/users/${id}/login`,
|
||||
});
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AppVersion } from "./models";
|
||||
import type { AppVersion, User } from "./models";
|
||||
|
||||
export interface HealthResponse {
|
||||
status: string;
|
||||
@@ -15,3 +15,7 @@ export interface ValidatedCertificateResponse {
|
||||
certificate: Record<string, any>;
|
||||
certificateKey: boolean;
|
||||
}
|
||||
|
||||
export interface LoginAsTokenResponse extends TokenResponse {
|
||||
user: User;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { Table as ReactTable } from "@tanstack/react-table";
|
||||
import cn from "classnames";
|
||||
import type { ReactNode } from "react";
|
||||
import { Button } from "src/components";
|
||||
import { Button, HasPermission } from "src/components";
|
||||
import { T } from "src/locale";
|
||||
import { type ADMIN, MANAGE, type Permission, type Section } from "src/modules/Permissions";
|
||||
|
||||
interface Props {
|
||||
tableInstance: ReactTable<any>;
|
||||
@@ -12,8 +13,20 @@ interface Props {
|
||||
objects: string;
|
||||
color?: string;
|
||||
customAddBtn?: ReactNode;
|
||||
permissionSection?: Section | typeof ADMIN;
|
||||
permission?: Permission;
|
||||
}
|
||||
function EmptyData({ tableInstance, onNew, isFiltered, object, objects, color = "primary", customAddBtn }: Props) {
|
||||
function EmptyData({
|
||||
tableInstance,
|
||||
onNew,
|
||||
isFiltered,
|
||||
object,
|
||||
objects,
|
||||
color = "primary",
|
||||
customAddBtn,
|
||||
permissionSection,
|
||||
permission,
|
||||
}: Props) {
|
||||
return (
|
||||
<tr>
|
||||
<td colSpan={tableInstance.getVisibleFlatColumns().length}>
|
||||
@@ -27,16 +40,18 @@ function EmptyData({ tableInstance, onNew, isFiltered, object, objects, color =
|
||||
<h2>
|
||||
<T id="object.empty" tData={{ objects }} />
|
||||
</h2>
|
||||
<p className="text-muted">
|
||||
<T id="empty-subtitle" />
|
||||
</p>
|
||||
{customAddBtn ? (
|
||||
customAddBtn
|
||||
) : (
|
||||
<Button className={cn("my-3", `btn-${color}`)} onClick={onNew}>
|
||||
<T id="object.add" tData={{ object }} />
|
||||
</Button>
|
||||
)}
|
||||
<HasPermission section={permissionSection} permission={permission || MANAGE} hideError>
|
||||
<p className="text-muted">
|
||||
<T id="empty-subtitle" />
|
||||
</p>
|
||||
{customAddBtn ? (
|
||||
customAddBtn
|
||||
) : (
|
||||
<Button className={cn("my-3", `btn-${color}`)} onClick={onNew}>
|
||||
<T id="object.add" tData={{ object }} />
|
||||
</Button>
|
||||
)}
|
||||
</HasPermission>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -3,25 +3,29 @@ import Alert from "react-bootstrap/Alert";
|
||||
import { Loading, LoadingPage } from "src/components";
|
||||
import { useUser } from "src/hooks";
|
||||
import { T } from "src/locale";
|
||||
import { type ADMIN, hasPermission, type Permission, type Section } from "src/modules/Permissions";
|
||||
|
||||
interface Props {
|
||||
permission: string;
|
||||
type: "manage" | "view";
|
||||
section?: Section | typeof ADMIN;
|
||||
permission: Permission;
|
||||
hideError?: boolean;
|
||||
children?: ReactNode;
|
||||
pageLoading?: boolean;
|
||||
loadingNoLogo?: boolean;
|
||||
}
|
||||
function HasPermission({
|
||||
section,
|
||||
permission,
|
||||
type,
|
||||
children,
|
||||
hideError = false,
|
||||
pageLoading = false,
|
||||
loadingNoLogo = false,
|
||||
}: Props) {
|
||||
const { data, isLoading } = useUser("me");
|
||||
const perms = data?.permissions;
|
||||
|
||||
if (!section) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
if (isLoading) {
|
||||
if (hideError) {
|
||||
@@ -33,33 +37,7 @@ function HasPermission({
|
||||
return <Loading noLogo={loadingNoLogo} />;
|
||||
}
|
||||
|
||||
let allowed = permission === "";
|
||||
const acceptable = ["manage", type];
|
||||
|
||||
switch (permission) {
|
||||
case "admin":
|
||||
allowed = data?.roles?.includes("admin") || false;
|
||||
break;
|
||||
case "proxyHosts":
|
||||
allowed = acceptable.indexOf(perms?.proxyHosts || "") !== -1;
|
||||
break;
|
||||
case "redirectionHosts":
|
||||
allowed = acceptable.indexOf(perms?.redirectionHosts || "") !== -1;
|
||||
break;
|
||||
case "deadHosts":
|
||||
allowed = acceptable.indexOf(perms?.deadHosts || "") !== -1;
|
||||
break;
|
||||
case "streams":
|
||||
allowed = acceptable.indexOf(perms?.streams || "") !== -1;
|
||||
break;
|
||||
case "accessLists":
|
||||
allowed = acceptable.indexOf(perms?.accessLists || "") !== -1;
|
||||
break;
|
||||
case "certificates":
|
||||
allowed = acceptable.indexOf(perms?.certificates || "") !== -1;
|
||||
break;
|
||||
}
|
||||
|
||||
const allowed = hasPermission(section, permission, data?.permissions, data?.roles);
|
||||
if (allowed) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { IconLock, IconLogout, IconUser } from "@tabler/icons-react";
|
||||
import { LocalePicker, ThemeSwitcher, NavLink } from "src/components";
|
||||
import { LocalePicker, NavLink, ThemeSwitcher } from "src/components";
|
||||
import { useAuthState } from "src/context";
|
||||
import { useUser } from "src/hooks";
|
||||
import { T } from "src/locale";
|
||||
@@ -26,18 +26,18 @@ export function SiteHeader() {
|
||||
<span className="navbar-toggler-icon" />
|
||||
</button>
|
||||
<div className="navbar-brand navbar-brand-autodark d-none-navbar-horizontal pe-0 pe-md-3">
|
||||
<NavLink to="/">
|
||||
<div className={styles.logo}>
|
||||
<img
|
||||
src="/images/logo-no-text.svg"
|
||||
width={40}
|
||||
height={40}
|
||||
className="navbar-brand-image"
|
||||
alt="Logo"
|
||||
/>
|
||||
</div>
|
||||
Nginx Proxy Manager
|
||||
</NavLink>
|
||||
<NavLink to="/">
|
||||
<div className={styles.logo}>
|
||||
<img
|
||||
src="/images/logo-no-text.svg"
|
||||
width={40}
|
||||
height={40}
|
||||
className="navbar-brand-image"
|
||||
alt="Logo"
|
||||
/>
|
||||
</div>
|
||||
Nginx Proxy Manager
|
||||
</NavLink>
|
||||
</div>
|
||||
<div className="navbar-nav flex-row order-md-last">
|
||||
<div className="d-none d-md-flex">
|
||||
|
||||
@@ -11,14 +11,26 @@ import cn from "classnames";
|
||||
import React from "react";
|
||||
import { HasPermission, NavLink } from "src/components";
|
||||
import { T } from "src/locale";
|
||||
import {
|
||||
ACCESS_LISTS,
|
||||
ADMIN,
|
||||
CERTIFICATES,
|
||||
DEAD_HOSTS,
|
||||
type MANAGE,
|
||||
PROXY_HOSTS,
|
||||
REDIRECTION_HOSTS,
|
||||
type Section,
|
||||
STREAMS,
|
||||
VIEW,
|
||||
} from "src/modules/Permissions";
|
||||
|
||||
interface MenuItem {
|
||||
label: string;
|
||||
icon?: React.ElementType;
|
||||
to?: string;
|
||||
items?: MenuItem[];
|
||||
permission?: string;
|
||||
permissionType?: "view" | "manage";
|
||||
permissionSection?: Section | typeof ADMIN;
|
||||
permission?: typeof VIEW | typeof MANAGE;
|
||||
}
|
||||
|
||||
const menuItems: MenuItem[] = [
|
||||
@@ -34,26 +46,26 @@ const menuItems: MenuItem[] = [
|
||||
{
|
||||
to: "/nginx/proxy",
|
||||
label: "proxy-hosts",
|
||||
permission: "proxyHosts",
|
||||
permissionType: "view",
|
||||
permissionSection: PROXY_HOSTS,
|
||||
permission: VIEW,
|
||||
},
|
||||
{
|
||||
to: "/nginx/redirection",
|
||||
label: "redirection-hosts",
|
||||
permission: "redirectionHosts",
|
||||
permissionType: "view",
|
||||
permissionSection: REDIRECTION_HOSTS,
|
||||
permission: VIEW,
|
||||
},
|
||||
{
|
||||
to: "/nginx/stream",
|
||||
label: "streams",
|
||||
permission: "streams",
|
||||
permissionType: "view",
|
||||
permissionSection: STREAMS,
|
||||
permission: VIEW,
|
||||
},
|
||||
{
|
||||
to: "/nginx/404",
|
||||
label: "dead-hosts",
|
||||
permission: "deadHosts",
|
||||
permissionType: "view",
|
||||
permissionSection: DEAD_HOSTS,
|
||||
permission: VIEW,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -61,33 +73,33 @@ const menuItems: MenuItem[] = [
|
||||
to: "/access",
|
||||
icon: IconLock,
|
||||
label: "access-lists",
|
||||
permission: "accessLists",
|
||||
permissionType: "view",
|
||||
permissionSection: ACCESS_LISTS,
|
||||
permission: VIEW,
|
||||
},
|
||||
{
|
||||
to: "/certificates",
|
||||
icon: IconShield,
|
||||
label: "certificates",
|
||||
permission: "certificates",
|
||||
permissionType: "view",
|
||||
permissionSection: CERTIFICATES,
|
||||
permission: VIEW,
|
||||
},
|
||||
{
|
||||
to: "/users",
|
||||
icon: IconUser,
|
||||
label: "users",
|
||||
permission: "admin",
|
||||
permissionSection: ADMIN,
|
||||
},
|
||||
{
|
||||
to: "/audit-log",
|
||||
icon: IconBook,
|
||||
label: "auditlogs",
|
||||
permission: "admin",
|
||||
permissionSection: ADMIN,
|
||||
},
|
||||
{
|
||||
to: "/settings",
|
||||
icon: IconSettings,
|
||||
label: "settings",
|
||||
permission: "admin",
|
||||
permissionSection: ADMIN,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -99,8 +111,8 @@ const getMenuItem = (item: MenuItem, onClick?: () => void) => {
|
||||
return (
|
||||
<HasPermission
|
||||
key={`item-${item.label}`}
|
||||
permission={item.permission || ""}
|
||||
type={item.permissionType || "view"}
|
||||
section={item.permissionSection}
|
||||
permission={item.permission || VIEW}
|
||||
hideError
|
||||
>
|
||||
<li className="nav-item">
|
||||
@@ -122,8 +134,8 @@ const getMenuDropown = (item: MenuItem, onClick?: () => void) => {
|
||||
return (
|
||||
<HasPermission
|
||||
key={`item-${item.label}`}
|
||||
permission={item.permission || ""}
|
||||
type={item.permissionType || "view"}
|
||||
section={item.permissionSection}
|
||||
permission={item.permission || VIEW}
|
||||
hideError
|
||||
>
|
||||
<li className={cns}>
|
||||
@@ -147,8 +159,8 @@ const getMenuDropown = (item: MenuItem, onClick?: () => void) => {
|
||||
return (
|
||||
<HasPermission
|
||||
key={`${idx}-${subitem.to}`}
|
||||
permission={subitem.permission || ""}
|
||||
type={subitem.permissionType || "view"}
|
||||
section={subitem.permissionSection}
|
||||
permission={subitem.permission || VIEW}
|
||||
hideError
|
||||
>
|
||||
<NavLink to={subitem.to} isDropdownItem onClick={onClick}>
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import { createContext, type ReactNode, useContext, useState } from "react";
|
||||
import { useIntervalWhen } from "rooks";
|
||||
import { getToken, refreshToken, type TokenResponse } from "src/api/backend";
|
||||
import { getToken, loginAsUser, refreshToken, type TokenResponse } from "src/api/backend";
|
||||
import AuthStore from "src/modules/AuthStore";
|
||||
|
||||
// Context
|
||||
export interface AuthContextType {
|
||||
authenticated: boolean;
|
||||
login: (username: string, password: string) => Promise<void>;
|
||||
loginAs: (id: number) => Promise<void>;
|
||||
logout: () => void;
|
||||
token?: string;
|
||||
}
|
||||
@@ -34,7 +35,20 @@ function AuthProvider({ children, tokenRefreshInterval = 5 * 60 * 1000 }: Props)
|
||||
handleTokenUpdate(response);
|
||||
};
|
||||
|
||||
const loginAs = async (id: number) => {
|
||||
const response = await loginAsUser(id);
|
||||
AuthStore.add(response);
|
||||
queryClient.clear();
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
const logout = () => {
|
||||
if (AuthStore.count() >= 2) {
|
||||
AuthStore.drop();
|
||||
queryClient.clear();
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
AuthStore.clear();
|
||||
setAuthenticated(false);
|
||||
queryClient.clear();
|
||||
@@ -55,7 +69,7 @@ function AuthProvider({ children, tokenRefreshInterval = 5 * 60 * 1000 }: Props)
|
||||
true,
|
||||
);
|
||||
|
||||
const value = { authenticated, login, logout };
|
||||
const value = { authenticated, login, logout, loginAs };
|
||||
|
||||
return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;
|
||||
}
|
||||
|
||||
@@ -201,6 +201,7 @@
|
||||
"user.current-password": "Current Password",
|
||||
"user.edit-profile": "Edit Profile",
|
||||
"user.full-name": "Full Name",
|
||||
"user.login-as": "Sign in as {name}",
|
||||
"user.logout": "Logout",
|
||||
"user.new-password": "New Password",
|
||||
"user.nickname": "Nickname",
|
||||
|
||||
@@ -1,3 +1,214 @@
|
||||
{
|
||||
"dashboard": "داشبورد"
|
||||
"access-list": "لیست دسترسی",
|
||||
"access-list.access-count": "{count} {count, plural, one {Rule} other {Rules}}",
|
||||
"access-list.auth-count": "{count} {count, plural, one {User} other {Users}}",
|
||||
"access-list.help-rules-last": "When at least 1 rule exists, this deny all rule will be added last",
|
||||
"access-list.help.rules-order": "توجه داشته باشید که دستورات allow و deny به ترتیب تعریفشده اعمال خواهند شد.",
|
||||
"access-list.pass-auth": "ارسال احراز هویت به سرور بالادستی",
|
||||
"access-list.public": "قابل دسترسی برای عموم",
|
||||
"access-list.public.subtitle": "نیازی به احراز هویت پایه نیست",
|
||||
"access-list.satisfy-any": "Satisfy Any",
|
||||
"access-list.subtitle": "{users} {users, plural, one {User} other {Users}}, {rules} {rules, plural, one {Rule} other {Rules}} - Created: {date}",
|
||||
"access-lists": "لیستهای دسترسی",
|
||||
"action.add": "افزودن",
|
||||
"action.add-location": "افزودن مکان",
|
||||
"action.close": "بستن",
|
||||
"action.delete": "حذف",
|
||||
"action.disable": "غیرفعال",
|
||||
"action.download": "دانلود",
|
||||
"action.edit": "ویرایش",
|
||||
"action.enable": "فعالسازی",
|
||||
"action.permissions": "مجوزها",
|
||||
"action.renew": "تجدید",
|
||||
"action.view-details": "مشاهده جزئیات",
|
||||
"auditlogs": "لاگهای بررسی",
|
||||
"cancel": "لغو",
|
||||
"certificate": "گواهینامه",
|
||||
"certificate.custom-certificate": "Certificate",
|
||||
"certificate.custom-certificate-key": "Certificate Key",
|
||||
"certificate.custom-intermediate": "Intermediate Certificate",
|
||||
"certificate.in-use": "In Use",
|
||||
"certificate.none.subtitle": "No certificate assigned",
|
||||
"certificate.none.subtitle.for-http": "This host will not use HTTPS",
|
||||
"certificate.none.title": "None",
|
||||
"certificate.not-in-use": "Not Used",
|
||||
"certificates": "Certificates",
|
||||
"certificates.custom": "Custom Certificate",
|
||||
"certificates.custom.warning": "Key files protected with a passphrase are not supported.",
|
||||
"certificates.dns.credentials": "Credentials File Content",
|
||||
"certificates.dns.credentials-note": "This plugin requires a configuration file containing an API token or other credentials for your provider",
|
||||
"certificates.dns.credentials-warning": "This data will be stored as plaintext in the database and in a file!",
|
||||
"certificates.dns.propagation-seconds": "Propagation Seconds",
|
||||
"certificates.dns.propagation-seconds-note": "Leave empty to use the plugins default value. Number of seconds to wait for DNS propagation.",
|
||||
"certificates.dns.provider": "DNS Provider",
|
||||
"certificates.dns.warning": "This section requires some knowledge about Certbot and its DNS plugins. Please consult the respective plugins documentation.",
|
||||
"certificates.http.reachability-404": "There is a server found at this domain but it does not seem to be Nginx Proxy Manager. Please make sure your domain points to the IP where your NPM instance is running.",
|
||||
"certificates.http.reachability-failed-to-check": "Failed to check the reachability due to a communication error with site24x7.com.",
|
||||
"certificates.http.reachability-not-resolved": "There is no server available at this domain. Please make sure your domain exists and points to the IP where your NPM instance is running and if necessary port 80 is forwarded in your router.",
|
||||
"certificates.http.reachability-ok": "Your server is reachable and creating certificates should be possible.",
|
||||
"certificates.http.reachability-other": "There is a server found at this domain but it returned an unexpected status code {code}. Is it the NPM server? Please make sure your domain points to the IP where your NPM instance is running.",
|
||||
"certificates.http.reachability-wrong-data": "There is a server found at this domain but it returned an unexpected data. Is it the NPM server? Please make sure your domain points to the IP where your NPM instance is running.",
|
||||
"certificates.http.test-results": "Test Results",
|
||||
"certificates.http.warning": "These domains must be already configured to point to this installation.",
|
||||
"certificates.request.subtitle": "with Let's Encrypt",
|
||||
"certificates.request.title": "Request a new Certificate",
|
||||
"column.access": "Access",
|
||||
"column.authorization": "Authorization",
|
||||
"column.authorizations": "Authorizations",
|
||||
"column.custom-locations": "Custom Locations",
|
||||
"column.destination": "Destination",
|
||||
"column.details": "Details",
|
||||
"column.email": "Email",
|
||||
"column.event": "Event",
|
||||
"column.expires": "Expires",
|
||||
"column.http-code": "Access",
|
||||
"column.incoming-port": "Incoming Port",
|
||||
"column.name": "Name",
|
||||
"column.protocol": "Protocol",
|
||||
"column.provider": "Provider",
|
||||
"column.roles": "Roles",
|
||||
"column.rules": "Rules",
|
||||
"column.satisfy": "Satisfy",
|
||||
"column.satisfy-all": "All",
|
||||
"column.satisfy-any": "Any",
|
||||
"column.scheme": "Scheme",
|
||||
"column.source": "Source",
|
||||
"column.ssl": "SSL",
|
||||
"column.status": "Status",
|
||||
"created-on": "Created: {date}",
|
||||
"dashboard": "خانه",
|
||||
"dead-host": "404 Host",
|
||||
"dead-hosts": "404 Hosts",
|
||||
"dead-hosts.count": "{count} {count, plural, one {404 Host} other {404 Hosts}}",
|
||||
"disabled": "Disabled",
|
||||
"domain-names": "Domain Names",
|
||||
"domain-names.max": "{count} domain names maximum",
|
||||
"domain-names.placeholder": "Start typing to add domain...",
|
||||
"domain-names.wildcards-not-permitted": "Wildcards not permitted for this type",
|
||||
"domain-names.wildcards-not-supported": "Wildcards not supported for this CA",
|
||||
"domains.force-ssl": "Force SSL",
|
||||
"domains.hsts-enabled": "HSTS Enabled",
|
||||
"domains.hsts-subdomains": "HSTS Sub-domains",
|
||||
"domains.http2-support": "HTTP/2 Support",
|
||||
"domains.use-dns": "Use DNS Challenge",
|
||||
"email-address": "نشانی ایمیل",
|
||||
"empty-search": "هیچ نتیجهای یافت نشد",
|
||||
"empty-subtitle": "چرا یکی ایجاد نمیکنید؟",
|
||||
"enabled": "فعال",
|
||||
"error.access.at-least-one": "Either one Authorization or one Access Rule is required",
|
||||
"error.access.duplicate-usernames": "Authorization Usernames must be unique",
|
||||
"error.invalid-auth": "ایمیل یا رمز عبور نامعتبر است",
|
||||
"error.invalid-domain": "Invalid domain: {domain}",
|
||||
"error.invalid-email": "نشانی ایمیل نامعتبر است",
|
||||
"error.max-character-length": "Maximum length is {max} character{max, plural, one {} other {s}}",
|
||||
"error.max-domains": "Too many domains, max is {max}",
|
||||
"error.maximum": "Maximum is {max}",
|
||||
"error.min-character-length": "Minimum length is {min} character{min, plural, one {} other {s}}",
|
||||
"error.minimum": "Minimum is {min}",
|
||||
"error.passwords-must-match": "Passwords must match",
|
||||
"error.required": "This is required",
|
||||
"expires.on": "Expires: {date}",
|
||||
"footer.github-fork": "Fork me on Github",
|
||||
"host.flags.block-exploits": "Block Common Exploits",
|
||||
"host.flags.cache-assets": "Cache Assets",
|
||||
"host.flags.preserve-path": "Preserve Path",
|
||||
"host.flags.protocols": "Protocols",
|
||||
"host.flags.websockets-upgrade": "Websockets Support",
|
||||
"host.forward-port": "Forward Port",
|
||||
"host.forward-scheme": "Scheme",
|
||||
"hosts": "Hosts",
|
||||
"http-only": "HTTP Only",
|
||||
"lets-encrypt": "Let's Encrypt",
|
||||
"lets-encrypt-via-dns": "Let's Encrypt via DNS",
|
||||
"lets-encrypt-via-http": "Let's Encrypt via HTTP",
|
||||
"loading": "Loading…",
|
||||
"login.title": "Login to your account",
|
||||
"nginx-config.label": "Custom Nginx Configuration",
|
||||
"nginx-config.placeholder": "# Enter your custom Nginx configuration here at your own risk!",
|
||||
"no-permission-error": "You do not have access to view this.",
|
||||
"notfound.action": "Take me home",
|
||||
"notfound.content": "We are sorry but the page you are looking for was not found",
|
||||
"notfound.title": "Oops… You just found an error page",
|
||||
"notification.error": "Error",
|
||||
"notification.object-deleted": "{object} has been deleted",
|
||||
"notification.object-disabled": "{object} has been disabled",
|
||||
"notification.object-enabled": "{object} has been enabled",
|
||||
"notification.object-renewed": "{object} has been renewed",
|
||||
"notification.object-saved": "{object} has been saved",
|
||||
"notification.success": "Success",
|
||||
"object.actions-title": "{object} #{id}",
|
||||
"object.add": "{object} افزودن",
|
||||
"object.delete": "Delete {object}",
|
||||
"object.delete.content": "Are you sure you want to delete this {object}?",
|
||||
"object.edit": "Edit {object}",
|
||||
"object.empty": "There are no {objects}",
|
||||
"object.event.created": "Created {object}",
|
||||
"object.event.deleted": "Deleted {object}",
|
||||
"object.event.disabled": "Disabled {object}",
|
||||
"object.event.enabled": "Enabled {object}",
|
||||
"object.event.renewed": "Renewed {object}",
|
||||
"object.event.updated": "Updated {object}",
|
||||
"offline": "Offline",
|
||||
"online": "Online",
|
||||
"options": "Options",
|
||||
"password": "Password",
|
||||
"password.generate": "Generate random password",
|
||||
"password.hide": "Hide Password",
|
||||
"password.show": "Show Password",
|
||||
"permissions.hidden": "Hidden",
|
||||
"permissions.manage": "Manage",
|
||||
"permissions.view": "View Only",
|
||||
"permissions.visibility.all": "All Items",
|
||||
"permissions.visibility.title": "Item Visibility",
|
||||
"permissions.visibility.user": "Created Items Only",
|
||||
"proxy-host": "Proxy Host",
|
||||
"proxy-host.forward-host": "Forward Hostname / IP",
|
||||
"proxy-hosts": "Proxy Hosts",
|
||||
"proxy-hosts.count": "{count} {count, plural, one {Proxy Host} other {Proxy Hosts}}",
|
||||
"public": "Public",
|
||||
"redirection-host": "Redirection Host",
|
||||
"redirection-host.forward-domain": "Forward Domain",
|
||||
"redirection-hosts": "Redirection Hosts",
|
||||
"redirection-hosts.count": "{count} {count, plural, one {Redirection Host} other {Redirection Hosts}}",
|
||||
"role.admin": "Administrator",
|
||||
"role.standard-user": "Standard User",
|
||||
"save": "Save",
|
||||
"setting": "Setting",
|
||||
"settings": "Settings",
|
||||
"settings.default-site": "Default Site",
|
||||
"settings.default-site.404": "404 Page",
|
||||
"settings.default-site.444": "No Response (444)",
|
||||
"settings.default-site.congratulations": "Congratulations Page",
|
||||
"settings.default-site.description": "What to show when Nginx is hit with an unknown Host",
|
||||
"settings.default-site.html": "Custom HTML",
|
||||
"settings.default-site.html.placeholder": "<!-- Enter your custom HTML content here -->",
|
||||
"settings.default-site.redirect": "Redirect",
|
||||
"setup.preamble": "Get started by creating your admin account.",
|
||||
"setup.title": "Welcome!",
|
||||
"sign-in": "Sign in",
|
||||
"ssl-certificate": "SSL Certificate",
|
||||
"stream": "Stream",
|
||||
"stream.forward-host": "Forward Host",
|
||||
"stream.incoming-port": "Incoming Port",
|
||||
"streams": "Streams",
|
||||
"streams.count": "{count} {count, plural, one {Stream} other {Streams}}",
|
||||
"streams.tcp": "TCP",
|
||||
"streams.udp": "UDP",
|
||||
"test": "Test",
|
||||
"user": "کاربر",
|
||||
"user.change-password": "Change Password",
|
||||
"user.confirm-password": "Confirm Password",
|
||||
"user.current-password": "رمز عبور فعلی",
|
||||
"user.edit-profile": "ویرایش پروفایل",
|
||||
"user.full-name": "نام کامل",
|
||||
"user.login-as": "Sign in as {name}",
|
||||
"user.logout": "خروج",
|
||||
"user.new-password": "رمز عبور جدید",
|
||||
"user.nickname": "نام مستعار",
|
||||
"user.set-password": "تنظیم رمز عبور",
|
||||
"user.set-permissions": "Set Permissions for {name}",
|
||||
"user.switch-dark": "تغییر به حالت تاریک",
|
||||
"user.switch-light": "تغییر به حالت روشن",
|
||||
"username": "نام کاربری",
|
||||
"users": "کاربران"
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"locale-de-DE": "Deutsch",
|
||||
"locale-en-US": "English",
|
||||
"locale-fa-IR": "فارسی"
|
||||
}
|
||||
7
frontend/src/locale/src/HelpDoc/fa/AccessLists.md
Normal file
7
frontend/src/locale/src/HelpDoc/fa/AccessLists.md
Normal file
@@ -0,0 +1,7 @@
|
||||
## What is an Access List?
|
||||
|
||||
Access Lists provide a blacklist or whitelist of specific client IP addresses along with authentication for the Proxy Hosts via Basic HTTP Authentication.
|
||||
|
||||
You can configure multiple client rules, usernames and passwords for a single Access List and then apply that to one or more _Proxy Hosts_.
|
||||
|
||||
This is most useful for forwarded web services that do not have authentication mechanisms built in or when you want to protect from unknown clients.
|
||||
32
frontend/src/locale/src/HelpDoc/fa/Certificates.md
Normal file
32
frontend/src/locale/src/HelpDoc/fa/Certificates.md
Normal file
@@ -0,0 +1,32 @@
|
||||
## Certificates Help
|
||||
|
||||
### HTTP Certificate
|
||||
|
||||
A HTTP validated certificate means Let's Encrypt servers will
|
||||
attempt to reach your domains over HTTP (not HTTPS!) and if successful, they
|
||||
will issue your certificate.
|
||||
|
||||
For this method, you will have to have a _Proxy Host_ created for your domains(s) that
|
||||
is accessible with HTTP and pointing to this Nginx installation. After a certificate
|
||||
has been given, you can modify the _Proxy Host_ to also use this certificate for HTTPS
|
||||
connections. However, the _Proxy Host_ will still need to be configured for HTTP access
|
||||
in order for the certificate to renew.
|
||||
|
||||
This process _does not_ support wildcard domains.
|
||||
|
||||
### DNS Certificate
|
||||
|
||||
A DNS validated certificate requires you to use a DNS Provider plugin. This DNS
|
||||
Provider will be used to create temporary records on your domain and then Let's
|
||||
Encrypt will query those records to be sure you're the owner and if successful, they
|
||||
will issue your certificate.
|
||||
|
||||
You do not need a _Proxy Host_ to be created prior to requesting this type of
|
||||
certificate. Nor do you need to have your _Proxy Host_ configured for HTTP access.
|
||||
|
||||
This process _does_ support wildcard domains.
|
||||
|
||||
### Custom Certificate
|
||||
|
||||
Use this option to upload your own SSL Certificate, as provided by your own
|
||||
Certificate Authority.
|
||||
10
frontend/src/locale/src/HelpDoc/fa/DeadHosts.md
Normal file
10
frontend/src/locale/src/HelpDoc/fa/DeadHosts.md
Normal file
@@ -0,0 +1,10 @@
|
||||
## What is a 404 Host?
|
||||
|
||||
A 404 Host is simply a host setup that shows a 404 page.
|
||||
|
||||
This can be useful when your domain is listed in search engines and you want
|
||||
to provide a nicer error page or specifically to tell the search indexers that
|
||||
the domain pages no longer exist.
|
||||
|
||||
Another benefit of having this host is to track the logs for hits to it and
|
||||
view the referrers.
|
||||
7
frontend/src/locale/src/HelpDoc/fa/ProxyHosts.md
Normal file
7
frontend/src/locale/src/HelpDoc/fa/ProxyHosts.md
Normal file
@@ -0,0 +1,7 @@
|
||||
## What is a Proxy Host?
|
||||
|
||||
A Proxy Host is the incoming endpoint for a web service that you want to forward.
|
||||
|
||||
It provides optional SSL termination for your service that might not have SSL support built in.
|
||||
|
||||
Proxy Hosts are the most common use for the Nginx Proxy Manager.
|
||||
7
frontend/src/locale/src/HelpDoc/fa/RedirectionHosts.md
Normal file
7
frontend/src/locale/src/HelpDoc/fa/RedirectionHosts.md
Normal file
@@ -0,0 +1,7 @@
|
||||
## What is a Redirection Host?
|
||||
|
||||
A Redirection Host will redirect requests from the incoming domain and push the
|
||||
viewer to another domain.
|
||||
|
||||
The most common reason to use this type of host is when your website changes
|
||||
domains but you still have search engine or referrer links pointing to the old domain.
|
||||
6
frontend/src/locale/src/HelpDoc/fa/Streams.md
Normal file
6
frontend/src/locale/src/HelpDoc/fa/Streams.md
Normal file
@@ -0,0 +1,6 @@
|
||||
## What is a Stream?
|
||||
|
||||
A relatively new feature for Nginx, a Stream will serve to forward TCP/UDP
|
||||
traffic directly to another computer on the network.
|
||||
|
||||
If you're running game servers, FTP or SSH servers this can come in handy.
|
||||
6
frontend/src/locale/src/HelpDoc/fa/index.ts
Normal file
6
frontend/src/locale/src/HelpDoc/fa/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export * as AccessLists from "./AccessLists.md";
|
||||
export * as Certificates from "./Certificates.md";
|
||||
export * as DeadHosts from "./DeadHosts.md";
|
||||
export * as ProxyHosts from "./ProxyHosts.md";
|
||||
export * as RedirectionHosts from "./RedirectionHosts.md";
|
||||
export * as Streams from "./Streams.md";
|
||||
@@ -1,17 +1,22 @@
|
||||
// import * as de from "./de/index";
|
||||
// import * as fa from "./fa/index";
|
||||
import * as en from "./en/index";
|
||||
import * as fa from "./fa/index";
|
||||
|
||||
const items: any = { en };
|
||||
const items: any = { en, fa };
|
||||
|
||||
const fallbackLang = "en";
|
||||
|
||||
export const getHelpFile = (lang: string, section: string): string => {
|
||||
if (typeof items[lang] !== "undefined" && typeof items[lang][section] !== "undefined") {
|
||||
if (
|
||||
typeof items[lang] !== "undefined" &&
|
||||
typeof items[lang][section] !== "undefined"
|
||||
) {
|
||||
return items[lang][section].default;
|
||||
}
|
||||
// Fallback to English
|
||||
if (typeof items[fallbackLang] !== "undefined" && typeof items[fallbackLang][section] !== "undefined") {
|
||||
if (
|
||||
typeof items[fallbackLang] !== "undefined" &&
|
||||
typeof items[fallbackLang][section] !== "undefined"
|
||||
) {
|
||||
return items[fallbackLang][section].default;
|
||||
}
|
||||
throw new Error(`Cannot load help doc for ${lang}-${section}`);
|
||||
|
||||
@@ -605,6 +605,9 @@
|
||||
"user.full-name": {
|
||||
"defaultMessage": "Full Name"
|
||||
},
|
||||
"user.login-as": {
|
||||
"defaultMessage": "Sign in as {name}"
|
||||
},
|
||||
"user.logout": {
|
||||
"defaultMessage": "Logout"
|
||||
},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user