mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-31 15:53:33 +00:00 
			
		
		
		
	Compare commits
	
		
			263 Commits
		
	
	
		
			react
			...
			4e6d65645f
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 4e6d65645f | ||
|  | 8434b9fce4 | ||
|  | f4bd65dd2c | ||
|  | a856c4d6e1 | ||
|  | 2f334b5f9f | ||
|  | 2145df0dfb | ||
|  | 331c761a1c | ||
|  | 03b3b6379b | ||
|  | 050c087a51 | ||
|  | 61c41b8ec3 | ||
|  | 47d7896301 | ||
|  | d048d1fc98 | ||
|  | 3774a40498 | ||
|  | 208037946f | ||
|  | f23299f793 | ||
|  | aa15052eea | ||
|  | c556b8acef | ||
|  | 4d60876394 | ||
|  | 6e820a36ac | ||
|  | a277a5d167 | ||
|  | 8434a2d1fa | ||
|  | bee6a83f33 | ||
|  | b37ef94c22 | ||
|  | 3f6ac9a021 | ||
|  | 1d5f390f9b | ||
|  | d2048e540d | ||
|  | d121de808c | ||
|  | 4d3d37eaed | ||
|  | 0cd2e07fd3 | ||
|  | 0a18a565c7 | ||
|  | c4db4a2647 | ||
|  | e78dd069f1 | ||
|  | 9a2e5c92d5 | ||
|  | 833dd23dce | ||
|  | 514520ce1a | ||
|  | 21e3bce95d | ||
|  | 5dd81c071f | ||
|  | 269d088a60 | ||
|  | f73e09007a | ||
|  | 16c0276401 | ||
|  | 1831fdff2d | ||
|  | 8474b1cdec | ||
|  | 6d2cf77fb2 | ||
|  | ac0074ea86 | ||
|  | 52bd7b1d8f | ||
|  | 70cfbfb1b0 | ||
|  | 42cd1f2866 | ||
|  | ecc3b2b5b7 | ||
|  | ae9504584c | ||
|  | fb880616c7 | ||
|  | e1b757e177 | ||
|  | 6a8197d156 | ||
|  | be0ce673ff | ||
|  | 6da020aab1 | ||
|  | 689bcb0077 | ||
|  | fd041d9b3c | ||
|  | 9ac0e8c943 | ||
|  | 155e09407f | ||
|  | db95a465c8 | ||
|  | 6584f87dd2 | ||
|  | b076f5b3b6 | ||
|  | e5ade3b4ea | ||
|  | 7f9a1f5a98 | ||
|  | d94e304f31 | ||
|  | 3379f3a665 | ||
|  | 4ec1b4ed5a | ||
|  | 43d989474e | ||
|  | 1e0baa3911 | ||
|  | d8a3726f3a | ||
|  | 9faa36315f | ||
|  | e4e70ae6be | ||
|  | d555af68fe | ||
|  | 26f708d980 | ||
|  | 2ffb54a720 | ||
|  | b123ca4fd0 | ||
|  | 72b071dbaa | ||
|  | fd277973cd | ||
|  | aae95798b2 | ||
|  | d437c6b743 | ||
|  | f3018115ba | ||
|  | a0e17f9678 | ||
|  | 9b32329f41 | ||
|  | 001583b308 | ||
|  | 3df8e74bc8 | ||
|  | 042a74cc21 | ||
|  | fd7095ad88 | ||
|  | 6d6021c9bb | ||
|  | 824a22efad | ||
|  | ed609f0bec | ||
|  | b437119535 | ||
|  | d5a75bb708 | ||
|  | 512f5109d4 | ||
|  | d300095ab5 | ||
|  | 8d8921a0dd | ||
|  | ac8fa0d737 | ||
|  | b2592d9351 | ||
|  | adf0030b1c | ||
|  | 63845377d9 | ||
|  | 4b4c7baea4 | ||
|  | 94b6971ef7 | ||
|  | b725153a5e | ||
|  | da82020be4 | ||
|  | e7791c2a0f | ||
|  | 0461689d65 | ||
|  | aec0a606af | ||
|  | f55a7a792f | ||
|  | 4b0d901c93 | ||
|  | 4a57956093 | ||
|  | 88f3953f92 | ||
|  | 0d3e152306 | ||
|  | 9234c2c007 | ||
|  | 98ff4a7dcc | ||
|  | 7edcb8e3cc | ||
|  | 0387d36ebe | ||
|  | 047c4bf6e6 | ||
|  | 8cefea916a | ||
|  | 3c1b4fdf34 | ||
|  | e0773b1c06 | ||
|  | 3301800f42 | ||
|  | 4dd6fd06f4 | ||
|  | 1c57a9b2a5 | ||
|  | a9d1ccde38 | ||
|  | dde368f733 | ||
|  | cbcb0cc0f8 | ||
|  | fd365dc8fd | ||
|  | c849938da2 | ||
|  | 4b39ef0eba | ||
|  | 1ae247b2a6 | ||
|  | a2f192280b | ||
|  | 81c1a7eb16 | ||
|  | 030f3c9d83 | ||
|  | b4365f5c54 | ||
|  | e889714642 | ||
|  | e61cf52a65 | ||
|  | e6ae25d081 | ||
|  | ceb62fb0f2 | ||
|  | 29990110b1 | ||
|  | b4e5b8b6db | ||
|  | d6e96dc3cb | ||
|  | ab772d645b | ||
|  | f43e41d7d0 | ||
|  | fb8ca0b02f | ||
|  | e7ef809b10 | ||
|  | 798db6cb21 | ||
|  | 7745f8242b | ||
|  | 00aaa024a6 | ||
|  | a5166435ff | ||
|  | e3ce8b4d12 | ||
|  | c0c89e5d15 | ||
|  | fe46da3355 | ||
|  | 6ab5224353 | ||
|  | 12909de3c1 | ||
|  | 700518a0a2 | ||
|  | e959e54dc8 | ||
|  | 471ffa8dff | ||
|  | 35cc486fd7 | ||
|  | 292a209195 | ||
|  | 215083f6cf | ||
|  | 35550082bf | ||
|  | 15e4900133 | ||
|  | 6df4ea4d69 | ||
|  | cc9d556665 | ||
|  | cb3f0ec9b4 | ||
|  | 0244187c29 | ||
|  | 0dd713e634 | ||
|  | 972e53df71 | ||
|  | 91fe448782 | ||
|  | cfbd7f05d0 | ||
|  | 3ea9f805f4 | ||
|  | fc2df47753 | ||
|  | 7455accf58 | ||
|  | 83a9666807 | ||
|  | 6681da605e | ||
|  | e433bdaeec | ||
|  | 5b4fe24957 | ||
|  | 7166654215 | ||
|  | c8a255178e | ||
|  | 5f27b9243f | ||
|  | 6b7ae48570 | ||
|  | bc3d9ec099 | ||
|  | 0eeed1695c | ||
|  | 83e432793b | ||
|  | 6cdfd9ebc1 | ||
|  | ecbc55f318 | ||
|  | c288886fd4 | ||
|  | 80315bd50e | ||
|  | a2b4fbc36f | ||
|  | df33db24bb | ||
|  | 437b06b64b | ||
|  | f649e2946e | ||
|  | 1b61176818 | ||
|  | 374447ccc7 | ||
|  | af9349d4a7 | ||
|  | 4ff911def0 | ||
|  | e890bfcf10 | ||
|  | 9a5cbbba49 | ||
|  | b877bea86c | ||
|  | 306ac20457 | ||
|  | ba138581e1 | ||
|  | 456c59c746 | ||
|  | 6c76c041c4 | ||
|  | a239be993c | ||
|  | a82df0d931 | ||
|  | e4595860f5 | ||
|  | 18ecda7955 | ||
|  | 8ddb191a7a | ||
|  | cd6b772e72 | ||
|  | 29a4ac42d0 | ||
|  | 5d3bc0fabd | ||
|  | 1d5d3ecd7a | ||
|  | 8033d052fe | ||
|  | 6d0bf1c68b | ||
|  | 560f3d9b29 | ||
|  | 7ea64c46e9 | ||
|  | 88b46ef9ef | ||
|  | ef34f01914 | ||
|  | f5b3568893 | ||
|  | 6147ee925e | ||
|  | 5586d16afd | ||
|  | ca4d92d793 | ||
|  | 0a50672ab6 | ||
|  | f6b219772d | ||
|  | ad848a6478 | ||
|  | 0418264070 | ||
|  | 882674867c | ||
|  | e39f18b0d1 | ||
|  | 6efa4e2beb | ||
|  | 17a108f75f | ||
|  | bc6825c148 | ||
|  | 395152c1ab | ||
|  | 5e5f0de0e2 | ||
|  | b3ae2f4dbb | ||
|  | 726b6e69f7 | ||
|  | c00b690ed3 | ||
|  | 8d37f5df8d | ||
|  | 5b6dbaf43e | ||
|  | b8008606fd | ||
|  | f51c12ed9a | ||
|  | 3c0af95468 | ||
|  | ee4c6a3a8b | ||
|  | d44f75af1b | ||
|  | b221446bb0 | ||
|  | 523449f050 | ||
|  | 322048d5af | ||
|  | 671715042e | ||
|  | f37bb2e7dc | ||
|  | 3267832fe5 | ||
|  | e31b01b80e | ||
|  | 0a18432860 | ||
|  | a2baa85b08 | ||
|  | 3bfdc21256 | ||
|  | 49da5d7acc | ||
|  | 5bc2cd9be4 | ||
|  | 07739ee84e | ||
|  | 91d23be4e3 | ||
|  | 9dcb1e1c9c | ||
|  | 5729dddaf9 | ||
|  | d1bb22d768 | ||
|  | db61a9a175 | ||
|  | e4a97d4813 | ||
|  | 8dd6880f8c | ||
|  | 34dfbe2c36 | ||
|  | 2110ecc382 | 
							
								
								
									
										8
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | # Ignore everything | ||||||
|  | * | ||||||
|  |  | ||||||
|  | # Only allow the following for docker build: | ||||||
|  | !backend/ | ||||||
|  | !docker/ | ||||||
|  | !scripts/ | ||||||
|  | !test/ | ||||||
							
								
								
									
										21
									
								
								.github/workflows/stale.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								.github/workflows/stale.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,21 +0,0 @@ | |||||||
| name: 'Close stale issues and PRs' |  | ||||||
| on: |  | ||||||
|   schedule: |  | ||||||
|     - cron: '30 1 * * *' |  | ||||||
|   workflow_dispatch: |  | ||||||
|  |  | ||||||
| jobs: |  | ||||||
|   stale: |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|     steps: |  | ||||||
|       - uses: actions/stale@v9 |  | ||||||
|         with: |  | ||||||
|           stale-issue-label: 'stale' |  | ||||||
|           stale-pr-label: 'stale' |  | ||||||
|           stale-issue-message: 'Issue is now considered stale. If you want to keep it open, please comment :+1:' |  | ||||||
|           stale-pr-message: 'PR is now considered stale. If you want to keep it open, please comment :+1:' |  | ||||||
|           close-issue-message: 'Issue was closed due to inactivity.' |  | ||||||
|           close-pr-message: 'PR was closed due to inactivity.' |  | ||||||
|           days-before-stale: 182 |  | ||||||
|           days-before-close: 365 |  | ||||||
|           operations-per-run: 50 |  | ||||||
							
								
								
									
										29
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,10 +1,29 @@ | |||||||
|  | git.idea | ||||||
|  | .env | ||||||
| .DS_Store | .DS_Store | ||||||
| .idea |  | ||||||
| .qodo |  | ||||||
| ._* | ._* | ||||||
| .vscode | *.code-workspace | ||||||
| certbot-help.txt | vendor | ||||||
|  | bin/* | ||||||
|  | backend/config.json | ||||||
|  | backend/embed/assets | ||||||
|  | backend/.task | ||||||
|  | backend/coverage.out | ||||||
|  | backend/coverage.html | ||||||
| test/node_modules | test/node_modules | ||||||
| */node_modules | */node_modules | ||||||
| docker/dev/dnsrouter-config.json.tmp | docs/.vuepress/dist | ||||||
|  | frontend/build | ||||||
|  | frontend/yarn-error.log | ||||||
|  | frontend/.npmrc | ||||||
|  | frontend/src/locale/lang | ||||||
|  | test/cypress/fixtures/example.json | ||||||
|  | .vscode | ||||||
|  | docker-build | ||||||
|  | data | ||||||
|  | dist | ||||||
|  | backend/embed/acme.sh | ||||||
| docker/dev/resolv.conf | docker/dev/resolv.conf | ||||||
|  | docker/dev/dnsrouter-config.json.tmp | ||||||
|  | thunder-tests | ||||||
|  | test/cypress/videos | ||||||
|   | |||||||
							
								
								
									
										195
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										195
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							| @@ -1,22 +1,33 @@ | |||||||
| import groovy.transform.Field | import groovy.transform.Field | ||||||
|  |  | ||||||
| @Field | @Field | ||||||
| def shOutput = "" |  | ||||||
| def buildxPushTags = "" | def buildxPushTags = "" | ||||||
|  |  | ||||||
|  | def getVersion() { | ||||||
|  | 	ver = sh(script: 'cat .version', returnStdout: true) | ||||||
|  | 	return ver.trim() | ||||||
|  | } | ||||||
|  |  | ||||||
|  | def getCommit() { | ||||||
|  | 	ver = sh(script: 'git log -n 1 --format=%h', returnStdout: true) | ||||||
|  | 	return ver.trim() | ||||||
|  | } | ||||||
|  |  | ||||||
| pipeline { | pipeline { | ||||||
| 	agent { | 	agent { | ||||||
| 		label 'docker-multiarch' | 		label 'docker-multiarch' | ||||||
| 	} | 	} | ||||||
| 	options { | 	options { | ||||||
| 		buildDiscarder(logRotator(numToKeepStr: '5')) | 		buildDiscarder(logRotator(numToKeepStr: '10')) | ||||||
| 		disableConcurrentBuilds() | 		disableConcurrentBuilds() | ||||||
| 		ansiColor('xterm') | 		ansiColor('xterm') | ||||||
| 	} | 	} | ||||||
| 	environment { | 	environment { | ||||||
|  | 		DOCKER_ORG                 = 'jc21' | ||||||
| 		IMAGE                      = 'nginx-proxy-manager' | 		IMAGE                      = 'nginx-proxy-manager' | ||||||
| 		BUILD_VERSION              = getVersion() | 		BUILD_VERSION              = getVersion() | ||||||
| 		MAJOR_VERSION              = '2' | 		BUILD_COMMIT               = getCommit() | ||||||
|  | 		MAJOR_VERSION              = '3' | ||||||
| 		BRANCH_LOWER               = "${BRANCH_NAME.toLowerCase().replaceAll('\\\\', '-').replaceAll('/', '-').replaceAll('\\.', '-')}" | 		BRANCH_LOWER               = "${BRANCH_NAME.toLowerCase().replaceAll('\\\\', '-').replaceAll('/', '-').replaceAll('\\.', '-')}" | ||||||
| 		BUILDX_NAME                = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}" | 		BUILDX_NAME                = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}" | ||||||
| 		COMPOSE_INTERACTIVE_NO_CLI = 1 | 		COMPOSE_INTERACTIVE_NO_CLI = 1 | ||||||
| @@ -30,7 +41,9 @@ pipeline { | |||||||
| 					} | 					} | ||||||
| 					steps { | 					steps { | ||||||
| 						script { | 						script { | ||||||
| 							buildxPushTags = "-t docker.io/jc21/${IMAGE}:${BUILD_VERSION} -t docker.io/jc21/${IMAGE}:${MAJOR_VERSION} -t docker.io/jc21/${IMAGE}:latest" | 							buildxPushTags = "-t docker.io/${DOCKER_ORG}/${IMAGE}:${BUILD_VERSION} -t docker.io/${DOCKER_ORG}/${IMAGE}:${MAJOR_VERSION} -t docker.io/${DOCKER_ORG}/${IMAGE}:latest" | ||||||
|  | 							echo 'Building on Master is disabled!' | ||||||
|  | 							sh 'exit 1' | ||||||
| 						} | 						} | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| @@ -43,51 +56,44 @@ pipeline { | |||||||
| 					steps { | 					steps { | ||||||
| 						script { | 						script { | ||||||
| 							// Defaults to the Branch name, which is applies to all branches AND pr's | 							// Defaults to the Branch name, which is applies to all branches AND pr's | ||||||
| 							buildxPushTags = "-t docker.io/nginxproxymanager/${IMAGE}-dev:${BRANCH_LOWER}" | 							// buildxPushTags = "-t docker.io/jc21/${IMAGE}:github-${BRANCH_LOWER}" | ||||||
| 						} | 							buildxPushTags = "-t docker.io/${DOCKER_ORG}/${IMAGE}:v3" | ||||||
| 					} |  | ||||||
| 				} |  | ||||||
| 				stage('Versions') { |  | ||||||
| 					steps { |  | ||||||
| 						sh 'cat frontend/package.json | jq --arg BUILD_VERSION "${BUILD_VERSION}" \'.version = $BUILD_VERSION\' | sponge frontend/package.json' |  | ||||||
| 						sh 'echo -e "\\E[1;36mFrontend Version is:\\E[1;33m $(cat frontend/package.json | jq -r .version)\\E[0m"' |  | ||||||
| 						sh 'cat backend/package.json | jq --arg BUILD_VERSION "${BUILD_VERSION}" \'.version = $BUILD_VERSION\' | sponge backend/package.json' |  | ||||||
| 						sh 'echo -e "\\E[1;36mBackend Version is:\\E[1;33m  $(cat backend/package.json | jq -r .version)\\E[0m"' |  | ||||||
| 						sh 'sed -i -E "s/(version-)[0-9]+\\.[0-9]+\\.[0-9]+(-green)/\\1${BUILD_VERSION}\\2/" README.md' |  | ||||||
| 					} |  | ||||||
| 				} |  | ||||||
| 				stage('Docker Login') { |  | ||||||
| 					steps { |  | ||||||
| 						withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) { |  | ||||||
| 							sh 'docker login -u "${duser}" -p "${dpass}"' |  | ||||||
| 						} | 						} | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		stage('Builds') { | 		stage('Build') { | ||||||
| 			parallel { | 			parallel { | ||||||
| 				stage('Project') { | 				stage('Project') { | ||||||
| 					steps { | 					steps { | ||||||
| 						script { | 						sh './scripts/ci/build-frontend' | ||||||
| 							// Frontend and Backend | 						sh './scripts/ci/test-backend' | ||||||
| 							def shStatusCode = sh(label: 'Checking and Building', returnStatus: true, script: ''' | 						// Temporarily disable building backend binaries | ||||||
| 								set -e | 						// sh './scripts/ci/build-backend' | ||||||
| 								./scripts/ci/frontend-build > ${WORKSPACE}/tmp-sh-build 2>&1 | 						// Build the docker image used for testing below | ||||||
| 								./scripts/ci/test-and-build > ${WORKSPACE}/tmp-sh-build 2>&1 | 						sh '''docker build --pull --no-cache \\ | ||||||
| 							''') | 							-t "${IMAGE}:${BRANCH_LOWER}-ci-${BUILD_NUMBER}" \\ | ||||||
| 							shOutput = readFile "${env.WORKSPACE}/tmp-sh-build" | 							-f docker/Dockerfile \\ | ||||||
| 							if (shStatusCode != 0) { | 							--build-arg BUILD_COMMIT="${BUILD_COMMIT}" \\ | ||||||
| 								error "${shOutput}" | 							--build-arg BUILD_DATE="$(date '+%Y-%m-%d %T %Z')" \\ | ||||||
| 							} | 							--build-arg BUILD_VERSION="${BUILD_VERSION}" \\ | ||||||
| 						} | 							. | ||||||
|  | 						''' | ||||||
| 					} | 					} | ||||||
| 					post { | 					post { | ||||||
| 						always { | 						success { | ||||||
| 							sh 'rm -f ${WORKSPACE}/tmp-sh-build' | 							junit 'test/results/junit/*' | ||||||
| 						} | 							// archiveArtifacts allowEmptyArchive: false, artifacts: 'bin/*' | ||||||
| 						failure { | 							publishHTML([ | ||||||
| 							npmGithubPrComment("CI Error:\n\n```\n${shOutput}\n```", true) | 								allowMissing: false, | ||||||
|  | 								alwaysLinkToLastBuild: false, | ||||||
|  | 								keepAll: false, | ||||||
|  | 								reportDir: 'test/results/html-reports', | ||||||
|  | 								reportFiles: 'backend-coverage.html', | ||||||
|  | 								reportName: 'HTML Reports', | ||||||
|  | 								useWrapperFileDirectly: true | ||||||
|  | 							]) | ||||||
| 						} | 						} | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| @@ -104,7 +110,7 @@ pipeline { | |||||||
| 		stage('Test Sqlite') { | 		stage('Test Sqlite') { | ||||||
| 			environment { | 			environment { | ||||||
| 				COMPOSE_PROJECT_NAME = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}_sqlite" | 				COMPOSE_PROJECT_NAME = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}_sqlite" | ||||||
| 				COMPOSE_FILE         = 'docker/docker-compose.ci.yml:docker/docker-compose.ci.sqlite.yml' | 				COMPOSE_FILE         = 'docker/docker-compose.ci.yml' | ||||||
| 			} | 			} | ||||||
| 			when { | 			when { | ||||||
| 				not { | 				not { | ||||||
| @@ -114,23 +120,20 @@ pipeline { | |||||||
| 			steps { | 			steps { | ||||||
| 				sh 'rm -rf ./test/results/junit/*' | 				sh 'rm -rf ./test/results/junit/*' | ||||||
| 				sh './scripts/ci/fulltest-cypress' | 				sh './scripts/ci/fulltest-cypress' | ||||||
|  | 				// Adding this here as the schema needs to come from a running stack, but this will be used by docs later | ||||||
|  | 				sh 'docker-compose exec -T fullstack curl -s --output /temp-docs/api-schema.json "http://fullstack:81/api/schema"' | ||||||
| 			} | 			} | ||||||
| 			post { | 			post { | ||||||
| 				always { | 				always { | ||||||
| 					// Dumps to analyze later | 					// Dumps to analyze later | ||||||
| 					sh 'mkdir -p debug/sqlite' | 					sh 'mkdir -p debug/sqlite' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q fullstack) > debug/sqlite/docker_fullstack.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q fullstack) > debug/sqlite/docker_fullstack.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q stepca) > debug/sqlite/docker_stepca.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q stepca) > debug/sqlite/docker_stepca.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q pdns) > debug/sqlite/docker_pdns.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q pdns) > debug/sqlite/docker_pdns.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q pdns-db) > debug/sqlite/docker_pdns-db.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q pdns-db) > debug/sqlite/docker_pdns-db.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q dnsrouter) > debug/sqlite/docker_dnsrouter.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q dnsrouter) > debug/sqlite/docker_dnsrouter.log 2>&1' | ||||||
| 					junit 'test/results/junit/*' | 					junit 'test/results/junit/*' | ||||||
| 					sh 'docker compose down --remove-orphans --volumes -t 30 || true' | 					sh 'docker-compose down --remove-orphans --volumes -t 30 || true' | ||||||
| 				} |  | ||||||
| 				unstable { |  | ||||||
| 					dir(path: 'test/results') { |  | ||||||
| 						archiveArtifacts(allowEmptyArchive: true, artifacts: '**/*', excludes: '**/*.xml') |  | ||||||
| 					} |  | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| @@ -152,18 +155,13 @@ pipeline { | |||||||
| 				always { | 				always { | ||||||
| 					// Dumps to analyze later | 					// Dumps to analyze later | ||||||
| 					sh 'mkdir -p debug/mysql' | 					sh 'mkdir -p debug/mysql' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q fullstack) > debug/mysql/docker_fullstack.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q fullstack) > debug/mysql/docker_fullstack.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q stepca) > debug/mysql/docker_stepca.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q stepca) > debug/mysql/docker_stepca.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q pdns) > debug/mysql/docker_pdns.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q pdns) > debug/mysql/docker_pdns.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q pdns-db) > debug/mysql/docker_pdns-db.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q pdns-db) > debug/mysql/docker_pdns-db.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q dnsrouter) > debug/mysql/docker_dnsrouter.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q dnsrouter) > debug/mysql/docker_dnsrouter.log 2>&1' | ||||||
| 					junit 'test/results/junit/*' | 					junit 'test/results/junit/*' | ||||||
| 					sh 'docker compose down --remove-orphans --volumes -t 30 || true' | 					sh 'docker-compose down --remove-orphans --volumes -t 30 || true' | ||||||
| 				} |  | ||||||
| 				unstable { |  | ||||||
| 					dir(path: 'test/results') { |  | ||||||
| 						archiveArtifacts(allowEmptyArchive: true, artifacts: '**/*', excludes: '**/*.xml') |  | ||||||
| 					} |  | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| @@ -185,23 +183,18 @@ pipeline { | |||||||
| 				always { | 				always { | ||||||
| 					// Dumps to analyze later | 					// Dumps to analyze later | ||||||
| 					sh 'mkdir -p debug/postgres' | 					sh 'mkdir -p debug/postgres' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q fullstack) > debug/postgres/docker_fullstack.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q fullstack) > debug/postgres/docker_fullstack.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q stepca) > debug/postgres/docker_stepca.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q stepca) > debug/postgres/docker_stepca.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q pdns) > debug/postgres/docker_pdns.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q pdns) > debug/postgres/docker_pdns.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q pdns-db) > debug/postgres/docker_pdns-db.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q pdns-db) > debug/postgres/docker_pdns-db.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q dnsrouter) > debug/postgres/docker_dnsrouter.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q dnsrouter) > debug/postgres/docker_dnsrouter.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q db-postgres) > debug/postgres/docker_db-postgres.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q db-postgres) > debug/postgres/docker_db.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q authentik) > debug/postgres/docker_authentik.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q authentik) > debug/postgres/docker_authentik.log 2>&1' | ||||||
| 					sh 'docker logs $(docker compose ps --all -q authentik-redis) > debug/postgres/docker_authentik-redis.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q authentik-redis) > debug/postgres/docker_authentik-redis.log 2>&1' | ||||||
| 					sh 'docker logs $(docke rcompose ps --all -q authentik-ldap) > debug/postgres/docker_authentik-ldap.log 2>&1' | 					sh 'docker logs $(docker-compose ps --all -q authentik-ldap) > debug/postgres/docker_authentik-ldap.log 2>&1' | ||||||
|  |  | ||||||
| 					junit 'test/results/junit/*' | 					junit 'test/results/junit/*' | ||||||
| 					sh 'docker compose down --remove-orphans --volumes -t 30 || true' | 					sh 'docker-compose down --remove-orphans --volumes -t 30 || true' | ||||||
| 				} |  | ||||||
| 				unstable { |  | ||||||
| 					dir(path: 'test/results') { |  | ||||||
| 						archiveArtifacts(allowEmptyArchive: true, artifacts: '**/*', excludes: '**/*.xml') |  | ||||||
| 					} |  | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| @@ -212,7 +205,11 @@ pipeline { | |||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 			steps { | 			steps { | ||||||
| 				sh "./scripts/buildx --push ${buildxPushTags}" | 				withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) { | ||||||
|  | 					sh 'docker login -u "${duser}" -p "${dpass}"' | ||||||
|  | 					sh "./scripts/buildx --push ${buildxPushTags}" | ||||||
|  | 					// sh './scripts/buildx -o type=local,dest=docker-build' | ||||||
|  | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		stage('Docs / Comment') { | 		stage('Docs / Comment') { | ||||||
| @@ -220,7 +217,7 @@ pipeline { | |||||||
| 				stage('Docs Job') { | 				stage('Docs Job') { | ||||||
| 					when { | 					when { | ||||||
| 						allOf { | 						allOf { | ||||||
| 							branch pattern: "^(develop|master)\$", comparator: "REGEXP" | 							branch pattern: "^(develop|master|v3)\$", comparator: "REGEXP" | ||||||
| 							not { | 							not { | ||||||
| 								equals expected: 'UNSTABLE', actual: currentBuild.result | 								equals expected: 'UNSTABLE', actual: currentBuild.result | ||||||
| 							} | 							} | ||||||
| @@ -241,18 +238,7 @@ pipeline { | |||||||
| 					} | 					} | ||||||
| 					steps { | 					steps { | ||||||
| 						script { | 						script { | ||||||
| 							npmGithubPrComment("""Docker Image for build ${BUILD_NUMBER} is available on [DockerHub](https://cloud.docker.com/repository/docker/nginxproxymanager/${IMAGE}-dev): | 							npmGithubPrComment("Docker Image for build ${BUILD_NUMBER} is available on [DockerHub](https://cloud.docker.com/repository/docker/jc21/${IMAGE}) as `jc21/${IMAGE}:github-${BRANCH_LOWER}`\n\n**Note:** ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.", true) | ||||||
| ``` |  | ||||||
| nginxproxymanager/${IMAGE}-dev:${BRANCH_LOWER} |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| > [!NOTE] |  | ||||||
| > Ensure you backup your NPM instance before testing this image! Especially if there are database changes. |  | ||||||
| > This is a different docker image namespace than the official image. |  | ||||||
|  |  | ||||||
| > [!WARNING] |  | ||||||
| > Changes and additions to DNS Providers require verification by at least 2 members of the community! |  | ||||||
| """, true) |  | ||||||
| 						} | 						} | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| @@ -261,25 +247,22 @@ nginxproxymanager/${IMAGE}-dev:${BRANCH_LOWER} | |||||||
| 	} | 	} | ||||||
| 	post { | 	post { | ||||||
| 		always { | 		always { | ||||||
| 			sh 'echo Reverting ownership' | 			sh './scripts/ci/build-cleanup' | ||||||
| 			sh 'docker run --rm -v "$(pwd):/data" jc21/ci-tools chown -R "$(id -u):$(id -g)" /data' | 			echo 'Reverting ownership' | ||||||
| 			printResult(true) | 			sh 'docker run --rm -v $(pwd):/data jc21/gotools:latest chown -R "$(id -u):$(id -g)" /data' | ||||||
|  | 			printResult() | ||||||
| 		} | 		} | ||||||
| 		failure { | 		failure { | ||||||
| 			archiveArtifacts(artifacts: 'debug/**/*.*', allowEmptyArchive: true) | 			archiveArtifacts(artifacts: 'debug/**/*', allowEmptyArchive: true) | ||||||
|  | 			dir(path: 'test') { | ||||||
|  | 				archiveArtifacts allowEmptyArchive: true, artifacts: 'results/**/*', excludes: '**/*.xml' | ||||||
|  | 			} | ||||||
| 		} | 		} | ||||||
| 		unstable { | 		unstable { | ||||||
| 			archiveArtifacts(artifacts: 'debug/**/*.*', allowEmptyArchive: true) | 			archiveArtifacts(artifacts: 'debug/**/*', allowEmptyArchive: true) | ||||||
|  | 			dir(path: 'test') { | ||||||
|  | 				archiveArtifacts allowEmptyArchive: true, artifacts: 'results/**/*', excludes: '**/*.xml' | ||||||
|  | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
| def getVersion() { |  | ||||||
| 	ver = sh(script: 'cat .version', returnStdout: true) |  | ||||||
| 	return ver.trim() |  | ||||||
| } |  | ||||||
|  |  | ||||||
| def getCommit() { |  | ||||||
| 	ver = sh(script: 'git log -n 1 --format=%h', returnStdout: true) |  | ||||||
| 	return ver.trim() |  | ||||||
| } |  | ||||||
|   | |||||||
							
								
								
									
										41
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										41
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,7 +1,7 @@ | |||||||
| <p align="center"> | <p align="center"> | ||||||
| 	<img src="https://nginxproxymanager.com/github.png"> | 	<img src="https://nginxproxymanager.com/github.png"> | ||||||
| 	<br><br> | 	<br><br> | ||||||
| 	<img src="https://img.shields.io/badge/version-2.13.0-green.svg?style=for-the-badge"> | 	<img src="https://img.shields.io/badge/version-2.9.19-green.svg?style=for-the-badge"> | ||||||
| 	<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager"> | 	<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager"> | ||||||
| 		<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge"> | 		<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge"> | ||||||
| 	</a> | 	</a> | ||||||
| @@ -19,7 +19,7 @@ running at home or otherwise, including free SSL, without having to know too muc | |||||||
|  |  | ||||||
| ## Project Goal | ## Project Goal | ||||||
|  |  | ||||||
| I created this project to fill a personal need to provide users with an easy way to accomplish reverse | I created this project to fill a personal need to provide users with a easy way to accomplish reverse | ||||||
| proxying hosts with SSL termination and it had to be so easy that a monkey could do it. This goal hasn't changed. | proxying hosts with SSL termination and it had to be so easy that a monkey could do it. This goal hasn't changed. | ||||||
| While there might be advanced options they are optional and the project should be as simple as possible | While there might be advanced options they are optional and the project should be as simple as possible | ||||||
| so that the barrier for entry here is low. | so that the barrier for entry here is low. | ||||||
| @@ -29,7 +29,7 @@ so that the barrier for entry here is low. | |||||||
|  |  | ||||||
| ## Features | ## Features | ||||||
|  |  | ||||||
| - Beautiful and Secure Admin Interface based on [Tabler](https://tabler.github.io/) | - Beautiful and Secure Admin Interface based on [Chakra UI](https://chakra-ui.com/) | ||||||
| - Easily create forwarding domains, redirections, streams and 404 hosts without knowing anything about Nginx | - Easily create forwarding domains, redirections, streams and 404 hosts without knowing anything about Nginx | ||||||
| - Free SSL using Let's Encrypt or provide your own custom SSL certificates | - Free SSL using Let's Encrypt or provide your own custom SSL certificates | ||||||
| - Access Lists and basic HTTP Authentication for your hosts | - Access Lists and basic HTTP Authentication for your hosts | ||||||
| @@ -46,7 +46,8 @@ I won't go in to too much detail here but here are the basics for someone new to | |||||||
| 3. Configure your domain name details to point to your home, either with a static ip or a service like DuckDNS or [Amazon Route53](https://github.com/jc21/route53-ddns) | 3. Configure your domain name details to point to your home, either with a static ip or a service like DuckDNS or [Amazon Route53](https://github.com/jc21/route53-ddns) | ||||||
| 4. Use the Nginx Proxy Manager as your gateway to forward to your other web based services | 4. Use the Nginx Proxy Manager as your gateway to forward to your other web based services | ||||||
|  |  | ||||||
| ## Quick Setup |  | ||||||
|  | ## Quickest Setup | ||||||
|  |  | ||||||
| 1. Install Docker and Docker-Compose | 1. Install Docker and Docker-Compose | ||||||
|  |  | ||||||
| @@ -56,9 +57,10 @@ I won't go in to too much detail here but here are the basics for someone new to | |||||||
| 2. Create a docker-compose.yml file similar to this: | 2. Create a docker-compose.yml file similar to this: | ||||||
|  |  | ||||||
| ```yml | ```yml | ||||||
|  | version: '3' | ||||||
| services: | services: | ||||||
|   app: |   app: | ||||||
|     image: 'docker.io/jc21/nginx-proxy-manager:latest' |     image: 'jc21/nginx-proxy-manager:v3' | ||||||
|     restart: unless-stopped |     restart: unless-stopped | ||||||
|     ports: |     ports: | ||||||
|       - '80:80' |       - '80:80' | ||||||
| @@ -66,43 +68,34 @@ services: | |||||||
|       - '443:443' |       - '443:443' | ||||||
|     volumes: |     volumes: | ||||||
|       - ./data:/data |       - ./data:/data | ||||||
|       - ./letsencrypt:/etc/letsencrypt |  | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| This is the bare minimum configuration required. See the [documentation](https://nginxproxymanager.com/setup/) for more. |  | ||||||
|  |  | ||||||
| 3. Bring up your stack by running | 3. Bring up your stack by running | ||||||
|  |  | ||||||
| ```bash | ```bash | ||||||
|  | docker-compose up -d | ||||||
|  |  | ||||||
|  | # If using docker-compose-plugin | ||||||
| docker compose up -d | docker compose up -d | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| 4. Log in to the Admin UI | 4. Log in to the Admin UI | ||||||
|  |  | ||||||
| When your docker container is running, connect to it on port `81` for the admin interface. | When your docker container is running, connect to it on port `81` for the admin interface. | ||||||
| Sometimes this can take a little bit because of the entropy of keys. |  | ||||||
|  |  | ||||||
| [http://127.0.0.1:81](http://127.0.0.1:81) | [http://127.0.0.1:81](http://127.0.0.1:81) | ||||||
|  |  | ||||||
|  | ## Contributors | ||||||
| ## Contributing |  | ||||||
|  |  | ||||||
| All are welcome to create pull requests for this project, against the `develop` branch. Official releases are created from the `master` branch. |  | ||||||
|  |  | ||||||
| CI is used in this project. All PR's must pass before being considered. After passing, |  | ||||||
| docker builds for PR's are available on dockerhub for manual verifications. |  | ||||||
|  |  | ||||||
| Documentation within the `develop` branch is available for preview at |  | ||||||
| [https://develop.nginxproxymanager.com](https://develop.nginxproxymanager.com) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| ### Contributors |  | ||||||
|  |  | ||||||
| Special thanks to [all of our contributors](https://github.com/NginxProxyManager/nginx-proxy-manager/graphs/contributors). | Special thanks to [all of our contributors](https://github.com/NginxProxyManager/nginx-proxy-manager/graphs/contributors). | ||||||
|  |  | ||||||
|  |  | ||||||
| ## Getting Support | ## Getting Support | ||||||
|  |  | ||||||
| 1. [Found a bug?](https://github.com/NginxProxyManager/nginx-proxy-manager/issues) | 1. [Found a bug?](https://github.com/NginxProxyManager/nginx-proxy-manager/issues) | ||||||
| 2. [Discussions](https://github.com/NginxProxyManager/nginx-proxy-manager/discussions) | 2. [Discussions](https://github.com/NginxProxyManager/nginx-proxy-manager/discussions) | ||||||
| 3. [Reddit](https://reddit.com/r/nginxproxymanager) | 3. [Development Gitter](https://gitter.im/nginx-proxy-manager/community) | ||||||
|  | 4. [Reddit](https://reddit.com/r/nginxproxymanager) | ||||||
|  |  | ||||||
|  | ## Become a Contributor | ||||||
|  |  | ||||||
|  | A guide to setting up your own development environment [is found here](DEV-README.md). | ||||||
|   | |||||||
							
								
								
									
										8
									
								
								backend/.editorconfig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								backend/.editorconfig
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | root = true | ||||||
|  |  | ||||||
|  | [*] | ||||||
|  | indent_style = tab | ||||||
|  | indent_size = 4 | ||||||
|  | charset = utf-8 | ||||||
|  | trim_trailing_whitespace = true | ||||||
|  | insert_final_newline = false | ||||||
							
								
								
									
										8
									
								
								backend/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								backend/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,8 +0,0 @@ | |||||||
| config/development.json |  | ||||||
| data/* |  | ||||||
| yarn-error.log |  | ||||||
| tmp |  | ||||||
| certbot.log |  | ||||||
| node_modules |  | ||||||
| core.* |  | ||||||
|  |  | ||||||
							
								
								
									
										63
									
								
								backend/.golangci.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								backend/.golangci.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | |||||||
|  | linters: | ||||||
|  |     enable: | ||||||
|  |         - bodyclose | ||||||
|  |         - errcheck | ||||||
|  |         - gosimple | ||||||
|  |         - govet | ||||||
|  |         - gosec | ||||||
|  |         - goconst | ||||||
|  |         - gocritic | ||||||
|  |         - gocyclo | ||||||
|  |         - gofmt | ||||||
|  |         - goimports | ||||||
|  |         - ineffassign | ||||||
|  |         - misspell | ||||||
|  |         - nakedret | ||||||
|  |         - prealloc | ||||||
|  |         #- revive | ||||||
|  |         - staticcheck | ||||||
|  |         - typecheck | ||||||
|  |         - unused | ||||||
|  |         - unconvert | ||||||
|  |         - unparam | ||||||
|  | linters-settings: | ||||||
|  |     gosec: | ||||||
|  |       excludes: | ||||||
|  |         - G115 | ||||||
|  |     errcheck: | ||||||
|  |       exclude-functions: | ||||||
|  |         - fmt.Fprint | ||||||
|  |         - fmt.Fprintf | ||||||
|  |     goconst: | ||||||
|  |         # minimal length of string constant | ||||||
|  |         # default: 3 | ||||||
|  |         min-len: 2 | ||||||
|  |         # minimum number of occurrences of string constant | ||||||
|  |         # default: 3 | ||||||
|  |         min-occurences: 2 | ||||||
|  |     misspell: | ||||||
|  |         locale: UK | ||||||
|  |         ignore-words: | ||||||
|  |             - color | ||||||
|  | issues: | ||||||
|  |     # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. | ||||||
|  |     # We have chosen an arbitrary value that works based on practical usage. | ||||||
|  |     max-same: 20 | ||||||
|  |     # See cmdline flag documentation for more info about default excludes --exclude-use-default | ||||||
|  |     # Nothing is excluded by default | ||||||
|  |     exclude-use-default: false | ||||||
|  |     # Excluding configuration per-path, per-linter, per-text and per-source | ||||||
|  |     exclude-rules: | ||||||
|  |         # Exclude some linters from running on tests files. # TODO: Add examples why this is good | ||||||
|  |  | ||||||
|  |         - path: _test\.go | ||||||
|  |           linters: | ||||||
|  |               # Tests should be simple? Add example why this is good? | ||||||
|  |               - gocyclo | ||||||
|  |               # Error checking adds verbosity and complexity for minimal value | ||||||
|  |               - errcheck | ||||||
|  |               # Table test encourage duplication in defining the table tests. | ||||||
|  |               - dupl | ||||||
|  |               # Hard coded example tokens, SQL injection and other bad practices may | ||||||
|  |               # want to be tested | ||||||
|  |               - gosec | ||||||
							
								
								
									
										21
									
								
								backend/.testcoverage.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								backend/.testcoverage.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | |||||||
|  | --- | ||||||
|  |  | ||||||
|  | # (mandatory) | ||||||
|  | # Path to coverprofile file (output of `go test -coverprofile` command). | ||||||
|  | profile: coverage.out | ||||||
|  |  | ||||||
|  | # (optional; but recommended to set) | ||||||
|  | # When specified reported file paths will not contain local prefix in the output | ||||||
|  | local-prefix: "npm" | ||||||
|  |  | ||||||
|  | # Holds coverage thresholds percentages, values should be in range [0-100] | ||||||
|  | threshold: | ||||||
|  |   # (optional; default 0) | ||||||
|  |   # The minimum coverage that each file should have | ||||||
|  |   # file: 70 | ||||||
|  |   # (optional; default 0) | ||||||
|  |   # The minimum coverage that each package should have | ||||||
|  |   # package: 30 | ||||||
|  |   # (optional; default 0) | ||||||
|  |   # The minimum total coverage project should have | ||||||
|  |   total: 30 | ||||||
							
								
								
									
										6
									
								
								backend/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								backend/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | # Backend | ||||||
|  |  | ||||||
|  | ## Guides and materials | ||||||
|  |  | ||||||
|  | -   [Nginx Proxy Protocol](https://docs.nginx.com/nginx/admin-guide/load-balancer/using-proxy-protocol/) | ||||||
|  | - | ||||||
							
								
								
									
										70
									
								
								backend/Taskfile.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								backend/Taskfile.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,70 @@ | |||||||
|  | version: "3" | ||||||
|  |  | ||||||
|  | tasks: | ||||||
|  |     default: | ||||||
|  |         cmds: | ||||||
|  |             - task: run | ||||||
|  |  | ||||||
|  |     run: | ||||||
|  |         desc: Build and run | ||||||
|  |         sources: | ||||||
|  |             - internal/**/*.go | ||||||
|  |             - cmd/**/*.go | ||||||
|  |             - ../frontend/src/locale/src/*.json | ||||||
|  |         cmds: | ||||||
|  |             - task: locale | ||||||
|  |             - task: build | ||||||
|  |               force: true | ||||||
|  |             - cmd: echo -e "==> Running..." | ||||||
|  |               silent: true | ||||||
|  |             - cmd: ../dist/bin/server | ||||||
|  |               ignore_error: true | ||||||
|  |               silent: true | ||||||
|  |         env: | ||||||
|  |             LOG_LEVEL: debug | ||||||
|  |  | ||||||
|  |     build: | ||||||
|  |         desc: Build the server | ||||||
|  |         cmds: | ||||||
|  |             - cmd: echo -e "==> Building..." | ||||||
|  |               silent: true | ||||||
|  |             - cmd: rm -f dist/bin/* | ||||||
|  |               silent: true | ||||||
|  |             - cmd: go build -tags 'json1' -buildvcs=false -ldflags="-X main.commit={{.GIT_COMMIT}} -X main.version={{.VERSION}}" -o ../dist/bin/server ./cmd/server/main.go | ||||||
|  |               silent: true | ||||||
|  |             - cmd: go build -buildvcs=false -ldflags="-X main.commit={{.GIT_COMMIT}} -X main.version={{.VERSION}}" -o ../dist/bin/ipranges ./cmd/ipranges/main.go | ||||||
|  |               silent: true | ||||||
|  |             - cmd: rm -f /etc/nginx/conf.d/include/ipranges.conf && /app/dist/bin/ipranges > /etc/nginx/conf.d/include/ipranges.conf | ||||||
|  |             - task: lint | ||||||
|  |         vars: | ||||||
|  |             GIT_COMMIT: | ||||||
|  |                 sh: git log -n 1 --format=%h | ||||||
|  |             VERSION: | ||||||
|  |                 sh: cat ../.version | ||||||
|  |  | ||||||
|  |     lint: | ||||||
|  |         desc: Linting | ||||||
|  |         cmds: | ||||||
|  |             - cmd: echo -e "==> Linting..." | ||||||
|  |               silent: true | ||||||
|  |             - cmd: bash scripts/lint.sh | ||||||
|  |               silent: true | ||||||
|  |  | ||||||
|  |     test: | ||||||
|  |         desc: Testing | ||||||
|  |         cmds: | ||||||
|  |             - cmd: echo -e "==> Testing..." | ||||||
|  |               silent: true | ||||||
|  |             - cmd: bash scripts/test.sh | ||||||
|  |               silent: true | ||||||
|  |  | ||||||
|  |     locale: | ||||||
|  |         desc: Locale | ||||||
|  |         dir: /app/frontend | ||||||
|  |         cmds: | ||||||
|  |             - cmd: yarn locale-compile | ||||||
|  |               silent: true | ||||||
|  |               ignore_error: true | ||||||
|  |             - cmd: chown -R "$PUID:$PGID" src/locale/lang | ||||||
|  |               silent: true | ||||||
|  |               ignore_error: true | ||||||
| @@ -1,92 +0,0 @@ | |||||||
| import bodyParser from "body-parser"; |  | ||||||
| import compression from "compression"; |  | ||||||
| import express from "express"; |  | ||||||
| import fileUpload from "express-fileupload"; |  | ||||||
| import { isDebugMode } from "./lib/config.js"; |  | ||||||
| import cors from "./lib/express/cors.js"; |  | ||||||
| import jwt from "./lib/express/jwt.js"; |  | ||||||
| import { express as logger } from "./logger.js"; |  | ||||||
| import mainRoutes from "./routes/main.js"; |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * App |  | ||||||
|  */ |  | ||||||
| const app = express(); |  | ||||||
| app.use(fileUpload()); |  | ||||||
| app.use(bodyParser.json()); |  | ||||||
| app.use(bodyParser.urlencoded({ extended: true })); |  | ||||||
|  |  | ||||||
| // Gzip |  | ||||||
| app.use(compression()); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * General Logging, BEFORE routes |  | ||||||
|  */ |  | ||||||
|  |  | ||||||
| app.disable("x-powered-by"); |  | ||||||
| app.enable("trust proxy", ["loopback", "linklocal", "uniquelocal"]); |  | ||||||
| app.enable("strict routing"); |  | ||||||
|  |  | ||||||
| // pretty print JSON when not live |  | ||||||
| if (isDebugMode()) { |  | ||||||
| 	app.set("json spaces", 2); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // CORS for everything |  | ||||||
| app.use(cors); |  | ||||||
|  |  | ||||||
| // General security/cache related headers + server header |  | ||||||
| app.use((_, res, next) => { |  | ||||||
| 	let x_frame_options = "DENY"; |  | ||||||
|  |  | ||||||
| 	if (typeof process.env.X_FRAME_OPTIONS !== "undefined" && process.env.X_FRAME_OPTIONS) { |  | ||||||
| 		x_frame_options = process.env.X_FRAME_OPTIONS; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	res.set({ |  | ||||||
| 		"X-XSS-Protection": "1; mode=block", |  | ||||||
| 		"X-Content-Type-Options": "nosniff", |  | ||||||
| 		"X-Frame-Options": x_frame_options, |  | ||||||
| 		"Cache-Control": "no-cache, no-store, max-age=0, must-revalidate", |  | ||||||
| 		Pragma: "no-cache", |  | ||||||
| 		Expires: 0, |  | ||||||
| 	}); |  | ||||||
| 	next(); |  | ||||||
| }); |  | ||||||
|  |  | ||||||
| app.use(jwt()); |  | ||||||
| app.use("/", mainRoutes); |  | ||||||
|  |  | ||||||
| // production error handler |  | ||||||
| // no stacktraces leaked to user |  | ||||||
| app.use((err, req, res, _) => { |  | ||||||
| 	const payload = { |  | ||||||
| 		error: { |  | ||||||
| 			code: err.status, |  | ||||||
| 			message: err.public ? err.message : "Internal Error", |  | ||||||
| 		}, |  | ||||||
| 	}; |  | ||||||
|  |  | ||||||
| 	if (typeof err.message_i18n !== "undefined") { |  | ||||||
| 		payload.error.message_i18n = err.message_i18n; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	if (isDebugMode() || (req.baseUrl + req.path).includes("nginx/certificates")) { |  | ||||||
| 		payload.debug = { |  | ||||||
| 			stack: typeof err.stack !== "undefined" && err.stack ? err.stack.split("\n") : null, |  | ||||||
| 			previous: err.previous, |  | ||||||
| 		}; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	// Not every error is worth logging - but this is good for now until it gets annoying. |  | ||||||
| 	if (typeof err.stack !== "undefined" && err.stack) { |  | ||||||
| 		logger.debug(err.stack); |  | ||||||
| 		if (typeof err.public === "undefined" || !err.public) { |  | ||||||
| 			logger.warn(err.message); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	res.status(err.status || 500).send(payload); |  | ||||||
| }); |  | ||||||
|  |  | ||||||
| export default app; |  | ||||||
| @@ -1,91 +0,0 @@ | |||||||
| { |  | ||||||
|     "$schema": "https://biomejs.dev/schemas/2.3.1/schema.json", |  | ||||||
|     "vcs": { |  | ||||||
|         "enabled": true, |  | ||||||
|         "clientKind": "git", |  | ||||||
|         "useIgnoreFile": true |  | ||||||
|     }, |  | ||||||
|     "files": { |  | ||||||
|         "ignoreUnknown": false, |  | ||||||
|         "includes": [ |  | ||||||
|             "**/*.ts", |  | ||||||
|             "**/*.tsx", |  | ||||||
|             "**/*.js", |  | ||||||
|             "**/*.jsx", |  | ||||||
|             "!**/dist/**/*" |  | ||||||
|         ] |  | ||||||
|     }, |  | ||||||
|     "formatter": { |  | ||||||
|         "enabled": true, |  | ||||||
|         "indentStyle": "tab", |  | ||||||
|         "indentWidth": 4, |  | ||||||
|         "lineWidth": 120, |  | ||||||
|         "formatWithErrors": true |  | ||||||
|     }, |  | ||||||
|     "assist": { |  | ||||||
|         "actions": { |  | ||||||
|             "source": { |  | ||||||
|                 "organizeImports": { |  | ||||||
|                     "level": "on", |  | ||||||
|                     "options": { |  | ||||||
|                         "groups": [ |  | ||||||
|                             ":BUN:", |  | ||||||
|                             ":NODE:", |  | ||||||
|                             [ |  | ||||||
|                                 "npm:*", |  | ||||||
|                                 "npm:*/**" |  | ||||||
|                             ], |  | ||||||
|                             ":PACKAGE_WITH_PROTOCOL:", |  | ||||||
|                             ":URL:", |  | ||||||
|                             ":PACKAGE:", |  | ||||||
|                             [ |  | ||||||
|                                 "/src/*", |  | ||||||
|                                 "/src/**" |  | ||||||
|                             ], |  | ||||||
|                             [ |  | ||||||
|                                 "/**" |  | ||||||
|                             ], |  | ||||||
|                             [ |  | ||||||
|                                 "#*", |  | ||||||
|                                 "#*/**" |  | ||||||
|                             ], |  | ||||||
|                             ":PATH:" |  | ||||||
|                         ] |  | ||||||
|                     } |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     }, |  | ||||||
|     "linter": { |  | ||||||
|         "enabled": true, |  | ||||||
|         "rules": { |  | ||||||
|             "recommended": true, |  | ||||||
|             "correctness": { |  | ||||||
|                 "useUniqueElementIds": "off" |  | ||||||
|             }, |  | ||||||
|             "suspicious": { |  | ||||||
|                 "noExplicitAny": "off" |  | ||||||
|             }, |  | ||||||
|             "performance": { |  | ||||||
|                 "noDelete": "off" |  | ||||||
|             }, |  | ||||||
|             "nursery": "off", |  | ||||||
|             "a11y": { |  | ||||||
|                 "useSemanticElements": "off", |  | ||||||
|                 "useValidAnchor": "off" |  | ||||||
|             }, |  | ||||||
|             "style": { |  | ||||||
|                 "noParameterAssign": "error", |  | ||||||
|                 "useAsConstAssertion": "error", |  | ||||||
|                 "useDefaultParameterLast": "error", |  | ||||||
|                 "useEnumInitializers": "error", |  | ||||||
|                 "useSelfClosingElements": "error", |  | ||||||
|                 "useSingleVarDeclarator": "error", |  | ||||||
|                 "noUnusedTemplateLiteral": "error", |  | ||||||
|                 "useNumberNamespace": "error", |  | ||||||
|                 "noInferrableTypes": "error", |  | ||||||
|                 "noUselessElse": "error" |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @@ -1,21 +0,0 @@ | |||||||
| # Certbot dns-plugins |  | ||||||
|  |  | ||||||
| This file contains info about available Certbot DNS plugins. |  | ||||||
| This only works for plugins which use the standard argument structure, so: |  | ||||||
| --authenticator <plugin-name> --<plugin-name>-credentials <FILE> --<plugin-name>-propagation-seconds <number> |  | ||||||
|  |  | ||||||
| File Structure: |  | ||||||
|  |  | ||||||
| ```json |  | ||||||
| { |  | ||||||
|   "cloudflare": { |  | ||||||
|     "display_name": "Name displayed to the user", |  | ||||||
|     "package_name": "Package name in PyPi repo", |  | ||||||
|     "version_requirement": "Optional package version requirements (e.g. ==1.3 or >=1.2,<2.0, see https://www.python.org/dev/peps/pep-0440/#version-specifiers)", |  | ||||||
|     "dependencies": "Additional dependencies, space separated (as you would pass it to pip install)", |  | ||||||
|     "credentials": "Template of the credentials file", |  | ||||||
|     "full_plugin_name": "The full plugin name as used in the commandline with certbot, e.g. 'dns-njalla'" |  | ||||||
|   }, |  | ||||||
|   ... |  | ||||||
| } |  | ||||||
| ``` |  | ||||||
| @@ -1,602 +0,0 @@ | |||||||
| { |  | ||||||
| 	"acmedns": { |  | ||||||
| 		"name": "ACME-DNS", |  | ||||||
| 		"package_name": "certbot-dns-acmedns", |  | ||||||
| 		"version": "~=0.1.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_acmedns_api_url = http://acmedns-server/\ndns_acmedns_registration_file = /data/acme-registration.json", |  | ||||||
| 		"full_plugin_name": "dns-acmedns" |  | ||||||
| 	}, |  | ||||||
| 	"active24": { |  | ||||||
| 		"name": "Active24", |  | ||||||
| 		"package_name": "certbot-dns-active24", |  | ||||||
| 		"version": "~=2.0.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_active24_api_key = <identifier>\ndns_active24_secret = <secret>", |  | ||||||
| 		"full_plugin_name": "dns-active24" |  | ||||||
| 	}, |  | ||||||
| 	"aliyun": { |  | ||||||
| 		"name": "Aliyun", |  | ||||||
| 		"package_name": "certbot-dns-aliyun", |  | ||||||
| 		"version": "~=2.0.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_aliyun_access_key = 12345678\ndns_aliyun_access_key_secret = 1234567890abcdef1234567890abcdef", |  | ||||||
| 		"full_plugin_name": "dns-aliyun" |  | ||||||
| 	}, |  | ||||||
| 	"azure": { |  | ||||||
| 		"name": "Azure", |  | ||||||
| 		"package_name": "certbot-dns-azure", |  | ||||||
| 		"version": "~=1.2.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "# This plugin supported API authentication using either Service Principals or utilizing a Managed Identity assigned to the virtual machine.\n# Regardless which authentication method used, the identity will need the “DNS Zone Contributor” role assigned to it.\n# As multiple Azure DNS Zones in multiple resource groups can exist, the config file needs a mapping of zone to resource group ID. Multiple zones -> ID mappings can be listed by using the key dns_azure_zoneX where X is a unique number. At least 1 zone mapping is required.\n\n# Using a service principal (option 1)\ndns_azure_sp_client_id = 912ce44a-0156-4669-ae22-c16a17d34ca5\ndns_azure_sp_client_secret = E-xqXU83Y-jzTI6xe9fs2YC~mck3ZzUih9\ndns_azure_tenant_id = ed1090f3-ab18-4b12-816c-599af8a88cf7\n\n# Using used assigned MSI (option 2)\n# dns_azure_msi_client_id = 912ce44a-0156-4669-ae22-c16a17d34ca5\n\n# Using system assigned MSI (option 3)\n# dns_azure_msi_system_assigned = true\n\n# Zones (at least one always required)\ndns_azure_zone1 = example.com:/subscriptions/c135abce-d87d-48df-936c-15596c6968a5/resourceGroups/dns1\ndns_azure_zone2 = example.org:/subscriptions/99800903-fb14-4992-9aff-12eaf2744622/resourceGroups/dns2", |  | ||||||
| 		"full_plugin_name": "dns-azure" |  | ||||||
| 	}, |  | ||||||
| 	"baidu": { |  | ||||||
| 		"name": "baidu", |  | ||||||
| 		"package_name": "certbot-dns-baidu", |  | ||||||
| 		"version": "~=0.1.1", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_baidu_access_key = 12345678\ndns_baidu_secret_key = 1234567890abcdef1234567890abcdef", |  | ||||||
| 		"full_plugin_name": "dns-baidu" |  | ||||||
| 	}, |  | ||||||
| 	"beget": { |  | ||||||
| 		"name":"Beget", |  | ||||||
| 		"package_name": "certbot-beget-plugin", |  | ||||||
| 		"version": "~=1.0.0.dev9", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "# Beget API credentials used by Certbot\nbeget_plugin_username = username\nbeget_plugin_password = password", |  | ||||||
| 		"full_plugin_name": "beget-plugin" |  | ||||||
| 	}, |  | ||||||
| 	"bunny": { |  | ||||||
| 		"name": "bunny.net", |  | ||||||
| 		"package_name": "certbot-dns-bunny", |  | ||||||
| 		"version": "~=0.0.9", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "# Bunny API token used by Certbot (see https://dash.bunny.net/account/settings)\ndns_bunny_api_key = xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx", |  | ||||||
| 		"full_plugin_name": "dns-bunny" |  | ||||||
| 	}, |  | ||||||
| 	"cdmon": { |  | ||||||
| 		"name": "cdmon", |  | ||||||
| 		"package_name": "certbot-dns-cdmon", |  | ||||||
| 		"version": "~=0.4.1", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_cdmon_api_key=your-cdmon-api-token\ndns_cdmon_domain=your_domain_is_optional", |  | ||||||
| 		"full_plugin_name": "dns-cdmon" |  | ||||||
| 	}, |  | ||||||
| 	"cloudflare": { |  | ||||||
| 		"name": "Cloudflare", |  | ||||||
| 		"package_name": "certbot-dns-cloudflare", |  | ||||||
| 		"version": "=={{certbot-version}}", |  | ||||||
| 		"dependencies": "acme=={{certbot-version}}", |  | ||||||
| 		"credentials": "# Cloudflare API token\ndns_cloudflare_api_token=0123456789abcdef0123456789abcdef01234567", |  | ||||||
| 		"full_plugin_name": "dns-cloudflare" |  | ||||||
| 	}, |  | ||||||
| 	"cloudns": { |  | ||||||
| 		"name": "ClouDNS", |  | ||||||
| 		"package_name": "certbot-dns-cloudns", |  | ||||||
| 		"version": "~=0.6.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "# Target user ID (see https://www.cloudns.net/api-settings/)\n\tdns_cloudns_auth_id=1234\n\t# Alternatively, one of the following two options can be set:\n\t# dns_cloudns_sub_auth_id=1234\n\t# dns_cloudns_sub_auth_user=foobar\n\n\t# API password\n\tdns_cloudns_auth_password=password1", |  | ||||||
| 		"full_plugin_name": "dns-cloudns" |  | ||||||
| 	}, |  | ||||||
| 	"cloudxns": { |  | ||||||
| 		"name": "CloudXNS", |  | ||||||
| 		"package_name": "certbot-dns-cloudxns", |  | ||||||
| 		"version": "~=1.32.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_cloudxns_api_key = 1234567890abcdef1234567890abcdef\ndns_cloudxns_secret_key = 1122334455667788", |  | ||||||
| 		"full_plugin_name": "dns-cloudxns" |  | ||||||
| 	}, |  | ||||||
| 	"constellix": { |  | ||||||
| 		"name": "Constellix", |  | ||||||
| 		"package_name": "certbot-dns-constellix", |  | ||||||
| 		"version": "~=0.2.1", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_constellix_apikey = 5fb4e76f-ac91-43e5-f982458bc595\ndns_constellix_secretkey = 47d99fd0-32e7-4e07-85b46d08e70b\ndns_constellix_endpoint = https://api.dns.constellix.com/v1", |  | ||||||
| 		"full_plugin_name": "dns-constellix" |  | ||||||
| 	}, |  | ||||||
| 	"corenetworks": { |  | ||||||
| 		"name": "Core Networks", |  | ||||||
| 		"package_name": "certbot-dns-corenetworks", |  | ||||||
| 		"version": "~=0.1.4", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_corenetworks_username = asaHB12r\ndns_corenetworks_password = secure_password", |  | ||||||
| 		"full_plugin_name": "dns-corenetworks" |  | ||||||
| 	}, |  | ||||||
| 	"cpanel": { |  | ||||||
| 		"name": "cPanel", |  | ||||||
| 		"package_name": "certbot-dns-cpanel", |  | ||||||
| 		"version": "~=0.4.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "cpanel_url = https://cpanel.example.com:2083\ncpanel_username = your_username\ncpanel_password = your_password\ncpanel_token = your_api_token", |  | ||||||
| 		"full_plugin_name": "cpanel" |  | ||||||
| 	}, |  | ||||||
| 	"ddnss": { |  | ||||||
| 		"name": "DDNSS", |  | ||||||
| 		"package_name": "certbot-dns-ddnss", |  | ||||||
| 		"version": "~=1.1.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_ddnss_token = YOUR_DDNSS_API_TOKEN", |  | ||||||
| 		"full_plugin_name": "dns-ddnss" |  | ||||||
| 	}, |  | ||||||
| 	"desec": { |  | ||||||
| 		"name": "deSEC", |  | ||||||
| 		"package_name": "certbot-dns-desec", |  | ||||||
| 		"version": "~=1.2.1", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_desec_token = YOUR_DESEC_API_TOKEN\ndns_desec_endpoint = https://desec.io/api/v1/", |  | ||||||
| 		"full_plugin_name": "dns-desec" |  | ||||||
| 	}, |  | ||||||
| 	"duckdns": { |  | ||||||
| 		"name": "DuckDNS", |  | ||||||
| 		"package_name": "certbot-dns-duckdns", |  | ||||||
| 		"version": "~=1.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_duckdns_token=your-duckdns-token", |  | ||||||
| 		"full_plugin_name": "dns-duckdns" |  | ||||||
| 	}, |  | ||||||
| 	"digitalocean": { |  | ||||||
| 		"name": "DigitalOcean", |  | ||||||
| 		"package_name": "certbot-dns-digitalocean", |  | ||||||
| 		"version": "=={{certbot-version}}", |  | ||||||
| 		"dependencies": "acme=={{certbot-version}}", |  | ||||||
| 		"credentials": "dns_digitalocean_token = 0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff", |  | ||||||
| 		"full_plugin_name": "dns-digitalocean" |  | ||||||
| 	}, |  | ||||||
| 	"directadmin": { |  | ||||||
| 		"name": "DirectAdmin", |  | ||||||
| 		"package_name": "certbot-dns-directadmin", |  | ||||||
| 		"version": "~=0.0.23", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "directadmin_url = https://my.directadminserver.com:2222\ndirectadmin_username = username\ndirectadmin_password = aSuperStrongPassword", |  | ||||||
| 		"full_plugin_name": "directadmin" |  | ||||||
| 	}, |  | ||||||
| 	"dnsimple": { |  | ||||||
| 		"name": "DNSimple", |  | ||||||
| 		"package_name": "certbot-dns-dnsimple", |  | ||||||
| 		"version": "=={{certbot-version}}", |  | ||||||
| 		"dependencies": "acme=={{certbot-version}}", |  | ||||||
| 		"credentials": "dns_dnsimple_token = MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw", |  | ||||||
| 		"full_plugin_name": "dns-dnsimple" |  | ||||||
| 	}, |  | ||||||
| 	"dnsmadeeasy": { |  | ||||||
| 		"name": "DNS Made Easy", |  | ||||||
| 		"package_name": "certbot-dns-dnsmadeeasy", |  | ||||||
| 		"version": "=={{certbot-version}}", |  | ||||||
| 		"dependencies": "acme=={{certbot-version}}", |  | ||||||
| 		"credentials": "dns_dnsmadeeasy_api_key = 1c1a3c91-4770-4ce7-96f4-54c0eb0e457a\ndns_dnsmadeeasy_secret_key = c9b5625f-9834-4ff8-baba-4ed5f32cae55", |  | ||||||
| 		"full_plugin_name": "dns-dnsmadeeasy" |  | ||||||
| 	}, |  | ||||||
| 	"dnsmulti": { |  | ||||||
| 		"name": "DnsMulti", |  | ||||||
| 		"package_name": "certbot-dns-multi", |  | ||||||
| 		"version": "~=4.9", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "# See https://go-acme.github.io/lego/dns/#dns-providers for list of providers and their settings\n# Example provider configuration for DreamHost\n# dns_multi_provider = dreamhost\n# DREAMHOST_API_KEY = ABCDEFG1234", |  | ||||||
| 		"full_plugin_name": "dns-multi" |  | ||||||
| 	}, |  | ||||||
| 	"dnspod": { |  | ||||||
| 		"name": "DNSPod", |  | ||||||
| 		"package_name": "certbot-dns-dnspod", |  | ||||||
| 		"version": "~=0.1.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_dnspod_email = \"email@example.com\"\ndns_dnspod_api_token = \"id,key\"", |  | ||||||
| 		"full_plugin_name": "dns-dnspod" |  | ||||||
| 	}, |  | ||||||
| 	"domainoffensive": { |  | ||||||
| 		"name": "DomainOffensive (do.de)", |  | ||||||
| 		"package_name": "certbot-dns-domainoffensive", |  | ||||||
| 		"version": "~=2.0.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_domainoffensive_api_token = YOUR_DO_DE_AUTH_TOKEN", |  | ||||||
| 		"full_plugin_name": "dns-domainoffensive" |  | ||||||
| 	}, |  | ||||||
| 	"domeneshop": { |  | ||||||
| 		"name": "Domeneshop", |  | ||||||
| 		"package_name": "certbot-dns-domeneshop", |  | ||||||
| 		"version": "~=0.2.8", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_domeneshop_client_token=YOUR_DOMENESHOP_CLIENT_TOKEN\ndns_domeneshop_client_secret=YOUR_DOMENESHOP_CLIENT_SECRET", |  | ||||||
| 		"full_plugin_name": "dns-domeneshop" |  | ||||||
| 	}, |  | ||||||
| 	"dynu": { |  | ||||||
| 		"name": "Dynu", |  | ||||||
| 		"package_name": "certbot-dns-dynu", |  | ||||||
| 		"version": "~=0.0.1", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_dynu_auth_token = YOUR_DYNU_AUTH_TOKEN", |  | ||||||
| 		"full_plugin_name": "dns-dynu" |  | ||||||
| 	}, |  | ||||||
| 	"easydns": { |  | ||||||
| 		"name": "easyDNS", |  | ||||||
| 		"package_name": "certbot-dns-easydns", |  | ||||||
| 		"version": "~=0.1.2", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_easydns_usertoken = YOUR_EASYDNS_USERTOKEN\ndns_easydns_userkey = YOUR_EASYDNS_USERKEY\ndns_easydns_endpoint = https://rest.easydns.net", |  | ||||||
| 		"full_plugin_name": "dns-easydns" |  | ||||||
| 	}, |  | ||||||
| 	"eurodns": { |  | ||||||
| 		"name": "EuroDNS", |  | ||||||
| 		"package_name": "certbot-dns-eurodns", |  | ||||||
| 		"version": "~=0.0.4", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_eurodns_applicationId = myuser\ndns_eurodns_apiKey = mysecretpassword\ndns_eurodns_endpoint = https://rest-api.eurodns.com/user-api-gateway/proxy", |  | ||||||
| 		"full_plugin_name": "dns-eurodns" |  | ||||||
| 	}, |  | ||||||
| 	"firstdomains": { |  | ||||||
|                 "name": "First Domains", |  | ||||||
|                 "package_name": "certbot-dns-firstdomains", |  | ||||||
|                 "version": ">=1.0", |  | ||||||
|                 "dependencies": "", |  | ||||||
|                 "credentials": "dns_firstdomains_username = myremoteuser\ndns_firstdomains_password = verysecureremoteuserpassword", |  | ||||||
|                 "full_plugin_name": "dns-firstdomains" |  | ||||||
|         }, |  | ||||||
| 	"freedns": { |  | ||||||
| 		"name": "FreeDNS", |  | ||||||
| 		"package_name": "certbot-dns-freedns", |  | ||||||
| 		"version": "~=0.1.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_freedns_username = myremoteuser\ndns_freedns_password = verysecureremoteuserpassword", |  | ||||||
| 		"full_plugin_name": "dns-freedns" |  | ||||||
| 	}, |  | ||||||
| 	"gandi": { |  | ||||||
| 		"name": "Gandi Live DNS", |  | ||||||
| 		"package_name": "certbot-dns-gandi", |  | ||||||
| 		"version": "~=1.6.1", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "# Gandi personal access token\ndns_gandi_token=PERSONAL_ACCESS_TOKEN", |  | ||||||
| 		"full_plugin_name": "dns-gandi" |  | ||||||
| 	}, |  | ||||||
| 	"gcore": { |  | ||||||
| 		"name": "Gcore DNS", |  | ||||||
| 		"package_name": "certbot-dns-gcore", |  | ||||||
| 		"version": "~=0.1.8", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_gcore_apitoken = 0123456789abcdef0123456789abcdef01234567", |  | ||||||
| 		"full_plugin_name": "dns-gcore" |  | ||||||
| 	}, |  | ||||||
| 	"godaddy": { |  | ||||||
| 		"name": "GoDaddy", |  | ||||||
| 		"package_name": "certbot-dns-godaddy", |  | ||||||
| 		"version": "==2.8.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_godaddy_secret = 0123456789abcdef0123456789abcdef01234567\ndns_godaddy_key = abcdef0123456789abcdef01234567abcdef0123", |  | ||||||
| 		"full_plugin_name": "dns-godaddy" |  | ||||||
| 	}, |  | ||||||
| 	"google": { |  | ||||||
| 		"name": "Google", |  | ||||||
| 		"package_name": "certbot-dns-google", |  | ||||||
| 		"version": "=={{certbot-version}}", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "{\n\"type\": \"service_account\",\n...\n}", |  | ||||||
| 		"full_plugin_name": "dns-google" |  | ||||||
| 	}, |  | ||||||
| 	"googledomains": { |  | ||||||
| 		"name": "GoogleDomainsDNS", |  | ||||||
| 		"package_name": "certbot-dns-google-domains", |  | ||||||
| 		"version": "~=0.1.5", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_google_domains_access_token = 0123456789abcdef0123456789abcdef01234567\ndns_google_domains_zone = \"example.com\"", |  | ||||||
| 		"full_plugin_name": "dns-google-domains" |  | ||||||
| 	}, |  | ||||||
| 	"he": { |  | ||||||
| 		"name": "Hurricane Electric", |  | ||||||
| 		"package_name": "certbot-dns-he", |  | ||||||
| 		"version": "~=1.0.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_he_user = Me\ndns_he_pass = my HE password", |  | ||||||
| 		"full_plugin_name": "dns-he" |  | ||||||
| 	}, |  | ||||||
| 	"hetzner": { |  | ||||||
| 		"name": "Hetzner", |  | ||||||
| 		"package_name": "certbot-dns-hetzner", |  | ||||||
| 		"version": "~=1.0.4", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_hetzner_api_token = 0123456789abcdef0123456789abcdef", |  | ||||||
| 		"full_plugin_name": "dns-hetzner" |  | ||||||
| 	}, |  | ||||||
| 	"hostingnl": { |  | ||||||
| 		"name": "Hosting.nl", |  | ||||||
| 		"package_name": "certbot-dns-hostingnl", |  | ||||||
| 		"version": "~=0.1.5", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_hostingnl_api_key = 0123456789abcdef0123456789abcdef", |  | ||||||
| 		"full_plugin_name": "dns-hostingnl" |  | ||||||
| 	}, |  | ||||||
| 	"hover": { |  | ||||||
| 		"name": "Hover", |  | ||||||
| 		"package_name": "certbot-dns-hover", |  | ||||||
| 		"version": "~=1.2.1", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_hover_hoverurl = https://www.hover.com\ndns_hover_username = hover-admin-username\ndns_hover_password = hover-admin-password\ndns_hover_totpsecret = 2fa-totp-secret", |  | ||||||
| 		"full_plugin_name": "dns-hover" |  | ||||||
| 	}, |  | ||||||
| 	"infomaniak": { |  | ||||||
| 		"name": "Infomaniak", |  | ||||||
| 		"package_name": "certbot-dns-infomaniak", |  | ||||||
| 		"version": "~=0.2.2", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_infomaniak_token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", |  | ||||||
| 		"full_plugin_name": "dns-infomaniak" |  | ||||||
| 	}, |  | ||||||
| 	"inwx": { |  | ||||||
| 		"name": "INWX", |  | ||||||
| 		"package_name": "certbot-dns-inwx", |  | ||||||
| 		"version": "~=2.1.2", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_inwx_url = https://api.domrobot.com/xmlrpc/\ndns_inwx_username = your_username\ndns_inwx_password = your_password\ndns_inwx_shared_secret = your_shared_secret optional", |  | ||||||
| 		"full_plugin_name": "dns-inwx" |  | ||||||
| 	}, |  | ||||||
| 	"ionos": { |  | ||||||
| 		"name": "IONOS", |  | ||||||
| 		"package_name": "certbot-dns-ionos", |  | ||||||
| 		"version": "==2022.11.24", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_ionos_prefix = myapikeyprefix\ndns_ionos_secret = verysecureapikeysecret\ndns_ionos_endpoint = https://api.hosting.ionos.com", |  | ||||||
| 		"full_plugin_name": "dns-ionos" |  | ||||||
| 	}, |  | ||||||
| 	"ispconfig": { |  | ||||||
| 		"name": "ISPConfig", |  | ||||||
| 		"package_name": "certbot-dns-ispconfig", |  | ||||||
| 		"version": "~=0.2.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_ispconfig_username = myremoteuser\ndns_ispconfig_password = verysecureremoteuserpassword\ndns_ispconfig_endpoint = https://localhost:8080", |  | ||||||
| 		"full_plugin_name": "dns-ispconfig" |  | ||||||
| 	}, |  | ||||||
| 	"isset": { |  | ||||||
| 		"name": "Isset", |  | ||||||
| 		"package_name": "certbot-dns-isset", |  | ||||||
| 		"version": "~=0.0.3", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_isset_endpoint=\"https://customer.isset.net/api\"\ndns_isset_token=\"<token>\"", |  | ||||||
| 		"full_plugin_name": "dns-isset" |  | ||||||
| 	}, |  | ||||||
| 	"joker": { |  | ||||||
| 		"name": "Joker", |  | ||||||
| 		"package_name": "certbot-dns-joker", |  | ||||||
| 		"version": "~=1.1.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_joker_username = <Dynamic DNS Authentication Username>\ndns_joker_password = <Dynamic DNS Authentication Password>\ndns_joker_domain = <Dynamic DNS Domain>", |  | ||||||
| 		"full_plugin_name": "dns-joker" |  | ||||||
| 	}, |  | ||||||
| 	"leaseweb": { |  | ||||||
| 		"name": "LeaseWeb", |  | ||||||
| 		"package_name": "certbot-dns-leaseweb", |  | ||||||
| 		"version": "~=1.0.1", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_leaseweb_api_token = 01234556789", |  | ||||||
| 		"full_plugin_name": "dns-leaseweb" |  | ||||||
| 	}, |  | ||||||
| 	"linode": { |  | ||||||
| 		"name": "Linode", |  | ||||||
| 		"package_name": "certbot-dns-linode", |  | ||||||
| 		"version": "=={{certbot-version}}", |  | ||||||
| 		"dependencies": "acme=={{certbot-version}}", |  | ||||||
| 		"credentials": "dns_linode_key = 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ64\ndns_linode_version = [<blank>|3|4]", |  | ||||||
| 		"full_plugin_name": "dns-linode" |  | ||||||
| 	}, |  | ||||||
| 	"loopia": { |  | ||||||
| 		"name": "Loopia", |  | ||||||
| 		"package_name": "certbot-dns-loopia", |  | ||||||
| 		"version": "~=1.0.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_loopia_user = user@loopiaapi\ndns_loopia_password = abcdef0123456789abcdef01234567abcdef0123", |  | ||||||
| 		"full_plugin_name": "dns-loopia" |  | ||||||
| 	}, |  | ||||||
| 	"luadns": { |  | ||||||
| 		"name": "LuaDNS", |  | ||||||
| 		"package_name": "certbot-dns-luadns", |  | ||||||
| 		"version": "=={{certbot-version}}", |  | ||||||
| 		"dependencies": "acme=={{certbot-version}}", |  | ||||||
| 		"credentials": "dns_luadns_email = user@example.com\ndns_luadns_token = 0123456789abcdef0123456789abcdef", |  | ||||||
| 		"full_plugin_name": "dns-luadns" |  | ||||||
| 	}, |  | ||||||
| 	"mijnhost": { |  | ||||||
| 		"name": "mijn.host", |  | ||||||
| 		"package_name": "certbot-dns-mijn-host", |  | ||||||
| 		"version": "~=0.0.4", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_mijn_host_api_key=0123456789abcdef0123456789abcdef", |  | ||||||
| 		"full_plugin_name": "dns-mijn-host" |  | ||||||
| 	}, |  | ||||||
| 	"namecheap": { |  | ||||||
| 		"name": "Namecheap", |  | ||||||
| 		"package_name": "certbot-dns-namecheap", |  | ||||||
| 		"version": "~=1.0.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_namecheap_username  = 123456\ndns_namecheap_api_key      = 0123456789abcdef0123456789abcdef01234567", |  | ||||||
| 		"full_plugin_name": "dns-namecheap" |  | ||||||
| 	}, |  | ||||||
| 	"netcup": { |  | ||||||
| 		"name": "netcup", |  | ||||||
| 		"package_name": "certbot-dns-netcup", |  | ||||||
| 		"version": "~=1.0.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_netcup_customer_id  = 123456\ndns_netcup_api_key      = 0123456789abcdef0123456789abcdef01234567\ndns_netcup_api_password = abcdef0123456789abcdef01234567abcdef0123", |  | ||||||
| 		"full_plugin_name": "dns-netcup" |  | ||||||
| 	}, |  | ||||||
| 	"nicru": { |  | ||||||
| 		"name": "nic.ru", |  | ||||||
| 		"package_name": "certbot-dns-nicru", |  | ||||||
| 		"version": "~=1.0.3", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_nicru_client_id = application-id\ndns_nicru_client_secret = application-token\ndns_nicru_username = 0001110/NIC-D\ndns_nicru_password = password\ndns_nicru_scope = .+:.+/zones/example.com(/.+)?\ndns_nicru_service = DNS_SERVICE_NAME\ndns_nicru_zone = example.com", |  | ||||||
| 		"full_plugin_name": "dns-nicru" |  | ||||||
| 	}, |  | ||||||
| 	"njalla": { |  | ||||||
| 		"name": "Njalla", |  | ||||||
| 		"package_name": "certbot-dns-njalla", |  | ||||||
| 		"version": "~=1.0.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_njalla_token = 0123456789abcdef0123456789abcdef01234567", |  | ||||||
| 		"full_plugin_name": "dns-njalla" |  | ||||||
| 	}, |  | ||||||
| 	"nsone": { |  | ||||||
| 		"name": "NS1", |  | ||||||
| 		"package_name": "certbot-dns-nsone", |  | ||||||
| 		"version": "=={{certbot-version}}", |  | ||||||
| 		"dependencies": "acme=={{certbot-version}}", |  | ||||||
| 		"credentials": "dns_nsone_api_key = MDAwMDAwMDAwMDAwMDAw", |  | ||||||
| 		"full_plugin_name": "dns-nsone" |  | ||||||
| 	}, |  | ||||||
| 	"oci": { |  | ||||||
| 		"name": "Oracle Cloud Infrastructure DNS", |  | ||||||
| 		"package_name": "certbot-dns-oci", |  | ||||||
| 		"version": "~=0.3.6", |  | ||||||
| 		"dependencies": "oci", |  | ||||||
| 		"credentials": "[DEFAULT]\nuser = ocid1.user.oc1...\nfingerprint = xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx\ntenancy = ocid1.tenancy.oc1...\nregion = us-ashburn-1\nkey_file = ~/.oci/oci_api_key.pem", |  | ||||||
| 		"full_plugin_name": "dns-oci" |  | ||||||
| 	}, |  | ||||||
| 	"ovh": { |  | ||||||
| 		"name": "OVH", |  | ||||||
| 		"package_name": "certbot-dns-ovh", |  | ||||||
| 		"version": "=={{certbot-version}}", |  | ||||||
| 		"dependencies": "acme=={{certbot-version}}", |  | ||||||
| 		"credentials": "dns_ovh_endpoint = ovh-eu\ndns_ovh_application_key = MDAwMDAwMDAwMDAw\ndns_ovh_application_secret = MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw\ndns_ovh_consumer_key = MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw", |  | ||||||
| 		"full_plugin_name": "dns-ovh" |  | ||||||
| 	}, |  | ||||||
| 	"plesk": { |  | ||||||
| 		"name": "Plesk", |  | ||||||
| 		"package_name": "certbot-dns-plesk", |  | ||||||
| 		"version": "~=0.3.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_plesk_username = your-username\ndns_plesk_password = secret\ndns_plesk_api_url = https://plesk-api-host:8443", |  | ||||||
| 		"full_plugin_name": "dns-plesk" |  | ||||||
| 	}, |  | ||||||
| 	"porkbun": { |  | ||||||
| 		"name": "Porkbun", |  | ||||||
| 		"package_name": "certbot-dns-porkbun", |  | ||||||
| 		"version": "~=0.9", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_porkbun_key=your-porkbun-api-key\ndns_porkbun_secret=your-porkbun-api-secret", |  | ||||||
| 		"full_plugin_name": "dns-porkbun" |  | ||||||
| 	}, |  | ||||||
| 	"powerdns": { |  | ||||||
| 		"name": "PowerDNS", |  | ||||||
| 		"package_name": "certbot-dns-powerdns", |  | ||||||
| 		"version": "~=0.2.1", |  | ||||||
| 		"dependencies": "PyYAML==5.3.1", |  | ||||||
| 		"credentials": "dns_powerdns_api_url = https://api.mypowerdns.example.org\ndns_powerdns_api_key = AbCbASsd!@34", |  | ||||||
| 		"full_plugin_name": "dns-powerdns" |  | ||||||
| 	}, |  | ||||||
| 	"regru": { |  | ||||||
| 		"name": "reg.ru", |  | ||||||
| 		"package_name": "certbot-regru", |  | ||||||
| 		"version": "~=1.0.2", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_username=username\ndns_password=password", |  | ||||||
| 		"full_plugin_name": "dns" |  | ||||||
| 	}, |  | ||||||
| 	"rfc2136": { |  | ||||||
| 		"name": "RFC 2136", |  | ||||||
| 		"package_name": "certbot-dns-rfc2136", |  | ||||||
| 		"version": "=={{certbot-version}}", |  | ||||||
| 		"dependencies": "acme=={{certbot-version}}", |  | ||||||
| 		"credentials": "# Target DNS server\ndns_rfc2136_server = 192.0.2.1\n# Target DNS port\ndns_rfc2136_port = 53\n# TSIG key name\ndns_rfc2136_name = keyname.\n# TSIG key secret\ndns_rfc2136_secret = 4q4wM/2I180UXoMyN4INVhJNi8V9BCV+jMw2mXgZw/CSuxUT8C7NKKFs AmKd7ak51vWKgSl12ib86oQRPkpDjg==\n# TSIG key algorithm\ndns_rfc2136_algorithm = HMAC-SHA512", |  | ||||||
| 		"full_plugin_name": "dns-rfc2136" |  | ||||||
| 	}, |  | ||||||
| 	"rockenstein": { |  | ||||||
| 		"name": "rockenstein AG", |  | ||||||
| 		"package_name": "certbot-dns-rockenstein", |  | ||||||
| 		"version": "~=1.0.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_rockenstein_token=<token>", |  | ||||||
| 		"full_plugin_name": "dns-rockenstein" |  | ||||||
| 	}, |  | ||||||
| 	"route53": { |  | ||||||
| 		"name": "Route 53 (Amazon)", |  | ||||||
| 		"package_name": "certbot-dns-route53", |  | ||||||
| 		"version": "=={{certbot-version}}", |  | ||||||
| 		"dependencies": "acme=={{certbot-version}}", |  | ||||||
| 		"credentials": "[default]\naws_access_key_id=AKIAIOSFODNN7EXAMPLE\naws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", |  | ||||||
| 		"full_plugin_name": "dns-route53" |  | ||||||
| 	}, |  | ||||||
| 	"spaceship": { |  | ||||||
| 		"name": "Spaceship", |  | ||||||
| 		"package_name": "certbot-dns-spaceship", |  | ||||||
| 		"version": "~=1.0.4", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "[spaceship]\napi_key=your_api_key\napi_secret=your_api_secret", |  | ||||||
| 		"full_plugin_name": "dns-spaceship" |  | ||||||
| 	}, |  | ||||||
| 	"strato": { |  | ||||||
| 		"name": "Strato", |  | ||||||
| 		"package_name": "certbot-dns-strato", |  | ||||||
| 		"version": "~=0.2.2", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_strato_username = user\ndns_strato_password = pass\n# uncomment if youre using two factor authentication:\n# dns_strato_totp_devicename = 2fa_device\n# dns_strato_totp_secret = 2fa_secret\n#\n# uncomment if domain name contains special characters\n# insert domain display name as seen on your account page here\n# dns_strato_domain_display_name = my-punicode-url.de\n#\n# if youre not using strato.de or another special endpoint you can customise it below\n# you will probably only need to adjust the host, but you can also change the complete endpoint url\n# dns_strato_custom_api_scheme = https\n# dns_strato_custom_api_host = www.strato.de\n# dns_strato_custom_api_port = 443\n# dns_strato_custom_api_path = \"/apps/CustomerService\"", |  | ||||||
| 		"full_plugin_name": "dns-strato" |  | ||||||
| 	}, |  | ||||||
| 	        "selectelv2": { |  | ||||||
|                 "name": "Selectel api v2", |  | ||||||
|                 "package_name": "certbot-dns-selectel-api-v2", |  | ||||||
|                 "version": "~=0.3.0", |  | ||||||
|                 "dependencies": "", |  | ||||||
|                 "credentials": "dns_selectel_api_v2_account_id = your_account_id\ndns_selectel_api_v2_project_name = your_project\ndns_selectel_api_v2_username = your_username\ndns_selectel_api_v2_password = your_password", |  | ||||||
|                 "full_plugin_name": "dns-selectel-api-v2" |  | ||||||
|         }, |  | ||||||
| 	"timeweb": { |  | ||||||
| 		"name": "Timeweb Cloud", |  | ||||||
| 		"package_name": "certbot-dns-timeweb", |  | ||||||
| 		"version": "~=1.0.1", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_timeweb_api_key = XXXXXXXXXXXXXXXXXXX", |  | ||||||
| 		"full_plugin_name": "dns-timeweb" |  | ||||||
| 	}, |  | ||||||
| 	"transip": { |  | ||||||
| 		"name": "TransIP", |  | ||||||
| 		"package_name": "certbot-dns-transip", |  | ||||||
| 		"version": "~=0.5.2", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_transip_username = my_username\ndns_transip_key_file = /etc/letsencrypt/transip-rsa.key", |  | ||||||
| 		"full_plugin_name": "dns-transip" |  | ||||||
| 	}, |  | ||||||
| 	"tencentcloud": { |  | ||||||
| 		"name": "Tencent Cloud", |  | ||||||
| 		"package_name": "certbot-dns-tencentcloud", |  | ||||||
| 		"version": "~=2.0.2", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_tencentcloud_secret_id  = TENCENT_CLOUD_SECRET_ID\ndns_tencentcloud_secret_key = TENCENT_CLOUD_SECRET_KEY", |  | ||||||
| 		"full_plugin_name": "dns-tencentcloud" |  | ||||||
| 	}, |  | ||||||
| 	"vultr": { |  | ||||||
| 		"name": "Vultr", |  | ||||||
| 		"package_name": "certbot-dns-vultr", |  | ||||||
| 		"version": "~=1.1.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_vultr_key = YOUR_VULTR_API_KEY", |  | ||||||
| 		"full_plugin_name": "dns-vultr" |  | ||||||
| 	}, |  | ||||||
| 	"websupport": { |  | ||||||
| 		"name": "Websupport.sk", |  | ||||||
| 		"package_name": "certbot-dns-websupport", |  | ||||||
| 		"version": "~=2.0.1", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_websupport_identifier = <api_key>\ndns_websupport_secret_key = <secret>", |  | ||||||
| 		"full_plugin_name": "dns-websupport" |  | ||||||
| 	}, |  | ||||||
| 	"wedos": { |  | ||||||
| 		"name": "Wedos", |  | ||||||
| 		"package_name": "certbot-dns-wedos", |  | ||||||
| 		"version": "~=2.2", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "dns_wedos_user = <wedos_registration>\ndns_wedos_auth = <wapi_password>", |  | ||||||
| 		"full_plugin_name": "dns-wedos" |  | ||||||
| 	}, |  | ||||||
| 	"edgedns": { |  | ||||||
| 		"name": "Akamai Edge DNS", |  | ||||||
| 		"package_name": "certbot-plugin-edgedns", |  | ||||||
| 		"version": "~=0.1.0", |  | ||||||
| 		"dependencies": "", |  | ||||||
| 		"credentials": "edgedns_client_secret = as3d1asd5d1a32sdfsdfs2d1asd5=\nedgedns_host = sdflskjdf-dfsdfsdf-sdfsdfsdf.luna.akamaiapis.net\nedgedns_access_token = kjdsi3-34rfsdfsdf-234234fsdfsdf\nedgedns_client_token = dkfjdf-342fsdfsd-23fsdfsdfsdf", |  | ||||||
| 		"full_plugin_name": "edgedns" |  | ||||||
| 	}, |  | ||||||
| 	"zoneedit": { |  | ||||||
| 		"name": "ZoneEdit", |  | ||||||
| 		"package_name": "certbot-dns-zoneedit", |  | ||||||
| 		"version": "~=0.3.2", |  | ||||||
| 		"dependencies": "--no-deps dnspython", |  | ||||||
| 		"credentials": "dns_zoneedit_user = <login-user-id>\ndns_zoneedit_token = <dyn-authentication-token>", |  | ||||||
| 		"full_plugin_name": "dns-zoneedit" |  | ||||||
|  	} |  | ||||||
| } |  | ||||||
							
								
								
									
										125
									
								
								backend/cmd/ipranges/main.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										125
									
								
								backend/cmd/ipranges/main.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,125 @@ | |||||||
|  | package main | ||||||
|  |  | ||||||
|  | import ( | ||||||
|  | 	"bufio" | ||||||
|  | 	"encoding/json" | ||||||
|  | 	"fmt" | ||||||
|  | 	"io" | ||||||
|  | 	"net/http" | ||||||
|  | 	"os" | ||||||
|  |  | ||||||
|  | 	"npm/internal/config" | ||||||
|  | 	"npm/internal/model" | ||||||
|  |  | ||||||
|  | 	"github.com/rotisserie/eris" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | var commit string | ||||||
|  | var version string | ||||||
|  |  | ||||||
|  | var cloudfrontURL = "https://ip-ranges.amazonaws.com/ip-ranges.json" | ||||||
|  | var cloudflare4URL = "https://www.cloudflare.com/ips-v4" | ||||||
|  | var cloudflare6URL = "https://www.cloudflare.com/ips-v6" | ||||||
|  |  | ||||||
|  | func main() { | ||||||
|  | 	config.InitArgs(&version, &commit) | ||||||
|  | 	if err := config.InitIPRanges(&version, &commit); err != nil { | ||||||
|  | 		fmt.Printf("# Config ERROR: %v\n", err) | ||||||
|  | 		os.Exit(1) | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	exitCode := 0 | ||||||
|  |  | ||||||
|  | 	// Cloudfront | ||||||
|  | 	fmt.Printf("# Cloudfront Ranges from: %s\n", cloudfrontURL) | ||||||
|  | 	if ranges, err := parseCloudfront(); err == nil { | ||||||
|  | 		for _, item := range ranges { | ||||||
|  | 			fmt.Printf("set_real_ip_from %s;\n", item) | ||||||
|  | 		} | ||||||
|  | 	} else { | ||||||
|  | 		fmt.Printf("# ERROR: %v\n", err) | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	// Cloudflare ipv4 | ||||||
|  | 	if !config.Configuration.DisableIPV4 { | ||||||
|  | 		fmt.Printf("\n# Cloudflare Ranges from: %s\n", cloudflare4URL) | ||||||
|  | 		if ranges, err := parseCloudflare(cloudflare4URL); err == nil { | ||||||
|  | 			for _, item := range ranges { | ||||||
|  | 				fmt.Printf("set_real_ip_from %s;\n", item) | ||||||
|  | 			} | ||||||
|  | 		} else { | ||||||
|  | 			fmt.Printf("# ERROR: %v\n", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	// Cloudflare ipv6 | ||||||
|  | 	if !config.Configuration.DisableIPV6 { | ||||||
|  | 		fmt.Printf("\n# Cloudflare Ranges from: %s\n", cloudflare6URL) | ||||||
|  | 		if ranges, err := parseCloudflare(cloudflare6URL); err == nil { | ||||||
|  | 			for _, item := range ranges { | ||||||
|  | 				fmt.Printf("set_real_ip_from %s;\n", item) | ||||||
|  | 			} | ||||||
|  | 		} else { | ||||||
|  | 			fmt.Printf("# ERROR: %v\n", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	// Done | ||||||
|  | 	os.Exit(exitCode) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func parseCloudfront() ([]string, error) { | ||||||
|  | 	// nolint: gosec | ||||||
|  | 	resp, err := http.Get(cloudfrontURL) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return nil, eris.Wrapf(err, "Failed to download Cloudfront IP Ranges from %s", cloudfrontURL) | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	// nolint: errcheck, gosec | ||||||
|  | 	defer resp.Body.Close() | ||||||
|  | 	body, err := io.ReadAll(resp.Body) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return nil, eris.Wrapf(err, "Failed to read Cloudfront IP Ranges body") | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	var result model.CloudfrontIPRanges | ||||||
|  | 	if err := json.Unmarshal(body, &result); err != nil { | ||||||
|  | 		return nil, eris.Wrapf(err, "Failed to unmarshal Cloudfront IP Ranges file") | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	ranges := make([]string, 0) | ||||||
|  | 	if !config.Configuration.DisableIPV4 { | ||||||
|  | 		for _, item := range result.IPV4Prefixes { | ||||||
|  | 			ranges = append(ranges, item.Value) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	if !config.Configuration.DisableIPV6 { | ||||||
|  | 		for _, item := range result.IPV6Prefixes { | ||||||
|  | 			ranges = append(ranges, item.Value) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	return ranges, nil | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func parseCloudflare(url string) ([]string, error) { | ||||||
|  | 	// nolint: gosec | ||||||
|  | 	resp, err := http.Get(url) | ||||||
|  | 	if err != nil { | ||||||
|  | 		return nil, eris.Wrapf(err, "Failed to download Cloudflare IP Ranges from %s", url) | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	// nolint: errcheck, gosec | ||||||
|  | 	defer resp.Body.Close() | ||||||
|  |  | ||||||
|  | 	scanner := bufio.NewScanner(resp.Body) | ||||||
|  | 	scanner.Split(bufio.ScanLines) | ||||||
|  |  | ||||||
|  | 	ranges := make([]string, 0) | ||||||
|  | 	for scanner.Scan() { | ||||||
|  | 		if scanner.Text() != "" { | ||||||
|  | 			ranges = append(ranges, scanner.Text()) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return ranges, nil | ||||||
|  | } | ||||||
							
								
								
									
										84
									
								
								backend/cmd/server/main.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								backend/cmd/server/main.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,84 @@ | |||||||
|  | package main | ||||||
|  |  | ||||||
|  | import ( | ||||||
|  | 	"os" | ||||||
|  | 	"os/signal" | ||||||
|  | 	"syscall" | ||||||
|  |  | ||||||
|  | 	"npm/internal/api" | ||||||
|  | 	"npm/internal/config" | ||||||
|  | 	"npm/internal/database" | ||||||
|  | 	"npm/internal/entity/certificate" | ||||||
|  | 	"npm/internal/entity/host" | ||||||
|  | 	"npm/internal/entity/user" | ||||||
|  | 	"npm/internal/errors" | ||||||
|  | 	"npm/internal/jobqueue" | ||||||
|  | 	"npm/internal/jwt" | ||||||
|  | 	"npm/internal/logger" | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | var commit string | ||||||
|  | var version string | ||||||
|  |  | ||||||
|  | func main() { | ||||||
|  | 	config.InitArgs(&version, &commit) | ||||||
|  | 	config.Init(&version, &commit) | ||||||
|  | 	config.CreateDataFolders() | ||||||
|  | 	logger.Info("Build Version: %s (%s)", version, commit) | ||||||
|  |  | ||||||
|  | 	database.Migrate(func() { | ||||||
|  | 		if err := jwt.LoadKeys(); err != nil { | ||||||
|  | 			logger.Error("KeysError", err) | ||||||
|  | 			os.Exit(1) | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		checkSetup() | ||||||
|  |  | ||||||
|  | 		// Internal Job Queue | ||||||
|  | 		jobqueue.Start() | ||||||
|  | 		certificate.AddPendingJobs() | ||||||
|  | 		host.AddPendingJobs() | ||||||
|  |  | ||||||
|  | 		// Http server | ||||||
|  | 		api.StartServer() | ||||||
|  | 		irqchan := make(chan os.Signal, 1) | ||||||
|  | 		signal.Notify(irqchan, syscall.SIGINT, syscall.SIGTERM) | ||||||
|  |  | ||||||
|  | 		for irq := range irqchan { | ||||||
|  | 			if irq == syscall.SIGINT || irq == syscall.SIGTERM { | ||||||
|  | 				logger.Info("Got ", irq, " shutting server down ...") | ||||||
|  | 				// Close db | ||||||
|  | 				sqlDB, _ := database.GetDB().DB() | ||||||
|  | 				err := sqlDB.Close() | ||||||
|  | 				if err != nil { | ||||||
|  | 					logger.Error("DatabaseCloseError", err) | ||||||
|  | 				} | ||||||
|  | 				// nolint | ||||||
|  | 				jobqueue.Shutdown() | ||||||
|  | 				break | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // checkSetup Quick check by counting the number of users in the database | ||||||
|  | func checkSetup() { | ||||||
|  | 	db := database.GetDB() | ||||||
|  | 	var count int64 | ||||||
|  |  | ||||||
|  | 	if db != nil { | ||||||
|  | 		db.Model(&user.Model{}). | ||||||
|  | 			Where("is_disabled = ?", false). | ||||||
|  | 			Where("is_system = ?", false). | ||||||
|  | 			Count(&count) | ||||||
|  |  | ||||||
|  | 		if count == 0 { | ||||||
|  | 			logger.Warn("No users found, starting in Setup Mode") | ||||||
|  | 		} else { | ||||||
|  | 			config.IsSetup = true | ||||||
|  | 			logger.Info("Application is setup") | ||||||
|  | 		} | ||||||
|  | 	} else { | ||||||
|  | 		logger.Error("DatabaseError", errors.ErrDatabaseUnavailable) | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -1,2 +0,0 @@ | |||||||
| These files are use in development and are not deployed as part of the final product. |  | ||||||
|   |  | ||||||
| @@ -1,10 +0,0 @@ | |||||||
| { |  | ||||||
|   "database": { |  | ||||||
|     "engine": "mysql2", |  | ||||||
|     "host": "db", |  | ||||||
|     "name": "npm", |  | ||||||
|     "user": "npm", |  | ||||||
|     "password": "npm", |  | ||||||
|     "port": 3306 |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @@ -1,26 +0,0 @@ | |||||||
| { |  | ||||||
|   "database": { |  | ||||||
|       "engine": "knex-native", |  | ||||||
|       "knex": { |  | ||||||
|         "client": "sqlite3", |  | ||||||
|         "connection": { |  | ||||||
|           "filename": "/app/config/mydb.sqlite" |  | ||||||
|         }, |  | ||||||
|         "pool": { |  | ||||||
|           "min": 0, |  | ||||||
|           "max": 1, |  | ||||||
|           "createTimeoutMillis": 3000, |  | ||||||
|           "acquireTimeoutMillis": 30000, |  | ||||||
|           "idleTimeoutMillis": 30000, |  | ||||||
|           "reapIntervalMillis": 1000, |  | ||||||
|           "createRetryIntervalMillis": 100, |  | ||||||
|           "propagateCreateError": false |  | ||||||
|         }, |  | ||||||
|         "migrations": { |  | ||||||
|           "tableName": "migrations", |  | ||||||
|           "stub": "src/backend/lib/migrate_template.js", |  | ||||||
|           "directory": "src/backend/migrations" |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @@ -1,32 +0,0 @@ | |||||||
| import knex from "knex"; |  | ||||||
| import {configGet, configHas} from "./lib/config.js"; |  | ||||||
|  |  | ||||||
| const generateDbConfig = () => { |  | ||||||
| 	if (!configHas("database")) { |  | ||||||
| 		throw new Error( |  | ||||||
| 			"Database config does not exist! Please read the instructions: https://nginxproxymanager.com/setup/", |  | ||||||
| 		); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	const cfg = configGet("database"); |  | ||||||
|  |  | ||||||
| 	if (cfg.engine === "knex-native") { |  | ||||||
| 		return cfg.knex; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	return { |  | ||||||
| 		client: cfg.engine, |  | ||||||
| 		connection: { |  | ||||||
| 			host: cfg.host, |  | ||||||
| 			user: cfg.user, |  | ||||||
| 			password: cfg.password, |  | ||||||
| 			database: cfg.name, |  | ||||||
| 			port: cfg.port, |  | ||||||
| 		}, |  | ||||||
| 		migrations: { |  | ||||||
| 			tableName: "migrations", |  | ||||||
| 		}, |  | ||||||
| 	}; |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| export default knex(generateDbConfig()); |  | ||||||
							
								
								
									
										310
									
								
								backend/embed/api_docs/api.swagger.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										310
									
								
								backend/embed/api_docs/api.swagger.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,310 @@ | |||||||
|  | { | ||||||
|  | 	"openapi": "3.0.0", | ||||||
|  | 	"info": { | ||||||
|  | 		"title": "Nginx Proxy Manager API", | ||||||
|  | 		"version": "{{VERSION}}" | ||||||
|  | 	}, | ||||||
|  | 	"paths": { | ||||||
|  | 		"/": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/get.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/auth": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/auth/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/auth/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/auth/refresh": { | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/auth/refresh/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/auth/sse": { | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/auth/sse/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/certificates": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/certificates/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/certificates/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/certificates/{certificateID}": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/certificates/certificateID/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"put": { | ||||||
|  | 				"$ref": "file://./paths/certificates/certificateID/put.json" | ||||||
|  | 			}, | ||||||
|  | 			"delete": { | ||||||
|  | 				"$ref": "file://./paths/certificates/certificateID/delete.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/certificates-authorities": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/certificates-authorities/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/certificates-authorities/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/certificates-authorities/{caID}": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/certificates-authorities/caID/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"put": { | ||||||
|  | 				"$ref": "file://./paths/certificates-authorities/caID/put.json" | ||||||
|  | 			}, | ||||||
|  | 			"delete": { | ||||||
|  | 				"$ref": "file://./paths/certificates-authorities/caID/delete.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/config": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/config/get.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/dns-providers": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/dns-providers/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/dns-providers/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/dns-providers/{providerID}": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/dns-providers/providerID/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"put": { | ||||||
|  | 				"$ref": "file://./paths/dns-providers/providerID/put.json" | ||||||
|  | 			}, | ||||||
|  | 			"delete": { | ||||||
|  | 				"$ref": "file://./paths/dns-providers/providerID/delete.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/hosts": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/hosts/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/hosts/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/hosts/{hostID}": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/hosts/hostID/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"put": { | ||||||
|  | 				"$ref": "file://./paths/hosts/hostID/put.json" | ||||||
|  | 			}, | ||||||
|  | 			"delete": { | ||||||
|  | 				"$ref": "file://./paths/hosts/hostID/delete.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/hosts/{hostID}/nginx-config": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/hosts/hostID/nginx-config/get.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/nginx-templates": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/nginx-templates/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/nginx-templates/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/nginx-templates/{templateID}": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/nginx-templates/templateID/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"put": { | ||||||
|  | 				"$ref": "file://./paths/nginx-templates/templateID/put.json" | ||||||
|  | 			}, | ||||||
|  | 			"delete": { | ||||||
|  | 				"$ref": "file://./paths/nginx-templates/templateID/delete.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/schema": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/schema/get.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/settings": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/settings/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/settings/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/settings/{name}": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/settings/name/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"put": { | ||||||
|  | 				"$ref": "file://./paths/settings/name/put.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/streams": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/streams/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/streams/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/streams/{streamID}": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/streams/streamID/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"put": { | ||||||
|  | 				"$ref": "file://./paths/streams/streamID/put.json" | ||||||
|  | 			}, | ||||||
|  | 			"delete": { | ||||||
|  | 				"$ref": "file://./paths/streams/streamID/delete.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/upstreams": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/upstreams/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/upstreams/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/upstreams/{upstreamID}": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/upstreams/upstreamID/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"put": { | ||||||
|  | 				"$ref": "file://./paths/upstreams/upstreamID/put.json" | ||||||
|  | 			}, | ||||||
|  | 			"delete": { | ||||||
|  | 				"$ref": "file://./paths/upstreams/upstreamID/delete.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/upstreams/{upstreamID}/nginx-config": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/upstreams/upstreamID/nginx-config/get.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/users": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/users/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/users/post.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/users/{userID}": { | ||||||
|  | 			"get": { | ||||||
|  | 				"$ref": "file://./paths/users/userID/get.json" | ||||||
|  | 			}, | ||||||
|  | 			"put": { | ||||||
|  | 				"$ref": "file://./paths/users/userID/put.json" | ||||||
|  | 			}, | ||||||
|  | 			"delete": { | ||||||
|  | 				"$ref": "file://./paths/users/userID/delete.json" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"/users/{userID}/auth": { | ||||||
|  | 			"post": { | ||||||
|  | 				"$ref": "file://./paths/users/userID/auth/post.json" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"components": { | ||||||
|  | 		"schemas": { | ||||||
|  | 			"AuthConfigObject": { | ||||||
|  | 				"$ref": "file://./components/AuthConfigObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"CertificateAuthorityList": { | ||||||
|  | 				"$ref": "file://./components/CertificateAuthorityList.json" | ||||||
|  | 			}, | ||||||
|  | 			"CertificateAuthorityObject": { | ||||||
|  | 				"$ref": "file://./components/CertificateAuthorityObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"CertificateList": { | ||||||
|  | 				"$ref": "file://./components/CertificateList.json" | ||||||
|  | 			}, | ||||||
|  | 			"CertificateObject": { | ||||||
|  | 				"$ref": "file://./components/CertificateObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"ConfigObject": { | ||||||
|  | 				"$ref": "file://./components/ConfigObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"DeletedItemResponse": { | ||||||
|  | 				"$ref": "file://./components/DeletedItemResponse.json" | ||||||
|  | 			}, | ||||||
|  | 			"DNSProviderList": { | ||||||
|  | 				"$ref": "file://./components/DNSProviderList.json" | ||||||
|  | 			}, | ||||||
|  | 			"DNSProviderObject": { | ||||||
|  | 				"$ref": "file://./components/DNSProviderObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"ErrorObject": { | ||||||
|  | 				"$ref": "file://./components/ErrorObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"FilterObject": { | ||||||
|  | 				"$ref": "file://./components/FilterObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"HealthObject": { | ||||||
|  | 				"$ref": "file://./components/HealthObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"HostList": { | ||||||
|  | 				"$ref": "file://./components/HostList.json" | ||||||
|  | 			}, | ||||||
|  | 			"HostObject": { | ||||||
|  | 				"$ref": "file://./components/HostObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"NginxTemplateList": { | ||||||
|  | 				"$ref": "file://./components/NginxTemplateList.json" | ||||||
|  | 			}, | ||||||
|  | 			"NginxTemplateObject": { | ||||||
|  | 				"$ref": "file://./components/NginxTemplateObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"SettingList": { | ||||||
|  | 				"$ref": "file://./components/SettingList.json" | ||||||
|  | 			}, | ||||||
|  | 			"SettingObject": { | ||||||
|  | 				"$ref": "file://./components/SettingObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"SortObject": { | ||||||
|  | 				"$ref": "file://./components/SortObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"StreamList": { | ||||||
|  | 				"$ref": "file://./components/StreamList.json" | ||||||
|  | 			}, | ||||||
|  | 			"StreamObject": { | ||||||
|  | 				"$ref": "file://./components/StreamObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"TokenObject": { | ||||||
|  | 				"$ref": "file://./components/TokenObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"UpstreamList": { | ||||||
|  | 				"$ref": "file://./components/UpstreamList.json" | ||||||
|  | 			}, | ||||||
|  | 			"UpstreamObject": { | ||||||
|  | 				"$ref": "file://./components/UpstreamObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"UserAuthObject": { | ||||||
|  | 				"$ref": "file://./components/UserAuthObject.json" | ||||||
|  | 			}, | ||||||
|  | 			"UserList": { | ||||||
|  | 				"$ref": "file://./components/UserList.json" | ||||||
|  | 			}, | ||||||
|  | 			"UserObject": { | ||||||
|  | 				"$ref": "file://./components/UserObject.json" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										13
									
								
								backend/embed/api_docs/components/AuthConfigObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								backend/embed/api_docs/components/AuthConfigObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | |||||||
|  | { | ||||||
|  | 	"type": "array", | ||||||
|  | 	"description": "AuthConfigObject", | ||||||
|  | 	"minItems": 1, | ||||||
|  | 	"items": { | ||||||
|  | 		"type": "string", | ||||||
|  | 		"enum": [ | ||||||
|  | 			"local", | ||||||
|  | 			"ldap", | ||||||
|  | 			"oauth" | ||||||
|  | 		] | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,40 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "CertificateAuthorityList", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["total", "offset", "limit", "sort"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"total": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Total number of rows" | ||||||
|  | 		}, | ||||||
|  | 		"offset": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Offset" | ||||||
|  | 		}, | ||||||
|  | 		"limit": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Limit" | ||||||
|  | 		}, | ||||||
|  | 		"sort": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Sorting", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/SortObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"filter": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Filters", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/FilterObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"items": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/CertificateAuthorityObject" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,57 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "CertificateAuthorityObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": [ | ||||||
|  | 		"id", | ||||||
|  | 		"created_at", | ||||||
|  | 		"updated_at", | ||||||
|  | 		"name", | ||||||
|  | 		"acmesh_server", | ||||||
|  | 		"ca_bundle", | ||||||
|  | 		"max_domains", | ||||||
|  | 		"is_wildcard_supported", | ||||||
|  | 		"is_readonly" | ||||||
|  | 	], | ||||||
|  | 	"properties": { | ||||||
|  | 		"id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"created_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Created Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"updated_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Updated Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"name": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 1, | ||||||
|  | 			"maxLength": 100 | ||||||
|  | 		}, | ||||||
|  | 		"acmesh_server": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 2, | ||||||
|  | 			"maxLength": 255 | ||||||
|  | 		}, | ||||||
|  | 		"ca_bundle": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 0, | ||||||
|  | 			"maxLength": 255 | ||||||
|  | 		}, | ||||||
|  | 		"max_domains": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"is_wildcard_supported": { | ||||||
|  | 			"type": "boolean" | ||||||
|  | 		}, | ||||||
|  | 		"is_readonly": { | ||||||
|  | 			"type": "boolean" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										40
									
								
								backend/embed/api_docs/components/CertificateList.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								backend/embed/api_docs/components/CertificateList.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "CertificateList", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["total", "offset", "limit", "sort"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"total": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Total number of rows" | ||||||
|  | 		}, | ||||||
|  | 		"offset": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Offset" | ||||||
|  | 		}, | ||||||
|  | 		"limit": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Limit" | ||||||
|  | 		}, | ||||||
|  | 		"sort": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Sorting", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/SortObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"filter": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Filters", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/FilterObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"items": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/CertificateObject" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										86
									
								
								backend/embed/api_docs/components/CertificateObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										86
									
								
								backend/embed/api_docs/components/CertificateObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,86 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "CertificateObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": [ | ||||||
|  | 		"id", | ||||||
|  | 		"created_at", | ||||||
|  | 		"updated_at", | ||||||
|  | 		"expires_on", | ||||||
|  | 		"type", | ||||||
|  | 		"user_id", | ||||||
|  | 		"certificate_authority_id", | ||||||
|  | 		"dns_provider_id", | ||||||
|  | 		"name", | ||||||
|  | 		"is_ecc", | ||||||
|  | 		"status", | ||||||
|  | 		"domain_names" | ||||||
|  | 	], | ||||||
|  | 	"properties": { | ||||||
|  | 		"id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"created_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Created Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"updated_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Updated Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"expires_on": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 0, | ||||||
|  | 			"nullable": true | ||||||
|  | 		}, | ||||||
|  | 		"type": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"enum": ["custom", "http", "dns"] | ||||||
|  | 		}, | ||||||
|  | 		"user_id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"certificate_authority_id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 0 | ||||||
|  | 		}, | ||||||
|  | 		"certificate_authority": { | ||||||
|  | 			"$ref": "#/components/schemas/CertificateAuthorityObject" | ||||||
|  | 		}, | ||||||
|  | 		"dns_provider_id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 0, | ||||||
|  | 			"nullable": true | ||||||
|  | 		}, | ||||||
|  | 		"name": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 1, | ||||||
|  | 			"maxLength": 100 | ||||||
|  | 		}, | ||||||
|  | 		"domain_names": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"minItems": 1, | ||||||
|  | 			"items": { | ||||||
|  | 				"type": "string", | ||||||
|  | 				"minLength": 4 | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"status": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"enum": ["ready", "requesting", "failed", "provided"] | ||||||
|  | 		}, | ||||||
|  | 		"is_ecc": { | ||||||
|  | 			"type": "boolean" | ||||||
|  | 		}, | ||||||
|  | 		"error_message": { | ||||||
|  | 			"type": "string" | ||||||
|  | 		}, | ||||||
|  | 		"user": { | ||||||
|  | 			"$ref": "#/components/schemas/UserObject" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										4
									
								
								backend/embed/api_docs/components/ConfigObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								backend/embed/api_docs/components/ConfigObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "ConfigObject" | ||||||
|  | } | ||||||
							
								
								
									
										40
									
								
								backend/embed/api_docs/components/DNSProviderList.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								backend/embed/api_docs/components/DNSProviderList.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "DNSProviderList", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["total", "offset", "limit", "sort"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"total": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Total number of rows" | ||||||
|  | 		}, | ||||||
|  | 		"offset": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Offset" | ||||||
|  | 		}, | ||||||
|  | 		"limit": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Limit" | ||||||
|  | 		}, | ||||||
|  | 		"sort": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Sorting", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/SortObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"filter": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Filters", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/FilterObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"items": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/DNSProviderObject" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										51
									
								
								backend/embed/api_docs/components/DNSProviderObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								backend/embed/api_docs/components/DNSProviderObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "DNSProviderObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": [ | ||||||
|  | 		"id", | ||||||
|  | 		"created_at", | ||||||
|  | 		"updated_at", | ||||||
|  | 		"user_id", | ||||||
|  | 		"name", | ||||||
|  | 		"acmesh_name", | ||||||
|  | 		"dns_sleep", | ||||||
|  | 		"meta" | ||||||
|  | 	], | ||||||
|  | 	"properties": { | ||||||
|  | 		"id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"created_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Created Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"updated_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Updated Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"user_id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"name": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 1, | ||||||
|  | 			"maxLength": 100 | ||||||
|  | 		}, | ||||||
|  | 		"acmesh_name": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 4, | ||||||
|  | 			"maxLength": 50 | ||||||
|  | 		}, | ||||||
|  | 		"dns_sleep": { | ||||||
|  | 			"type": "integer" | ||||||
|  | 		}, | ||||||
|  | 		"meta": { | ||||||
|  | 			"type": "object" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										15
									
								
								backend/embed/api_docs/components/DeletedItemResponse.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								backend/embed/api_docs/components/DeletedItemResponse.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "DeletedItemResponse", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["result"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"result": { | ||||||
|  | 			"type": "boolean", | ||||||
|  | 			"nullable": true | ||||||
|  | 		}, | ||||||
|  | 		"error": { | ||||||
|  | 			"$ref": "#/components/schemas/ErrorObject" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -1,16 +1,17 @@ | |||||||
| { | { | ||||||
| 	"type": "object", | 	"type": "object", | ||||||
| 	"description": "Error object", | 	"description": "ErrorObject", | ||||||
| 	"additionalProperties": false, | 	"additionalProperties": false, | ||||||
| 	"required": ["code", "message"], | 	"required": ["code", "message"], | ||||||
| 	"properties": { | 	"properties": { | ||||||
| 		"code": { | 		"code": { | ||||||
| 			"type": "integer", | 			"type": "integer", | ||||||
| 			"example": 400 | 			"description": "Error code", | ||||||
|  | 			"minimum": 0 | ||||||
| 		}, | 		}, | ||||||
| 		"message": { | 		"message": { | ||||||
| 			"type": "string", | 			"type": "string", | ||||||
| 			"example": "Bad Request" | 			"description": "Error message" | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
							
								
								
									
										24
									
								
								backend/embed/api_docs/components/FilterObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								backend/embed/api_docs/components/FilterObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "FilterObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["field", "modifier", "value"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"field": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"description": "Field to filter with" | ||||||
|  | 		}, | ||||||
|  | 		"modifier": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"description": "Filter modifier", | ||||||
|  | 			"pattern": "^(equals|not|min|max|greater|lesser|contains|starts|ends|in|notin)$" | ||||||
|  | 		}, | ||||||
|  | 		"value": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Values used for filtering", | ||||||
|  | 			"items": { | ||||||
|  | 				"type": "string" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										31
									
								
								backend/embed/api_docs/components/HealthObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								backend/embed/api_docs/components/HealthObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "HealthObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["version", "commit", "healthy", "setup"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"version": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"description": "Version", | ||||||
|  | 			"minLength": 1 | ||||||
|  | 		}, | ||||||
|  | 		"commit": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"description": "Commit hash", | ||||||
|  | 			"minLength": 7 | ||||||
|  | 		}, | ||||||
|  | 		"healthy": { | ||||||
|  | 			"type": "boolean", | ||||||
|  | 			"description": "Healthy?" | ||||||
|  | 		}, | ||||||
|  | 		"setup": { | ||||||
|  | 			"type": "boolean", | ||||||
|  | 			"description": "Is the application set up?" | ||||||
|  | 		}, | ||||||
|  | 		"acme.sh": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"description": "Acme.sh version", | ||||||
|  | 			"minLength": 1 | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										40
									
								
								backend/embed/api_docs/components/HostList.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								backend/embed/api_docs/components/HostList.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "HostList", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["total", "offset", "limit", "sort"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"total": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Total number of rows" | ||||||
|  | 		}, | ||||||
|  | 		"offset": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Offset" | ||||||
|  | 		}, | ||||||
|  | 		"limit": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Limit" | ||||||
|  | 		}, | ||||||
|  | 		"sort": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Sorting", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/SortObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"filter": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Filters", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/FilterObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"items": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/HostObject" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										55
									
								
								backend/embed/api_docs/components/HostObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								backend/embed/api_docs/components/HostObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "HostObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": [ | ||||||
|  | 		"id", | ||||||
|  | 		"created_at", | ||||||
|  | 		"updated_at", | ||||||
|  | 		"user_id", | ||||||
|  | 		"provider", | ||||||
|  | 		"name", | ||||||
|  | 		"domain_names" | ||||||
|  | 	], | ||||||
|  | 	"properties": { | ||||||
|  | 		"id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"created_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Created Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"updated_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Updated Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"user_id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"provider": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 1, | ||||||
|  | 			"maxLength": 100 | ||||||
|  | 		}, | ||||||
|  | 		"name": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 1, | ||||||
|  | 			"maxLength": 100 | ||||||
|  | 		}, | ||||||
|  | 		"domain_names": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"minItems": 1, | ||||||
|  | 			"items": { | ||||||
|  | 				"type": "string", | ||||||
|  | 				"minLength": 4 | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"user": { | ||||||
|  | 			"$ref": "#/components/schemas/UserObject" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										40
									
								
								backend/embed/api_docs/components/NginxTemplateList.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								backend/embed/api_docs/components/NginxTemplateList.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "NginxTemplateList", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["total", "offset", "limit", "sort"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"total": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Total number of rows" | ||||||
|  | 		}, | ||||||
|  | 		"offset": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Offset" | ||||||
|  | 		}, | ||||||
|  | 		"limit": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Limit" | ||||||
|  | 		}, | ||||||
|  | 		"sort": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Sorting", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/SortObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"filter": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Filters", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/FilterObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"items": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/NginxTemplateObject" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										46
									
								
								backend/embed/api_docs/components/NginxTemplateObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								backend/embed/api_docs/components/NginxTemplateObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "NginxTemplateObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": [ | ||||||
|  | 		"id", | ||||||
|  | 		"created_at", | ||||||
|  | 		"updated_at", | ||||||
|  | 		"user_id", | ||||||
|  | 		"name", | ||||||
|  | 		"type", | ||||||
|  | 		"template" | ||||||
|  | 	], | ||||||
|  | 	"properties": { | ||||||
|  | 		"id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"created_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Created Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"updated_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Updated Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"user_id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"name": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 1 | ||||||
|  | 		}, | ||||||
|  | 		"type": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"pattern": "^proxy|redirect|dead|stream|upstream$" | ||||||
|  | 		}, | ||||||
|  | 		"template": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 20 | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										40
									
								
								backend/embed/api_docs/components/SettingList.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								backend/embed/api_docs/components/SettingList.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "SettingList", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["total", "offset", "limit", "sort"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"total": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Total number of rows" | ||||||
|  | 		}, | ||||||
|  | 		"offset": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Offset" | ||||||
|  | 		}, | ||||||
|  | 		"limit": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Limit" | ||||||
|  | 		}, | ||||||
|  | 		"sort": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Sorting", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/SortObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"filter": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Filters", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/FilterObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"items": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/SettingObject" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										51
									
								
								backend/embed/api_docs/components/SettingObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								backend/embed/api_docs/components/SettingObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "SettingObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["id", "created_at", "updated_at", "name", "value"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"created_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Created Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"updated_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Updated Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"name": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 2, | ||||||
|  | 			"maxLength": 100 | ||||||
|  | 		}, | ||||||
|  | 		"description": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 0, | ||||||
|  | 			"maxLength": 100 | ||||||
|  | 		}, | ||||||
|  | 		"value": { | ||||||
|  | 			"oneOf": [ | ||||||
|  | 				{ | ||||||
|  | 					"type": "array" | ||||||
|  | 				}, | ||||||
|  | 				{ | ||||||
|  | 					"type": "boolean" | ||||||
|  | 				}, | ||||||
|  | 				{ | ||||||
|  | 					"type": "object" | ||||||
|  | 				}, | ||||||
|  | 				{ | ||||||
|  | 					"type": "integer" | ||||||
|  | 				}, | ||||||
|  | 				{ | ||||||
|  | 					"type": "string" | ||||||
|  | 				} | ||||||
|  | 			] | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										17
									
								
								backend/embed/api_docs/components/SortObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								backend/embed/api_docs/components/SortObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "SortObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["field", "direction"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"field": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"description": "Field for sorting on" | ||||||
|  | 		}, | ||||||
|  | 		"direction": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"description": "Sort order", | ||||||
|  | 			"pattern": "^(ASC|DESC)$" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										40
									
								
								backend/embed/api_docs/components/StreamList.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								backend/embed/api_docs/components/StreamList.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "StreamList", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["total", "offset", "limit", "sort"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"total": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Total number of rows" | ||||||
|  | 		}, | ||||||
|  | 		"offset": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Offset" | ||||||
|  | 		}, | ||||||
|  | 		"limit": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Limit" | ||||||
|  | 		}, | ||||||
|  | 		"sort": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Sorting", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/SortObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"filter": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Filters", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/FilterObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"items": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/StreamObject" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										57
									
								
								backend/embed/api_docs/components/StreamObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								backend/embed/api_docs/components/StreamObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,57 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "StreamObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": [ | ||||||
|  | 		"id", | ||||||
|  | 		"created_at", | ||||||
|  | 		"updated_at", | ||||||
|  | 		"expires_on", | ||||||
|  | 		"user_id", | ||||||
|  | 		"provider", | ||||||
|  | 		"name", | ||||||
|  | 		"domain_names" | ||||||
|  | 	], | ||||||
|  | 	"properties": { | ||||||
|  | 		"id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"created_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Created Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"updated_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Updated Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"expires_on": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"user_id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"provider": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 1, | ||||||
|  | 			"maxLength": 100 | ||||||
|  | 		}, | ||||||
|  | 		"name": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 1, | ||||||
|  | 			"maxLength": 100 | ||||||
|  | 		}, | ||||||
|  | 		"domain_names": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"minItems": 1, | ||||||
|  | 			"items": { | ||||||
|  | 				"type": "string", | ||||||
|  | 				"minLength": 4 | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										17
									
								
								backend/embed/api_docs/components/TokenObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								backend/embed/api_docs/components/TokenObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "TokenObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["expires", "token"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"expires": { | ||||||
|  | 			"type": "number", | ||||||
|  | 			"description": "Token Expiry Unix Time", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"token": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"description": "JWT Token" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										40
									
								
								backend/embed/api_docs/components/UpstreamList.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								backend/embed/api_docs/components/UpstreamList.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "UpstreamList", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["total", "offset", "limit", "sort"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"total": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Total number of rows" | ||||||
|  | 		}, | ||||||
|  | 		"offset": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Offset" | ||||||
|  | 		}, | ||||||
|  | 		"limit": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Limit" | ||||||
|  | 		}, | ||||||
|  | 		"sort": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Sorting", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/SortObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"filter": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Filters", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/FilterObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"items": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/UpstreamObject" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										140
									
								
								backend/embed/api_docs/components/UpstreamObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										140
									
								
								backend/embed/api_docs/components/UpstreamObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,140 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "UpstreamObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": [ | ||||||
|  | 		"id", | ||||||
|  | 		"created_at", | ||||||
|  | 		"updated_at", | ||||||
|  | 		"user_id", | ||||||
|  | 		"name", | ||||||
|  | 		"nginx_template_id", | ||||||
|  | 		"ip_hash", | ||||||
|  | 		"ntlm", | ||||||
|  | 		"keepalive", | ||||||
|  | 		"keepalive_requests", | ||||||
|  | 		"keepalive_time", | ||||||
|  | 		"keepalive_timeout", | ||||||
|  | 		"advanced_config", | ||||||
|  | 		"status", | ||||||
|  | 		"error_message", | ||||||
|  | 		"servers" | ||||||
|  | 	], | ||||||
|  | 	"properties": { | ||||||
|  | 		"id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"created_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Created Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"updated_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Updated Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"user_id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"name": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 1, | ||||||
|  | 			"maxLength": 100 | ||||||
|  | 		}, | ||||||
|  | 		"nginx_template_id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"ip_hash": { | ||||||
|  | 			"type": "boolean" | ||||||
|  | 		}, | ||||||
|  | 		"ntlm": { | ||||||
|  | 			"type": "boolean" | ||||||
|  | 		}, | ||||||
|  | 		"keepalive": { | ||||||
|  | 			"type": "integer" | ||||||
|  | 		}, | ||||||
|  | 		"keepalive_requests": { | ||||||
|  | 			"type": "integer" | ||||||
|  | 		}, | ||||||
|  | 		"keepalive_time": { | ||||||
|  | 			"type": "string" | ||||||
|  | 		}, | ||||||
|  | 		"keepalive_timeout": { | ||||||
|  | 			"type": "string" | ||||||
|  | 		}, | ||||||
|  | 		"advanced_config": { | ||||||
|  | 			"type": "string" | ||||||
|  | 		}, | ||||||
|  | 		"status": { | ||||||
|  | 			"type": "string" | ||||||
|  | 		}, | ||||||
|  | 		"error_message": { | ||||||
|  | 			"type": "string" | ||||||
|  | 		}, | ||||||
|  | 		"user": { | ||||||
|  | 			"$ref": "#/components/schemas/UserObject" | ||||||
|  | 		}, | ||||||
|  | 		"servers": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"items": { | ||||||
|  | 				"type": "object", | ||||||
|  | 				"additionalProperties": false, | ||||||
|  | 				"required": [ | ||||||
|  | 					"id", | ||||||
|  | 					"created_at", | ||||||
|  | 					"updated_at", | ||||||
|  | 					"upstream_id", | ||||||
|  | 					"server", | ||||||
|  | 					"weight", | ||||||
|  | 					"max_conns", | ||||||
|  | 					"max_fails", | ||||||
|  | 					"fail_timeout", | ||||||
|  | 					"backup" | ||||||
|  | 				], | ||||||
|  | 				"properties": { | ||||||
|  | 					"id": { | ||||||
|  | 						"type": "integer", | ||||||
|  | 						"minimum": 1 | ||||||
|  | 					}, | ||||||
|  | 					"created_at": { | ||||||
|  | 						"type": "integer", | ||||||
|  | 						"minimum": 1, | ||||||
|  | 						"description": "Created Unix time with milliseconds" | ||||||
|  | 					}, | ||||||
|  | 					"updated_at": { | ||||||
|  | 						"type": "integer", | ||||||
|  | 						"minimum": 1, | ||||||
|  | 						"description": "Updated Unix time with milliseconds" | ||||||
|  | 					}, | ||||||
|  | 					"upstream_id": { | ||||||
|  | 						"type": "integer", | ||||||
|  | 						"minimum": 1 | ||||||
|  | 					}, | ||||||
|  | 					"server": { | ||||||
|  | 						"type": "string", | ||||||
|  | 						"minLength": 2 | ||||||
|  | 					}, | ||||||
|  | 					"weight": { | ||||||
|  | 						"type": "integer" | ||||||
|  | 					}, | ||||||
|  | 					"max_conns": { | ||||||
|  | 						"type": "integer" | ||||||
|  | 					}, | ||||||
|  | 					"max_fails": { | ||||||
|  | 						"type": "integer" | ||||||
|  | 					}, | ||||||
|  | 					"fail_timeout": { | ||||||
|  | 						"type": "integer" | ||||||
|  | 					}, | ||||||
|  | 					"backup": { | ||||||
|  | 						"type": "boolean" | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										30
									
								
								backend/embed/api_docs/components/UserAuthObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								backend/embed/api_docs/components/UserAuthObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "UserAuthObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["id", "user_id", "type", "created_at", "updated_at"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"created_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Created Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"updated_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Updated Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"user_id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"type": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"pattern": "^(local|ldap|oauth)$" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										40
									
								
								backend/embed/api_docs/components/UserList.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								backend/embed/api_docs/components/UserList.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "UserList", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": ["total", "offset", "limit", "sort"], | ||||||
|  | 	"properties": { | ||||||
|  | 		"total": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Total number of rows" | ||||||
|  | 		}, | ||||||
|  | 		"offset": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Offset" | ||||||
|  | 		}, | ||||||
|  | 		"limit": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"description": "Pagination Limit" | ||||||
|  | 		}, | ||||||
|  | 		"sort": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Sorting", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/SortObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"filter": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"description": "Filters", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/FilterObject" | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"items": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"items": { | ||||||
|  | 				"$ref": "#/components/schemas/UserObject" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										69
									
								
								backend/embed/api_docs/components/UserObject.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								backend/embed/api_docs/components/UserObject.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,69 @@ | |||||||
|  | { | ||||||
|  | 	"type": "object", | ||||||
|  | 	"description": "UserObject", | ||||||
|  | 	"additionalProperties": false, | ||||||
|  | 	"required": [ | ||||||
|  | 		"id", | ||||||
|  | 		"created_at", | ||||||
|  | 		"updated_at", | ||||||
|  | 		"name", | ||||||
|  | 		"email", | ||||||
|  | 		"is_disabled" | ||||||
|  | 	], | ||||||
|  | 	"properties": { | ||||||
|  | 		"id": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1 | ||||||
|  | 		}, | ||||||
|  | 		"created_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Created Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"updated_at": { | ||||||
|  | 			"type": "integer", | ||||||
|  | 			"minimum": 1, | ||||||
|  | 			"description": "Updated Unix time with milliseconds" | ||||||
|  | 		}, | ||||||
|  | 		"name": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 2, | ||||||
|  | 			"maxLength": 50 | ||||||
|  | 		}, | ||||||
|  | 		"email": { | ||||||
|  | 			"type": "string", | ||||||
|  | 			"minLength": 5, | ||||||
|  | 			"maxLength": 150 | ||||||
|  | 		}, | ||||||
|  | 		"gravatar_url": { | ||||||
|  | 			"type": "string" | ||||||
|  | 		}, | ||||||
|  | 		"is_disabled": { | ||||||
|  | 			"type": "boolean" | ||||||
|  | 		}, | ||||||
|  | 		"is_system": { | ||||||
|  | 			"type": "boolean" | ||||||
|  | 		}, | ||||||
|  | 		"auth": { | ||||||
|  | 			"type": "object", | ||||||
|  | 			"required": ["type"], | ||||||
|  | 			"properties": { | ||||||
|  | 				"id": { | ||||||
|  | 					"type": "integer" | ||||||
|  | 				}, | ||||||
|  | 				"type": { | ||||||
|  | 					"type": "string", | ||||||
|  | 					"pattern": "^(local|ldap|oauth)$" | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"capabilities": { | ||||||
|  | 			"type": "array", | ||||||
|  | 			"minItems": 1, | ||||||
|  | 			"items": { | ||||||
|  | 				"type": "string", | ||||||
|  | 				"minLength": 1 | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										28
									
								
								backend/embed/api_docs/paths/auth/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								backend/embed/api_docs/paths/auth/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getAuthConfig", | ||||||
|  | 	"summary": "Returns auth configuration", | ||||||
|  | 	"tags": ["Auth"], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/AuthConfigObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": "todo" | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										75
									
								
								backend/embed/api_docs/paths/auth/post.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										75
									
								
								backend/embed/api_docs/paths/auth/post.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,75 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "requestToken", | ||||||
|  | 	"summary": "Request a new access token from credentials", | ||||||
|  | 	"tags": ["Auth"], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Credentials Payload", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.GetToken}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/TokenObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"expires": 1566540510, | ||||||
|  | 									"token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4", | ||||||
|  | 									"scope": "user" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"403": { | ||||||
|  | 			"description": "403 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"additionalProperties": false, | ||||||
|  | 						"required": ["error"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"type": "object", | ||||||
|  | 								"nullable": true | ||||||
|  | 							}, | ||||||
|  | 							"error": { | ||||||
|  | 								"$ref": "#/components/schemas/ErrorObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": null, | ||||||
|  | 								"error": { | ||||||
|  | 									"code": 403, | ||||||
|  | 									"message": "Not available during setup phase" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										34
									
								
								backend/embed/api_docs/paths/auth/refresh/post.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								backend/embed/api_docs/paths/auth/refresh/post.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "refreshToken", | ||||||
|  | 	"summary": "Refresh your access token", | ||||||
|  | 	"tags": ["Auth"], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/TokenObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"expires": 1566540510, | ||||||
|  | 									"token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4", | ||||||
|  | 									"scope": "user" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										34
									
								
								backend/embed/api_docs/paths/auth/sse/post.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								backend/embed/api_docs/paths/auth/sse/post.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "requestSSEToken", | ||||||
|  | 	"summary": "Request a new SSE token", | ||||||
|  | 	"tags": ["Auth"], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/TokenObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"expires": 1566540510, | ||||||
|  | 									"token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4", | ||||||
|  | 									"scope": "user" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,39 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "deleteCertificateAuthority", | ||||||
|  | 	"summary": "Delete a Certificate Authority", | ||||||
|  | 	"tags": [ | ||||||
|  | 		"Certificate Authorities" | ||||||
|  | 	], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "caID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "Numeric ID of the Certificate Authority", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": true | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,53 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getCertificateAuthority", | ||||||
|  | 	"summary": "Get a Certificate Authority object by ID", | ||||||
|  | 	"tags": ["Certificate Authorities"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "caID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Certificate Authority", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/CertificateAuthorityObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1627531400000, | ||||||
|  | 									"updated_at": 1627531400000, | ||||||
|  | 									"name": "ZeroSSL", | ||||||
|  | 									"acmesh_server": "zerossl", | ||||||
|  | 									"ca_bundle": "", | ||||||
|  | 									"max_domains": 10, | ||||||
|  | 									"is_wildcard_supported": true, | ||||||
|  | 									"is_readonly": false | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,62 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "updateCertificateAuthority", | ||||||
|  | 	"summary": "Update an existing Certificate Authority", | ||||||
|  | 	"tags": ["Certificate Authorities"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "caID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Certificate Authority", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Certificate Authority details to update", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.UpdateCertificateAuthority}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/CertificateAuthorityObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1627531400000, | ||||||
|  | 									"updated_at": 1627531400000, | ||||||
|  | 									"name": "ZeroSSL", | ||||||
|  | 									"acmesh_server": "zerossl", | ||||||
|  | 									"ca_bundle": "", | ||||||
|  | 									"max_domains": 10, | ||||||
|  | 									"is_wildcard_supported": true, | ||||||
|  | 									"is_readonly": false | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,93 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getCertificateAuthorities", | ||||||
|  | 	"summary": "Get a list of Certificate Authorities", | ||||||
|  | 	"tags": ["Certificate Authorities"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "offset", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row offset, default 0", | ||||||
|  | 			"example": 0 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "limit", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row limit, default 10", | ||||||
|  | 			"example": 10 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "sort", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "string" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The sorting of the list", | ||||||
|  | 			"example": "id,name.asc,value.desc" | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/CertificateAuthorityList" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"total": 2, | ||||||
|  | 									"offset": 0, | ||||||
|  | 									"limit": 10, | ||||||
|  | 									"sort": [ | ||||||
|  | 										{ | ||||||
|  | 											"field": "name", | ||||||
|  | 											"direction": "ASC" | ||||||
|  | 										} | ||||||
|  | 									], | ||||||
|  | 									"items": [ | ||||||
|  | 										{ | ||||||
|  | 											"id": 1, | ||||||
|  | 											"created_at": 1627531400000, | ||||||
|  | 											"updated_at": 1627531400000, | ||||||
|  | 											"name": "ZeroSSL", | ||||||
|  | 											"acmesh_server": "zerossl", | ||||||
|  | 											"ca_bundle": "", | ||||||
|  | 											"max_domains": 10, | ||||||
|  | 											"is_wildcard_supported": true, | ||||||
|  | 											"is_setup": true | ||||||
|  | 										}, | ||||||
|  | 										{ | ||||||
|  | 											"id": 2, | ||||||
|  | 											"created_at": 1627531400000, | ||||||
|  | 											"updated_at": 1627531400000, | ||||||
|  | 											"name": "Let's Encrypt", | ||||||
|  | 											"acmesh_server": "https://acme-v02.api.letsencrypt.org/directory", | ||||||
|  | 											"ca_bundle": "", | ||||||
|  | 											"max_domains": 10, | ||||||
|  | 											"is_wildcard_supported": true, | ||||||
|  | 											"is_setup": true | ||||||
|  | 										} | ||||||
|  | 									] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,49 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "createCertificateAuthority", | ||||||
|  | 	"summary": "Create a new Certificate Authority", | ||||||
|  | 	"tags": ["Certificate Authorities"], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Certificate Authority to Create", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.CreateCertificateAuthority}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"201": { | ||||||
|  | 			"description": "201 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/CertificateAuthorityObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1627531400000, | ||||||
|  | 									"updated_at": 1627531400000, | ||||||
|  | 									"name": "ZeroSSL", | ||||||
|  | 									"acmesh_server": "zerossl", | ||||||
|  | 									"ca_bundle": "", | ||||||
|  | 									"max_domains": 10, | ||||||
|  | 									"is_wildcard_supported": true, | ||||||
|  | 									"is_readonly": false | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,60 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "deleteCertificate", | ||||||
|  | 	"summary": "Delete a Certificate", | ||||||
|  | 	"tags": [ | ||||||
|  | 		"Certificates" | ||||||
|  | 	], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "certificateID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "Numeric ID of the certificate", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": true | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"400": { | ||||||
|  | 			"description": "400 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": null, | ||||||
|  | 								"error": { | ||||||
|  | 									"code": 400, | ||||||
|  | 									"message": "You cannot delete a certificate that is in use!" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,56 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getCertificate", | ||||||
|  | 	"summary": "Get a certificate object by ID", | ||||||
|  | 	"tags": ["Certificates"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "certificateID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the certificate", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/CertificateObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1604536109000, | ||||||
|  | 									"updated_at": 1604536109000, | ||||||
|  | 									"expires_on": null, | ||||||
|  | 									"type": "dns", | ||||||
|  | 									"user_id": 1, | ||||||
|  | 									"certificate_authority_id": 2, | ||||||
|  | 									"dns_provider_id": 1, | ||||||
|  | 									"name": "test1.jc21.com.au", | ||||||
|  | 									"domain_names": ["test1.jc21.com.au"], | ||||||
|  | 									"is_ecc": 0, | ||||||
|  | 									"status": "ready" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,65 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "updateCertificate", | ||||||
|  | 	"summary": "Update an existing Certificate", | ||||||
|  | 	"tags": ["Certificates"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "certificateID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the certificate", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Certificate details to update", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.UpdateCertificate}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/CertificateObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1604536109000, | ||||||
|  | 									"updated_at": 1604536109000, | ||||||
|  | 									"expires_on": null, | ||||||
|  | 									"type": "dns", | ||||||
|  | 									"user_id": 1, | ||||||
|  | 									"certificate_authority_id": 2, | ||||||
|  | 									"dns_provider_id": 1, | ||||||
|  | 									"name": "test1.jc21.com.au", | ||||||
|  | 									"domain_names": ["test1.jc21.com.au"], | ||||||
|  | 									"is_ecc": 0, | ||||||
|  | 									"status": "ready" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										87
									
								
								backend/embed/api_docs/paths/certificates/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								backend/embed/api_docs/paths/certificates/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,87 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getCertificates", | ||||||
|  | 	"summary": "Get a list of certificates", | ||||||
|  | 	"tags": ["Certificates"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "offset", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row offset, default 0", | ||||||
|  | 			"example": 0 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "limit", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row limit, default 10", | ||||||
|  | 			"example": 10 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "sort", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "string" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The sorting of the list", | ||||||
|  | 			"example": "id,name.asc,value.desc" | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/CertificateList" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"total": 1, | ||||||
|  | 									"offset": 0, | ||||||
|  | 									"limit": 10, | ||||||
|  | 									"sort": [ | ||||||
|  | 										{ | ||||||
|  | 											"field": "name", | ||||||
|  | 											"direction": "ASC" | ||||||
|  | 										} | ||||||
|  | 									], | ||||||
|  | 									"items": [ | ||||||
|  | 										{ | ||||||
|  | 											"id": 1, | ||||||
|  | 											"created_at": 1604536109000, | ||||||
|  | 											"updated_at": 1604536109000, | ||||||
|  | 											"expires_on": null, | ||||||
|  | 											"type": "dns", | ||||||
|  | 											"user_id": 1, | ||||||
|  | 											"certificate_authority_id": 2, | ||||||
|  | 											"dns_provider_id": 1, | ||||||
|  | 											"name": "test1.jc21.com.au", | ||||||
|  | 											"domain_names": [ | ||||||
|  | 												"test1.jc21.com.au" | ||||||
|  | 											], | ||||||
|  | 											"is_ecc": 0, | ||||||
|  | 											"status": "ready" | ||||||
|  | 										} | ||||||
|  | 									] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										52
									
								
								backend/embed/api_docs/paths/certificates/post.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								backend/embed/api_docs/paths/certificates/post.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,52 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "createCertificate", | ||||||
|  | 	"summary": "Create a new Certificate", | ||||||
|  | 	"tags": ["Certificates"], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Certificate to create", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.CreateCertificate}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"201": { | ||||||
|  | 			"description": "201 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/CertificateObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1604536109000, | ||||||
|  | 									"updated_at": 1604536109000, | ||||||
|  | 									"expires_on": null, | ||||||
|  | 									"type": "dns", | ||||||
|  | 									"user_id": 1, | ||||||
|  | 									"certificate_authority_id": 2, | ||||||
|  | 									"dns_provider_id": 1, | ||||||
|  | 									"name": "test1.jc21.com.au", | ||||||
|  | 									"domain_names": ["test1.jc21.com.au"], | ||||||
|  | 									"is_ecc": 0, | ||||||
|  | 									"status": "ready" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										35
									
								
								backend/embed/api_docs/paths/config/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								backend/embed/api_docs/paths/config/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "config", | ||||||
|  | 	"summary": "Returns the API Service configuration", | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/ConfigObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"data": "/data", | ||||||
|  | 									"log": { | ||||||
|  | 										"level": "debug", | ||||||
|  | 										"format": "nice" | ||||||
|  | 									} | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										83
									
								
								backend/embed/api_docs/paths/dns-providers/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								backend/embed/api_docs/paths/dns-providers/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,83 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getDNSProviders", | ||||||
|  | 	"summary": "Get a list of DNS Providers", | ||||||
|  | 	"tags": ["DNS Providers"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "offset", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row offset, default 0", | ||||||
|  | 			"example": 0 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "limit", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row limit, default 10", | ||||||
|  | 			"example": 10 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "sort", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "string" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The sorting of the list", | ||||||
|  | 			"example": "id,name.asc,value.desc" | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/DNSProviderList" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"total": 1, | ||||||
|  | 									"offset": 0, | ||||||
|  | 									"limit": 10, | ||||||
|  | 									"sort": [ | ||||||
|  | 										{ | ||||||
|  | 											"field": "name", | ||||||
|  | 											"direction": "ASC" | ||||||
|  | 										} | ||||||
|  | 									], | ||||||
|  | 									"items": [ | ||||||
|  | 										{ | ||||||
|  | 											"id": 1, | ||||||
|  | 											"created_at": 1602593653000, | ||||||
|  | 											"updated_at": 1602593653000, | ||||||
|  | 											"user_id": 1, | ||||||
|  | 											"name": "Route53", | ||||||
|  | 											"acmesh_name": "dns_aws", | ||||||
|  | 											"meta": { | ||||||
|  | 												"AWS_ACCESS_KEY_ID": "abc123", | ||||||
|  | 												"AWS_SECRET_ACCESS_KEY": "def098" | ||||||
|  | 											} | ||||||
|  | 										} | ||||||
|  | 									] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										50
									
								
								backend/embed/api_docs/paths/dns-providers/post.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								backend/embed/api_docs/paths/dns-providers/post.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "createDNSProvider", | ||||||
|  | 	"summary": "Create a new DNS Provider", | ||||||
|  | 	"tags": ["DNS Providers"], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "DNS Provider to Create", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.CreateDNSProvider}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"201": { | ||||||
|  | 			"description": "201 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/DNSProviderObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1602593653000, | ||||||
|  | 									"updated_at": 1602593653000, | ||||||
|  | 									"user_id": 1, | ||||||
|  | 									"name": "Route53", | ||||||
|  | 									"acmesh_name": "dns_aws", | ||||||
|  | 									"meta": { | ||||||
|  | 										"AWS_ACCESS_KEY_ID": "abc123", | ||||||
|  | 										"AWS_SECRET_ACCESS_KEY": "def098" | ||||||
|  | 									} | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,60 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "deleteDNSProvider", | ||||||
|  | 	"summary": "Delete a DNS Provider", | ||||||
|  | 	"tags": [ | ||||||
|  | 		"DNS Providers" | ||||||
|  | 	], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "providerID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "Numeric ID of the DNS Provider", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": true | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"400": { | ||||||
|  | 			"description": "400 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": null, | ||||||
|  | 								"error": { | ||||||
|  | 									"code": 400, | ||||||
|  | 									"message": "You cannot delete a DNS Provider that is in use!" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,54 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getDNSProvider", | ||||||
|  | 	"summary": "Get a DNS Provider object by ID", | ||||||
|  | 	"tags": ["DNS Providers"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "providerID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the DNS Provider", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/DNSProviderObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1602593653000, | ||||||
|  | 									"updated_at": 1602593653000, | ||||||
|  | 									"user_id": 1, | ||||||
|  | 									"name": "Route53", | ||||||
|  | 									"acmesh_name": "dns_aws", | ||||||
|  | 									"meta": { | ||||||
|  | 										"AWS_ACCESS_KEY_ID": "abc123", | ||||||
|  | 										"AWS_SECRET_ACCESS_KEY": "def098" | ||||||
|  | 									} | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,65 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "updateDNSProvider", | ||||||
|  | 	"summary": "Update an existing DNS Provider", | ||||||
|  | 	"tags": ["DNS Providers"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "providerID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the DNS Provider", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "DNS Provider details to update", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.UpdateDNSProvider}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/DNSProviderObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"result": { | ||||||
|  | 										"id": 1, | ||||||
|  | 										"created_at": 1602593653000, | ||||||
|  | 										"updated_at": 1602593653000, | ||||||
|  | 										"user_id": 1, | ||||||
|  | 										"name": "Route53", | ||||||
|  | 										"acmesh_name": "dns_aws", | ||||||
|  | 										"meta": { | ||||||
|  | 											"AWS_ACCESS_KEY_ID": "abc123", | ||||||
|  | 											"AWS_SECRET_ACCESS_KEY": "def098" | ||||||
|  | 										} | ||||||
|  | 									} | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										44
									
								
								backend/embed/api_docs/paths/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								backend/embed/api_docs/paths/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,44 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "health", | ||||||
|  | 	"summary": "Returns the API health status", | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/HealthObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"version": "3.0.0", | ||||||
|  | 									"commit": "9f119b6", | ||||||
|  | 									"healthy": true, | ||||||
|  | 									"setup": true | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						}, | ||||||
|  | 						"unhealthy": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"version": "3.0.0", | ||||||
|  | 									"commit": "9f119b6", | ||||||
|  | 									"healthy": false, | ||||||
|  | 									"setup": true | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										94
									
								
								backend/embed/api_docs/paths/hosts/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								backend/embed/api_docs/paths/hosts/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,94 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getHosts", | ||||||
|  | 	"summary": "Get a list of Hosts", | ||||||
|  | 	"tags": ["Hosts"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "offset", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row offset, default 0", | ||||||
|  | 			"example": 0 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "limit", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row limit, default 10", | ||||||
|  | 			"example": 10 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "sort", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "string" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The sorting of the list", | ||||||
|  | 			"example": "id,name.asc,value.desc" | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/HostList" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"total": 1, | ||||||
|  | 									"offset": 0, | ||||||
|  | 									"limit": 10, | ||||||
|  | 									"sort": [ | ||||||
|  | 										{ | ||||||
|  | 											"field": "domain_names", | ||||||
|  | 											"direction": "ASC" | ||||||
|  | 										} | ||||||
|  | 									], | ||||||
|  | 									"items": [ | ||||||
|  | 										{ | ||||||
|  | 											"id": 1, | ||||||
|  | 											"created_at": 1646279455000, | ||||||
|  | 											"updated_at": 1646279455000, | ||||||
|  | 											"user_id": 2, | ||||||
|  | 											"type": "proxy", | ||||||
|  | 											"nginx_template_id": 1, | ||||||
|  | 											"listen_interface": "", | ||||||
|  | 											"domain_names": ["jc21.com"], | ||||||
|  | 											"upstream_id": 0, | ||||||
|  | 											"certificate_id": 0, | ||||||
|  | 											"access_list_id": 0, | ||||||
|  | 											"ssl_forced": false, | ||||||
|  | 											"caching_enabled": false, | ||||||
|  | 											"block_exploits": false, | ||||||
|  | 											"allow_websocket_upgrade": false, | ||||||
|  | 											"http2_support": false, | ||||||
|  | 											"hsts_enabled": false, | ||||||
|  | 											"hsts_subdomains": false, | ||||||
|  | 											"paths": "", | ||||||
|  | 											"advanced_config": "", | ||||||
|  | 											"is_disabled": false | ||||||
|  | 										} | ||||||
|  | 									] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -1,23 +1,20 @@ | |||||||
| { | { | ||||||
| 	"operationId": "enableDeadHost", | 	"operationId": "deleteHost", | ||||||
| 	"summary": "Enable a 404 Host", | 	"summary": "Delete a Host", | ||||||
| 	"tags": ["404-hosts"], | 	"tags": [ | ||||||
| 	"security": [ | 		"Hosts" | ||||||
| 		{ |  | ||||||
| 			"bearerAuth": ["dead_hosts.manage"] |  | ||||||
| 		} |  | ||||||
| 	], | 	], | ||||||
| 	"parameters": [ | 	"parameters": [ | ||||||
| 		{ | 		{ | ||||||
| 			"in": "path", | 			"in": "path", | ||||||
| 			"name": "hostID", | 			"name": "hostID", | ||||||
| 			"description": "The ID of the 404 Host", |  | ||||||
| 			"schema": { | 			"schema": { | ||||||
| 				"type": "integer", | 				"type": "integer", | ||||||
| 				"minimum": 1 | 				"minimum": 1 | ||||||
| 			}, | 			}, | ||||||
| 			"required": true, | 			"required": true, | ||||||
| 			"example": 2 | 			"description": "Numeric ID of the Host", | ||||||
|  | 			"example": 1 | ||||||
| 		} | 		} | ||||||
| 	], | 	], | ||||||
| 	"responses": { | 	"responses": { | ||||||
| @@ -25,13 +22,15 @@ | |||||||
| 			"description": "200 response", | 			"description": "200 response", | ||||||
| 			"content": { | 			"content": { | ||||||
| 				"application/json": { | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
| 					"examples": { | 					"examples": { | ||||||
| 						"default": { | 						"default": { | ||||||
| 							"value": true | 							"value": { | ||||||
|  | 								"result": true | ||||||
|  | 							} | ||||||
| 						} | 						} | ||||||
| 					}, |  | ||||||
| 					"schema": { |  | ||||||
| 						"type": "boolean" |  | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| @@ -40,21 +39,22 @@ | |||||||
| 			"description": "400 response", | 			"description": "400 response", | ||||||
| 			"content": { | 			"content": { | ||||||
| 				"application/json": { | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
| 					"examples": { | 					"examples": { | ||||||
| 						"default": { | 						"default": { | ||||||
| 							"value": { | 							"value": { | ||||||
|  | 								"result": null, | ||||||
| 								"error": { | 								"error": { | ||||||
| 									"code": 400, | 									"code": 400, | ||||||
| 									"message": "Host is already enabled" | 									"message": "You cannot delete a host that is in use!" | ||||||
| 								} | 								} | ||||||
| 							} | 							} | ||||||
| 						} | 						} | ||||||
| 					}, |  | ||||||
| 					"schema": { |  | ||||||
| 						"$ref": "../../../../../components/error.json" |  | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
							
								
								
									
										65
									
								
								backend/embed/api_docs/paths/hosts/hostID/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								backend/embed/api_docs/paths/hosts/hostID/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,65 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getHost", | ||||||
|  | 	"summary": "Get a Host object by ID", | ||||||
|  | 	"tags": ["Hosts"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "hostID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Host", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/HostObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1646279455000, | ||||||
|  | 									"updated_at": 1646279455000, | ||||||
|  | 									"user_id": 2, | ||||||
|  | 									"type": "proxy", | ||||||
|  | 									"nginx_template_id": 1, | ||||||
|  | 									"listen_interface": "", | ||||||
|  | 									"domain_names": ["jc21.com"], | ||||||
|  | 									"upstream_id": 0, | ||||||
|  | 									"certificate_id": 0, | ||||||
|  | 									"access_list_id": 0, | ||||||
|  | 									"ssl_forced": false, | ||||||
|  | 									"caching_enabled": false, | ||||||
|  | 									"block_exploits": false, | ||||||
|  | 									"allow_websocket_upgrade": false, | ||||||
|  | 									"http2_support": false, | ||||||
|  | 									"hsts_enabled": false, | ||||||
|  | 									"hsts_subdomains": false, | ||||||
|  | 									"paths": "", | ||||||
|  | 									"advanced_config": "", | ||||||
|  | 									"is_disabled": false | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,43 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getHostNginxConfig", | ||||||
|  | 	"summary": "Get a Host Nginx Config object by ID", | ||||||
|  | 	"tags": ["Hosts"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "hostID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Host", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"type": "string" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": "# ------------------------------------------------------------\n# a.example.com\n# ------------------------------------------------------------\nserver {\n  listen 80;\n  server_name a.example.com ;\n  access_log /data/logs/host-1_access.log proxy;\n  error_log /data/logs/host-1_error.log warn;\n  # locations ?\n  # default location:\n  location / {\n    # Access Rules ? todo\n    # Access checks must...? todo\n    # Proxy!\n    add_header       X-Served-By $host;\n    proxy_set_header Host $host;\n    proxy_set_header X-Forwarded-Scheme $scheme;\n    proxy_set_header X-Forwarded-Proto  $scheme;\n    proxy_set_header X-Forwarded-For    $remote_addr;\n    proxy_http_version 1.1;\n    # proxy a single host\n    proxy_pass http://192.168.0.10:80;\n  }\n  # Legacy Custom Configuration\n  include /data/nginx/custom/server_proxy[.]conf;\n}\n" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										74
									
								
								backend/embed/api_docs/paths/hosts/hostID/put.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								backend/embed/api_docs/paths/hosts/hostID/put.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,74 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "updateHost", | ||||||
|  | 	"summary": "Update an existing Host", | ||||||
|  | 	"tags": ["Hosts"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "hostID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Host", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Host details to update", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.UpdateHost}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/HostObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1646279455000, | ||||||
|  | 									"updated_at": 1646279455000, | ||||||
|  | 									"user_id": 2, | ||||||
|  | 									"type": "proxy", | ||||||
|  | 									"nginx_template_id": 1, | ||||||
|  | 									"listen_interface": "", | ||||||
|  | 									"domain_names": ["jc21.com"], | ||||||
|  | 									"upstream_id": 0, | ||||||
|  | 									"certificate_id": 0, | ||||||
|  | 									"access_list_id": 0, | ||||||
|  | 									"ssl_forced": false, | ||||||
|  | 									"caching_enabled": false, | ||||||
|  | 									"block_exploits": false, | ||||||
|  | 									"allow_websocket_upgrade": false, | ||||||
|  | 									"http2_support": false, | ||||||
|  | 									"hsts_enabled": false, | ||||||
|  | 									"hsts_subdomains": false, | ||||||
|  | 									"paths": "", | ||||||
|  | 									"advanced_config": "", | ||||||
|  | 									"is_disabled": false | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										61
									
								
								backend/embed/api_docs/paths/hosts/post.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								backend/embed/api_docs/paths/hosts/post.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "createHost", | ||||||
|  | 	"summary": "Create a new Host", | ||||||
|  | 	"tags": ["Hosts"], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Host to Create", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.CreateHost}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"201": { | ||||||
|  | 			"description": "201 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/HostObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1645700556000, | ||||||
|  | 									"updated_at": 1645700556000, | ||||||
|  | 									"user_id": 2, | ||||||
|  | 									"type": "proxy", | ||||||
|  | 									"nginx_template_id": 1, | ||||||
|  | 									"listen_interface": "", | ||||||
|  | 									"domain_names": ["jc21.com"], | ||||||
|  | 									"upstream_id": 0, | ||||||
|  | 									"certificate_id": 0, | ||||||
|  | 									"access_list_id": 0, | ||||||
|  | 									"ssl_forced": false, | ||||||
|  | 									"caching_enabled": false, | ||||||
|  | 									"block_exploits": false, | ||||||
|  | 									"allow_websocket_upgrade": false, | ||||||
|  | 									"http2_support": false, | ||||||
|  | 									"hsts_enabled": false, | ||||||
|  | 									"hsts_subdomains": false, | ||||||
|  | 									"paths": "", | ||||||
|  | 									"advanced_config": "", | ||||||
|  | 									"is_disabled": false | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										80
									
								
								backend/embed/api_docs/paths/nginx-templates/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										80
									
								
								backend/embed/api_docs/paths/nginx-templates/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,80 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getNginxTemplates", | ||||||
|  | 	"summary": "Get a list of Nginx Templates", | ||||||
|  | 	"tags": ["Nginx Templates"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "offset", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row offset, default 0", | ||||||
|  | 			"example": 0 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "limit", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row limit, default 10", | ||||||
|  | 			"example": 10 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "sort", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "string" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The sorting of the list", | ||||||
|  | 			"example": "id,name.asc,value.desc" | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/NginxTemplateList" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"total": 1, | ||||||
|  | 									"offset": 0, | ||||||
|  | 									"limit": 10, | ||||||
|  | 									"sort": [ | ||||||
|  | 										{ | ||||||
|  | 											"field": "created_at", | ||||||
|  | 											"direction": "ASC" | ||||||
|  | 										} | ||||||
|  | 									], | ||||||
|  | 									"items": [ | ||||||
|  | 										{ | ||||||
|  | 											"id": 1, | ||||||
|  | 											"created_at": 1646218093000, | ||||||
|  | 											"updated_at": 1646218093000, | ||||||
|  | 											"user_id": 1, | ||||||
|  | 											"name": "Default Proxy Template", | ||||||
|  | 											"type": "proxy", | ||||||
|  | 											"template": "# this is a proxy template" | ||||||
|  | 										} | ||||||
|  | 									] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										47
									
								
								backend/embed/api_docs/paths/nginx-templates/post.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								backend/embed/api_docs/paths/nginx-templates/post.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,47 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "createNginxTemplate", | ||||||
|  | 	"summary": "Create a new Nginx Template", | ||||||
|  | 	"tags": ["Nginx Templates"], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Template to Create", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.CreateNginxTemplate}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"201": { | ||||||
|  | 			"description": "201 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/NginxTemplateObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 10, | ||||||
|  | 									"created_at": 1646218093000, | ||||||
|  | 									"updated_at": 1646218093000, | ||||||
|  | 									"user_id": 1, | ||||||
|  | 									"name": "My proxy template", | ||||||
|  | 									"type": "proxy", | ||||||
|  | 									"template": "# this is a proxy template" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -1,23 +1,18 @@ | |||||||
| { | { | ||||||
| 	"operationId": "disableProxyHost", | 	"operationId": "deleteNginxTemplate", | ||||||
| 	"summary": "Disable a Proxy Host", | 	"summary": "Delete a Nginx Template", | ||||||
| 	"tags": ["proxy-hosts"], | 	"tags": ["Nginx Templates"], | ||||||
| 	"security": [ |  | ||||||
| 		{ |  | ||||||
| 			"bearerAuth": ["proxy_hosts.manage"] |  | ||||||
| 		} |  | ||||||
| 	], |  | ||||||
| 	"parameters": [ | 	"parameters": [ | ||||||
| 		{ | 		{ | ||||||
| 			"in": "path", | 			"in": "path", | ||||||
| 			"name": "hostID", | 			"name": "templateID", | ||||||
| 			"description": "The ID of the Proxy Host", |  | ||||||
| 			"schema": { | 			"schema": { | ||||||
| 				"type": "integer", | 				"type": "integer", | ||||||
| 				"minimum": 1 | 				"minimum": 1 | ||||||
| 			}, | 			}, | ||||||
| 			"required": true, | 			"required": true, | ||||||
| 			"example": 2 | 			"description": "Numeric ID of the Template", | ||||||
|  | 			"example": 1 | ||||||
| 		} | 		} | ||||||
| 	], | 	], | ||||||
| 	"responses": { | 	"responses": { | ||||||
| @@ -25,13 +20,15 @@ | |||||||
| 			"description": "200 response", | 			"description": "200 response", | ||||||
| 			"content": { | 			"content": { | ||||||
| 				"application/json": { | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
| 					"examples": { | 					"examples": { | ||||||
| 						"default": { | 						"default": { | ||||||
| 							"value": true | 							"value": { | ||||||
|  | 								"result": true | ||||||
|  | 							} | ||||||
| 						} | 						} | ||||||
| 					}, |  | ||||||
| 					"schema": { |  | ||||||
| 						"type": "boolean" |  | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| @@ -40,18 +37,19 @@ | |||||||
| 			"description": "400 response", | 			"description": "400 response", | ||||||
| 			"content": { | 			"content": { | ||||||
| 				"application/json": { | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
| 					"examples": { | 					"examples": { | ||||||
| 						"default": { | 						"default": { | ||||||
| 							"value": { | 							"value": { | ||||||
|  | 								"result": null, | ||||||
| 								"error": { | 								"error": { | ||||||
| 									"code": 400, | 									"code": 400, | ||||||
| 									"message": "Host is already disabled" | 									"message": "You cannot delete a template that is in use!" | ||||||
| 								} | 								} | ||||||
| 							} | 							} | ||||||
| 						} | 						} | ||||||
| 					}, |  | ||||||
| 					"schema": { |  | ||||||
| 						"$ref": "../../../../../components/error.json" |  | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| @@ -0,0 +1,51 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getNginxTemplate", | ||||||
|  | 	"summary": "Get a Nginx Template object by ID", | ||||||
|  | 	"tags": ["Nginx Templates"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "templateID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Host Template", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/NginxTemplateObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1646218093000, | ||||||
|  | 									"updated_at": 1646218093000, | ||||||
|  | 									"user_id": 1, | ||||||
|  | 									"name": "Default Proxy Template", | ||||||
|  | 									"type": "proxy", | ||||||
|  | 									"template": "# this is a proxy template" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,60 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "updateNginxTemplate", | ||||||
|  | 	"summary": "Update an existing Nginx Template", | ||||||
|  | 	"tags": ["Nginx Templates"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "templateID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Template", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Template details to update", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.UpdateNginxTemplate}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/NginxTemplateObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1646218093000, | ||||||
|  | 									"updated_at": 1646218093000, | ||||||
|  | 									"user_id": 1, | ||||||
|  | 									"name": "My renamed proxy template", | ||||||
|  | 									"type": "proxy", | ||||||
|  | 									"template": "# this is a proxy template" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -1,10 +1,9 @@ | |||||||
| { | { | ||||||
| 	"operationId": "schema", | 	"operationId": "schema", | ||||||
| 	"summary": "Returns this swagger API schema", | 	"summary": "Returns this swagger API schema", | ||||||
| 	"tags": ["public"], |  | ||||||
| 	"responses": { | 	"responses": { | ||||||
| 		"200": { | 		"200": { | ||||||
| 			"description": "200 response" | 			"description": "200 response" | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
							
								
								
									
										81
									
								
								backend/embed/api_docs/paths/settings/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								backend/embed/api_docs/paths/settings/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,81 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getSettings", | ||||||
|  | 	"summary": "Get a list of settings", | ||||||
|  | 	"tags": ["Settings"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "offset", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row offset, default 0", | ||||||
|  | 			"example": 0 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "limit", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row limit, default 10", | ||||||
|  | 			"example": 10 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "sort", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "string" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The sorting of the list", | ||||||
|  | 			"example": "id,name.asc,value.desc" | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/SettingList" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"total": 1, | ||||||
|  | 									"offset": 0, | ||||||
|  | 									"limit": 10, | ||||||
|  | 									"sort": [ | ||||||
|  | 										{ | ||||||
|  | 											"field": "name", | ||||||
|  | 											"direction": "ASC" | ||||||
|  | 										} | ||||||
|  | 									], | ||||||
|  | 									"items": [ | ||||||
|  | 										{ | ||||||
|  | 											"id": 1, | ||||||
|  | 											"created_at": 1578010090000, | ||||||
|  | 											"updated_at": 1578010095000, | ||||||
|  | 											"name": "default-site", | ||||||
|  | 											"value": { | ||||||
|  | 												"html": "<p>not found</p>", | ||||||
|  | 												"type": "custom" | ||||||
|  | 											} | ||||||
|  | 										} | ||||||
|  | 									] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										52
									
								
								backend/embed/api_docs/paths/settings/name/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								backend/embed/api_docs/paths/settings/name/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,52 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getSetting", | ||||||
|  | 	"summary": "Get a setting object by name", | ||||||
|  | 	"tags": ["Settings"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "name", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "string", | ||||||
|  | 				"minLength": 2 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "Name of the setting", | ||||||
|  | 			"example": "default-site" | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/SettingObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 2, | ||||||
|  | 									"created_at": 1578010090000, | ||||||
|  | 									"updated_at": 1578010095000, | ||||||
|  | 									"name": "default-site", | ||||||
|  | 									"value": { | ||||||
|  | 										"html": "<p>not found</p>", | ||||||
|  | 										"type": "custom" | ||||||
|  | 									} | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										61
									
								
								backend/embed/api_docs/paths/settings/name/put.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								backend/embed/api_docs/paths/settings/name/put.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,61 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "updateSetting", | ||||||
|  | 	"summary": "Update an existing Setting", | ||||||
|  | 	"tags": ["Settings"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "name", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "string", | ||||||
|  | 				"minLength": 2 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "Name of the setting", | ||||||
|  | 			"example": "default-site" | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Setting details to update", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.UpdateSetting}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/SettingObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 2, | ||||||
|  | 									"created_at": 1578010090000, | ||||||
|  | 									"updated_at": 1578010090000, | ||||||
|  | 									"name": "default-site", | ||||||
|  | 									"value": { | ||||||
|  | 										"html": "<p>not found</p>", | ||||||
|  | 										"type": "custom" | ||||||
|  | 									} | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										48
									
								
								backend/embed/api_docs/paths/settings/post.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								backend/embed/api_docs/paths/settings/post.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,48 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "createSetting", | ||||||
|  | 	"summary": "Create a new Setting", | ||||||
|  | 	"tags": ["Settings"], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Setting to Create", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.CreateSetting}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"201": { | ||||||
|  | 			"description": "201 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/SettingObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 2, | ||||||
|  | 									"created_at": 1578010090000, | ||||||
|  | 									"updated_at": 1578010090000, | ||||||
|  | 									"name": "default-site", | ||||||
|  | 									"value": { | ||||||
|  | 										"html": "<p>not found</p>", | ||||||
|  | 										"type": "custom" | ||||||
|  | 									} | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										70
									
								
								backend/embed/api_docs/paths/streams/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								backend/embed/api_docs/paths/streams/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,70 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getStreams", | ||||||
|  | 	"summary": "Get a list of Streams", | ||||||
|  | 	"tags": ["Streams"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "offset", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row offset, default 0", | ||||||
|  | 			"example": 0 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "limit", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row limit, default 10", | ||||||
|  | 			"example": 10 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "sort", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "string" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The sorting of the list", | ||||||
|  | 			"example": "id,name.asc,value.desc" | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/StreamList" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"total": 1, | ||||||
|  | 									"offset": 0, | ||||||
|  | 									"limit": 10, | ||||||
|  | 									"sort": [ | ||||||
|  | 										{ | ||||||
|  | 											"field": "name", | ||||||
|  | 											"direction": "ASC" | ||||||
|  | 										} | ||||||
|  | 									], | ||||||
|  | 									"items": ["TODO"] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										39
									
								
								backend/embed/api_docs/paths/streams/post.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								backend/embed/api_docs/paths/streams/post.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "createStream", | ||||||
|  | 	"summary": "Create a new Stream", | ||||||
|  | 	"tags": ["Streams"], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Stream to Create", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.CreateStream}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"201": { | ||||||
|  | 			"description": "201 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/StreamObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": "TODO" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -1,23 +1,20 @@ | |||||||
| { | { | ||||||
| 	"operationId": "disableStream", | 	"operationId": "deleteStream", | ||||||
| 	"summary": "Disable a Stream", | 	"summary": "Delete a Stream", | ||||||
| 	"tags": ["streams"], | 	"tags": [ | ||||||
| 	"security": [ | 		"Streams" | ||||||
| 		{ |  | ||||||
| 			"bearerAuth": ["streams.manage"] |  | ||||||
| 		} |  | ||||||
| 	], | 	], | ||||||
| 	"parameters": [ | 	"parameters": [ | ||||||
| 		{ | 		{ | ||||||
| 			"in": "path", | 			"in": "path", | ||||||
| 			"name": "streamID", | 			"name": "streamID", | ||||||
| 			"description": "The ID of the Stream", |  | ||||||
| 			"schema": { | 			"schema": { | ||||||
| 				"type": "integer", | 				"type": "integer", | ||||||
| 				"minimum": 1 | 				"minimum": 1 | ||||||
| 			}, | 			}, | ||||||
| 			"required": true, | 			"required": true, | ||||||
| 			"example": 2 | 			"description": "Numeric ID of the Stream", | ||||||
|  | 			"example": 1 | ||||||
| 		} | 		} | ||||||
| 	], | 	], | ||||||
| 	"responses": { | 	"responses": { | ||||||
| @@ -25,13 +22,15 @@ | |||||||
| 			"description": "200 response", | 			"description": "200 response", | ||||||
| 			"content": { | 			"content": { | ||||||
| 				"application/json": { | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
| 					"examples": { | 					"examples": { | ||||||
| 						"default": { | 						"default": { | ||||||
| 							"value": true | 							"value": { | ||||||
|  | 								"result": true | ||||||
|  | 							} | ||||||
| 						} | 						} | ||||||
| 					}, |  | ||||||
| 					"schema": { |  | ||||||
| 						"type": "boolean" |  | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| @@ -40,21 +39,22 @@ | |||||||
| 			"description": "400 response", | 			"description": "400 response", | ||||||
| 			"content": { | 			"content": { | ||||||
| 				"application/json": { | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
| 					"examples": { | 					"examples": { | ||||||
| 						"default": { | 						"default": { | ||||||
| 							"value": { | 							"value": { | ||||||
|  | 								"result": null, | ||||||
| 								"error": { | 								"error": { | ||||||
| 									"code": 400, | 									"code": 400, | ||||||
| 									"message": "Host is already disabled" | 									"message": "You cannot delete a Stream that is in use!" | ||||||
| 								} | 								} | ||||||
| 							} | 							} | ||||||
| 						} | 						} | ||||||
| 					}, |  | ||||||
| 					"schema": { |  | ||||||
| 						"$ref": "../../../../../components/error.json" |  | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
							
								
								
									
										43
									
								
								backend/embed/api_docs/paths/streams/streamID/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								backend/embed/api_docs/paths/streams/streamID/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getStream", | ||||||
|  | 	"summary": "Get a Stream object by ID", | ||||||
|  | 	"tags": ["Streams"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "streamID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Stream", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/StreamObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": "TODO" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										52
									
								
								backend/embed/api_docs/paths/streams/streamID/put.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								backend/embed/api_docs/paths/streams/streamID/put.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,52 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "updateStream", | ||||||
|  | 	"summary": "Update an existing Stream", | ||||||
|  | 	"tags": ["Streams"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "streamID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Stream", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Stream details to update", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.UpdateStream}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/StreamObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": "TODO" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										286
									
								
								backend/embed/api_docs/paths/upstreams/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										286
									
								
								backend/embed/api_docs/paths/upstreams/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,286 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getUpstreams", | ||||||
|  | 	"summary": "Get a list of Upstreams", | ||||||
|  | 	"tags": ["Upstreams"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "offset", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row offset, default 0", | ||||||
|  | 			"example": 0 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "limit", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row limit, default 10", | ||||||
|  | 			"example": 10 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "sort", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "string" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The sorting of the list", | ||||||
|  | 			"example": "id,name.asc,value.desc" | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/UpstreamList" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"total": 5, | ||||||
|  | 									"offset": 0, | ||||||
|  | 									"limit": 10, | ||||||
|  | 									"sort": [ | ||||||
|  | 										{ | ||||||
|  | 											"field": "name", | ||||||
|  | 											"direction": "ASC" | ||||||
|  | 										} | ||||||
|  | 									], | ||||||
|  | 									"items": [ | ||||||
|  | 										{ | ||||||
|  | 											"id": 1, | ||||||
|  | 											"created_at": 1672804124000, | ||||||
|  | 											"updated_at": 1672804124000, | ||||||
|  | 											"user_id": 2, | ||||||
|  | 											"name": "API servers", | ||||||
|  | 											"nginx_template_id": 5, | ||||||
|  | 											"ip_hash": true, | ||||||
|  | 											"ntlm": false, | ||||||
|  | 											"keepalive": 10, | ||||||
|  | 											"keepalive_requests": 10, | ||||||
|  | 											"keepalive_time": "60s", | ||||||
|  | 											"keepalive_timeout": "3s", | ||||||
|  | 											"advanced_config": "", | ||||||
|  | 											"status": "ok", | ||||||
|  | 											"error_message": "", | ||||||
|  | 											"servers": [ | ||||||
|  | 												{ | ||||||
|  | 													"id": 1, | ||||||
|  | 													"created_at": 1672804124000, | ||||||
|  | 													"updated_at": 1672804124000, | ||||||
|  | 													"upstream_group_id": 1, | ||||||
|  | 													"server": "192.168.0.10:80", | ||||||
|  | 													"weight": 100, | ||||||
|  | 													"max_conns": 0, | ||||||
|  | 													"max_fails": 0, | ||||||
|  | 													"fail_timeout": 0, | ||||||
|  | 													"backup": false | ||||||
|  | 												}, | ||||||
|  | 												{ | ||||||
|  | 													"id": 2, | ||||||
|  | 													"created_at": 1672804124000, | ||||||
|  | 													"updated_at": 1672804124000, | ||||||
|  | 													"upstream_group_id": 1, | ||||||
|  | 													"server": "192.168.0.11:80", | ||||||
|  | 													"weight": 50, | ||||||
|  | 													"max_conns": 0, | ||||||
|  | 													"max_fails": 0, | ||||||
|  | 													"fail_timeout": 0, | ||||||
|  | 													"backup": false | ||||||
|  | 												} | ||||||
|  | 											] | ||||||
|  | 										}, | ||||||
|  | 										{ | ||||||
|  | 											"id": 2, | ||||||
|  | 											"created_at": 1672804197000, | ||||||
|  | 											"updated_at": 1672804197000, | ||||||
|  | 											"user_id": 2, | ||||||
|  | 											"name": "API servers 2", | ||||||
|  | 											"nginx_template_id": 5, | ||||||
|  | 											"ip_hash": false, | ||||||
|  | 											"ntlm": false, | ||||||
|  | 											"keepalive": 0, | ||||||
|  | 											"keepalive_requests": 0, | ||||||
|  | 											"keepalive_time": "", | ||||||
|  | 											"keepalive_timeout": "", | ||||||
|  | 											"advanced_config": "", | ||||||
|  | 											"status": "ok", | ||||||
|  | 											"error_message": "", | ||||||
|  | 											"servers": [ | ||||||
|  | 												{ | ||||||
|  | 													"id": 3, | ||||||
|  | 													"created_at": 1672804197000, | ||||||
|  | 													"updated_at": 1672804197000, | ||||||
|  | 													"upstream_group_id": 2, | ||||||
|  | 													"server": "192.168.0.10:80", | ||||||
|  | 													"weight": 100, | ||||||
|  | 													"max_conns": 0, | ||||||
|  | 													"max_fails": 0, | ||||||
|  | 													"fail_timeout": 0, | ||||||
|  | 													"backup": false | ||||||
|  | 												}, | ||||||
|  | 												{ | ||||||
|  | 													"id": 4, | ||||||
|  | 													"created_at": 1672804197000, | ||||||
|  | 													"updated_at": 1672804197000, | ||||||
|  | 													"upstream_group_id": 2, | ||||||
|  | 													"server": "192.168.0.11:80", | ||||||
|  | 													"weight": 50, | ||||||
|  | 													"max_conns": 0, | ||||||
|  | 													"max_fails": 0, | ||||||
|  | 													"fail_timeout": 0, | ||||||
|  | 													"backup": false | ||||||
|  | 												} | ||||||
|  | 											] | ||||||
|  | 										}, | ||||||
|  | 										{ | ||||||
|  | 											"id": 3, | ||||||
|  | 											"created_at": 1672804200000, | ||||||
|  | 											"updated_at": 1672804200000, | ||||||
|  | 											"user_id": 2, | ||||||
|  | 											"name": "API servers 2", | ||||||
|  | 											"nginx_template_id": 5, | ||||||
|  | 											"ip_hash": false, | ||||||
|  | 											"ntlm": false, | ||||||
|  | 											"keepalive": 0, | ||||||
|  | 											"keepalive_requests": 0, | ||||||
|  | 											"keepalive_time": "", | ||||||
|  | 											"keepalive_timeout": "", | ||||||
|  | 											"advanced_config": "", | ||||||
|  | 											"status": "ok", | ||||||
|  | 											"error_message": "", | ||||||
|  | 											"servers": [ | ||||||
|  | 												{ | ||||||
|  | 													"id": 5, | ||||||
|  | 													"created_at": 1672804200000, | ||||||
|  | 													"updated_at": 1672804200000, | ||||||
|  | 													"upstream_group_id": 3, | ||||||
|  | 													"server": "192.168.0.10:80", | ||||||
|  | 													"weight": 100, | ||||||
|  | 													"max_conns": 0, | ||||||
|  | 													"max_fails": 0, | ||||||
|  | 													"fail_timeout": 0, | ||||||
|  | 													"backup": false | ||||||
|  | 												}, | ||||||
|  | 												{ | ||||||
|  | 													"id": 6, | ||||||
|  | 													"created_at": 1672804200000, | ||||||
|  | 													"updated_at": 1672804200000, | ||||||
|  | 													"upstream_group_id": 3, | ||||||
|  | 													"server": "192.168.0.11:80", | ||||||
|  | 													"weight": 50, | ||||||
|  | 													"max_conns": 0, | ||||||
|  | 													"max_fails": 0, | ||||||
|  | 													"fail_timeout": 0, | ||||||
|  | 													"backup": false | ||||||
|  | 												} | ||||||
|  | 											] | ||||||
|  | 										}, | ||||||
|  | 										{ | ||||||
|  | 											"id": 4, | ||||||
|  | 											"created_at": 1672804201000, | ||||||
|  | 											"updated_at": 1672804201000, | ||||||
|  | 											"user_id": 2, | ||||||
|  | 											"name": "API servers 2", | ||||||
|  | 											"nginx_template_id": 5, | ||||||
|  | 											"ip_hash": false, | ||||||
|  | 											"ntlm": false, | ||||||
|  | 											"keepalive": 0, | ||||||
|  | 											"keepalive_requests": 0, | ||||||
|  | 											"keepalive_time": "", | ||||||
|  | 											"keepalive_timeout": "", | ||||||
|  | 											"advanced_config": "", | ||||||
|  | 											"status": "ok", | ||||||
|  | 											"error_message": "", | ||||||
|  | 											"servers": [ | ||||||
|  | 												{ | ||||||
|  | 													"id": 7, | ||||||
|  | 													"created_at": 1672804201000, | ||||||
|  | 													"updated_at": 1672804201000, | ||||||
|  | 													"upstream_group_id": 4, | ||||||
|  | 													"server": "192.168.0.10:80", | ||||||
|  | 													"weight": 100, | ||||||
|  | 													"max_conns": 0, | ||||||
|  | 													"max_fails": 0, | ||||||
|  | 													"fail_timeout": 0, | ||||||
|  | 													"backup": false | ||||||
|  | 												}, | ||||||
|  | 												{ | ||||||
|  | 													"id": 8, | ||||||
|  | 													"created_at": 1672804201000, | ||||||
|  | 													"updated_at": 1672804201000, | ||||||
|  | 													"upstream_group_id": 4, | ||||||
|  | 													"server": "192.168.0.11:80", | ||||||
|  | 													"weight": 50, | ||||||
|  | 													"max_conns": 0, | ||||||
|  | 													"max_fails": 0, | ||||||
|  | 													"fail_timeout": 0, | ||||||
|  | 													"backup": false | ||||||
|  | 												} | ||||||
|  | 											] | ||||||
|  | 										}, | ||||||
|  | 										{ | ||||||
|  | 											"id": 5, | ||||||
|  | 											"created_at": 1672804201000, | ||||||
|  | 											"updated_at": 1672804201000, | ||||||
|  | 											"user_id": 2, | ||||||
|  | 											"name": "API servers 2", | ||||||
|  | 											"nginx_template_id": 5, | ||||||
|  | 											"ip_hash": false, | ||||||
|  | 											"ntlm": false, | ||||||
|  | 											"keepalive": 0, | ||||||
|  | 											"keepalive_requests": 0, | ||||||
|  | 											"keepalive_time": "", | ||||||
|  | 											"keepalive_timeout": "", | ||||||
|  | 											"advanced_config": "", | ||||||
|  | 											"status": "ok", | ||||||
|  | 											"error_message": "", | ||||||
|  | 											"servers": [ | ||||||
|  | 												{ | ||||||
|  | 													"id": 9, | ||||||
|  | 													"created_at": 1672804201000, | ||||||
|  | 													"updated_at": 1672804201000, | ||||||
|  | 													"upstream_group_id": 5, | ||||||
|  | 													"server": "192.168.0.10:80", | ||||||
|  | 													"weight": 100, | ||||||
|  | 													"max_conns": 0, | ||||||
|  | 													"max_fails": 0, | ||||||
|  | 													"fail_timeout": 0, | ||||||
|  | 													"backup": false | ||||||
|  | 												}, | ||||||
|  | 												{ | ||||||
|  | 													"id": 10, | ||||||
|  | 													"created_at": 1672804201000, | ||||||
|  | 													"updated_at": 1672804201000, | ||||||
|  | 													"upstream_group_id": 5, | ||||||
|  | 													"server": "192.168.0.11:80", | ||||||
|  | 													"weight": 50, | ||||||
|  | 													"max_conns": 0, | ||||||
|  | 													"max_fails": 0, | ||||||
|  | 													"fail_timeout": 0, | ||||||
|  | 													"backup": false | ||||||
|  | 												} | ||||||
|  | 											] | ||||||
|  | 										} | ||||||
|  | 									] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										81
									
								
								backend/embed/api_docs/paths/upstreams/post.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								backend/embed/api_docs/paths/upstreams/post.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,81 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "createUpstream", | ||||||
|  | 	"summary": "Create a new Upstream", | ||||||
|  | 	"tags": ["Upstreams"], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Upstream to Create", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.CreateUpstream}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"201": { | ||||||
|  | 			"description": "201 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/UpstreamObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 6, | ||||||
|  | 									"created_at": 1672806857000, | ||||||
|  | 									"updated_at": 1672806857000, | ||||||
|  | 									"user_id": 2, | ||||||
|  | 									"name": "API servers 2", | ||||||
|  | 									"nginx_template_id": 5, | ||||||
|  | 									"ip_hash": false, | ||||||
|  | 									"ntlm": false, | ||||||
|  | 									"keepalive": 0, | ||||||
|  | 									"keepalive_requests": 0, | ||||||
|  | 									"keepalive_time": "", | ||||||
|  | 									"keepalive_timeout": "", | ||||||
|  | 									"advanced_config": "", | ||||||
|  | 									"status": "ready", | ||||||
|  | 									"error_message": "", | ||||||
|  | 									"servers": [ | ||||||
|  | 										{ | ||||||
|  | 											"id": 11, | ||||||
|  | 											"created_at": 1672806857000, | ||||||
|  | 											"updated_at": 1672806857000, | ||||||
|  | 											"upstream_id": 6, | ||||||
|  | 											"server": "192.168.0.10:80", | ||||||
|  | 											"weight": 100, | ||||||
|  | 											"max_conns": 0, | ||||||
|  | 											"max_fails": 0, | ||||||
|  | 											"fail_timeout": 0, | ||||||
|  | 											"backup": false | ||||||
|  | 										}, | ||||||
|  | 										{ | ||||||
|  | 											"id": 12, | ||||||
|  | 											"created_at": 1672806857000, | ||||||
|  | 											"updated_at": 1672806857000, | ||||||
|  | 											"upstream_id": 6, | ||||||
|  | 											"server": "192.168.0.11:80", | ||||||
|  | 											"weight": 50, | ||||||
|  | 											"max_conns": 0, | ||||||
|  | 											"max_fails": 0, | ||||||
|  | 											"fail_timeout": 0, | ||||||
|  | 											"backup": false | ||||||
|  | 										} | ||||||
|  | 									] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -1,23 +1,18 @@ | |||||||
| { | { | ||||||
| 	"operationId": "enableProxyHost", | 	"operationId": "deleteUpstream", | ||||||
| 	"summary": "Enable a Proxy Host", | 	"summary": "Delete a Upstream", | ||||||
| 	"tags": ["proxy-hosts"], | 	"tags": ["Upstreams"], | ||||||
| 	"security": [ |  | ||||||
| 		{ |  | ||||||
| 			"bearerAuth": ["proxy_hosts.manage"] |  | ||||||
| 		} |  | ||||||
| 	], |  | ||||||
| 	"parameters": [ | 	"parameters": [ | ||||||
| 		{ | 		{ | ||||||
| 			"in": "path", | 			"in": "path", | ||||||
| 			"name": "hostID", | 			"name": "upstreamID", | ||||||
| 			"description": "The ID of the Proxy Host", |  | ||||||
| 			"schema": { | 			"schema": { | ||||||
| 				"type": "integer", | 				"type": "integer", | ||||||
| 				"minimum": 1 | 				"minimum": 1 | ||||||
| 			}, | 			}, | ||||||
| 			"required": true, | 			"required": true, | ||||||
| 			"example": 2 | 			"description": "Numeric ID of the Upstream", | ||||||
|  | 			"example": 1 | ||||||
| 		} | 		} | ||||||
| 	], | 	], | ||||||
| 	"responses": { | 	"responses": { | ||||||
| @@ -25,13 +20,15 @@ | |||||||
| 			"description": "200 response", | 			"description": "200 response", | ||||||
| 			"content": { | 			"content": { | ||||||
| 				"application/json": { | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
| 					"examples": { | 					"examples": { | ||||||
| 						"default": { | 						"default": { | ||||||
| 							"value": true | 							"value": { | ||||||
|  | 								"result": true | ||||||
|  | 							} | ||||||
| 						} | 						} | ||||||
| 					}, |  | ||||||
| 					"schema": { |  | ||||||
| 						"type": "boolean" |  | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| @@ -40,18 +37,19 @@ | |||||||
| 			"description": "400 response", | 			"description": "400 response", | ||||||
| 			"content": { | 			"content": { | ||||||
| 				"application/json": { | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"$ref": "#/components/schemas/DeletedItemResponse" | ||||||
|  | 					}, | ||||||
| 					"examples": { | 					"examples": { | ||||||
| 						"default": { | 						"default": { | ||||||
| 							"value": { | 							"value": { | ||||||
|  | 								"result": null, | ||||||
| 								"error": { | 								"error": { | ||||||
| 									"code": 400, | 									"code": 400, | ||||||
| 									"message": "Host is already enabled" | 									"message": "You cannot delete a Upstream that is in use!" | ||||||
| 								} | 								} | ||||||
| 							} | 							} | ||||||
| 						} | 						} | ||||||
| 					}, |  | ||||||
| 					"schema": { |  | ||||||
| 						"$ref": "../../../../../components/error.json" |  | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
							
								
								
									
										82
									
								
								backend/embed/api_docs/paths/upstreams/upstreamID/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										82
									
								
								backend/embed/api_docs/paths/upstreams/upstreamID/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,82 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getUpstream", | ||||||
|  | 	"summary": "Get a Upstream object by ID", | ||||||
|  | 	"tags": ["Upstreams"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "upstreamID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Upstream", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/UpstreamObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1672786008000, | ||||||
|  | 									"updated_at": 1672786008000, | ||||||
|  | 									"user_id": 2, | ||||||
|  | 									"name": "API servers 3", | ||||||
|  | 									"ip_hash": true, | ||||||
|  | 									"ntlm": false, | ||||||
|  | 									"keepalive": 10, | ||||||
|  | 									"keepalive_requests": 10, | ||||||
|  | 									"keepalive_time": "60s", | ||||||
|  | 									"keepalive_timeout": "3s", | ||||||
|  | 									"advanced_config": "", | ||||||
|  | 									"servers": [ | ||||||
|  | 										{ | ||||||
|  | 											"id": 1, | ||||||
|  | 											"created_at": 1672786009000, | ||||||
|  | 											"updated_at": 1672786009000, | ||||||
|  | 											"upstream_id": 1, | ||||||
|  | 											"server": "api1.localhost:1234", | ||||||
|  | 											"weight": 100, | ||||||
|  | 											"max_conns": 0, | ||||||
|  | 											"max_fails": 0, | ||||||
|  | 											"fail_timeout": 0, | ||||||
|  | 											"backup": false | ||||||
|  | 										}, | ||||||
|  | 										{ | ||||||
|  | 											"id": 2, | ||||||
|  | 											"created_at": 1672786009000, | ||||||
|  | 											"updated_at": 1672786009000, | ||||||
|  | 											"upstream_id": 1, | ||||||
|  | 											"server": "api2.localhost:1234", | ||||||
|  | 											"weight": 50, | ||||||
|  | 											"max_conns": 0, | ||||||
|  | 											"max_fails": 0, | ||||||
|  | 											"fail_timeout": 0, | ||||||
|  | 											"backup": true | ||||||
|  | 										} | ||||||
|  | 									] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @@ -0,0 +1,43 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getUpstreamNginxConfig", | ||||||
|  | 	"summary": "Get a Upstream Nginx Config object by ID", | ||||||
|  | 	"tags": ["Upstreams"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "upstreamID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Upstream", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"type": "string" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": "# ------------------------------------------------------------\n# Upstream 1: API servers\n# ------------------------------------------------------------\nupstream npm_upstream_1 {\nserver 192.168.0.10:80 weight=100 ;\n  server 192.168.0.11:80 weight=50 ;\n}\n" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										94
									
								
								backend/embed/api_docs/paths/upstreams/upstreamID/put.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								backend/embed/api_docs/paths/upstreams/upstreamID/put.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,94 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "updateUpstream", | ||||||
|  | 	"summary": "Update an existing Upstream", | ||||||
|  | 	"tags": ["Upstreams"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "path", | ||||||
|  | 			"name": "upstreamID", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "integer", | ||||||
|  | 				"minimum": 1 | ||||||
|  | 			}, | ||||||
|  | 			"required": true, | ||||||
|  | 			"description": "ID of the Upstream", | ||||||
|  | 			"example": 1 | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "Upstream details to update", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.UpdateUpstream}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/UpstreamObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"created_at": 1673234177000, | ||||||
|  | 									"updated_at": 1673244559000, | ||||||
|  | 									"user_id": 2, | ||||||
|  | 									"name": "API servers 2", | ||||||
|  | 									"nginx_template_id": 5, | ||||||
|  | 									"ip_hash": false, | ||||||
|  | 									"ntlm": false, | ||||||
|  | 									"keepalive": 0, | ||||||
|  | 									"keepalive_requests": 0, | ||||||
|  | 									"keepalive_time": "", | ||||||
|  | 									"keepalive_timeout": "", | ||||||
|  | 									"advanced_config": "", | ||||||
|  | 									"status": "ready", | ||||||
|  | 									"error_message": "", | ||||||
|  | 									"servers": [ | ||||||
|  | 										{ | ||||||
|  | 											"id": 1, | ||||||
|  | 											"created_at": 1673234177000, | ||||||
|  | 											"updated_at": 1673244559000, | ||||||
|  | 											"upstream_id": 1, | ||||||
|  | 											"server": "192.168.0.10:80", | ||||||
|  | 											"weight": 100, | ||||||
|  | 											"max_conns": 0, | ||||||
|  | 											"max_fails": 0, | ||||||
|  | 											"fail_timeout": 0, | ||||||
|  | 											"backup": false | ||||||
|  | 										}, | ||||||
|  | 										{ | ||||||
|  | 											"id": 2, | ||||||
|  | 											"created_at": 1673234177000, | ||||||
|  | 											"updated_at": 1673244559000, | ||||||
|  | 											"upstream_id": 1, | ||||||
|  | 											"server": "192.168.0.11:80", | ||||||
|  | 											"weight": 50, | ||||||
|  | 											"max_conns": 0, | ||||||
|  | 											"max_fails": 0, | ||||||
|  | 											"fail_timeout": 0, | ||||||
|  | 											"backup": false | ||||||
|  | 										} | ||||||
|  | 									] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										111
									
								
								backend/embed/api_docs/paths/users/get.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								backend/embed/api_docs/paths/users/get.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,111 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "getUsers", | ||||||
|  | 	"summary": "Get a list of users", | ||||||
|  | 	"tags": ["Users"], | ||||||
|  | 	"parameters": [ | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "offset", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row offset, default 0", | ||||||
|  | 			"example": 0 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "limit", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "number" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The pagination row limit, default 10", | ||||||
|  | 			"example": 10 | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			"in": "query", | ||||||
|  | 			"name": "sort", | ||||||
|  | 			"schema": { | ||||||
|  | 				"type": "string" | ||||||
|  | 			}, | ||||||
|  | 			"description": "The sorting of the list", | ||||||
|  | 			"example": "name,email.asc" | ||||||
|  | 		} | ||||||
|  | 	], | ||||||
|  | 	"responses": { | ||||||
|  | 		"200": { | ||||||
|  | 			"description": "200 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/UserList" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"total": 3, | ||||||
|  | 									"offset": 0, | ||||||
|  | 									"limit": 100, | ||||||
|  | 									"sort": [ | ||||||
|  | 										{ | ||||||
|  | 											"field": "name", | ||||||
|  | 											"direction": "ASC" | ||||||
|  | 										}, | ||||||
|  | 										{ | ||||||
|  | 											"field": "email", | ||||||
|  | 											"direction": "ASC" | ||||||
|  | 										} | ||||||
|  | 									], | ||||||
|  | 									"items": [ | ||||||
|  | 										{ | ||||||
|  | 											"id": 1, | ||||||
|  | 											"name": "Jamie Curnow", | ||||||
|  | 											"email": "jc@jc21.com", | ||||||
|  | 											"created_at": 1578010090000, | ||||||
|  | 											"updated_at": 1578010095000, | ||||||
|  | 											"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128", | ||||||
|  | 											"is_disabled": false, | ||||||
|  | 											"capabilities": ["full-admin"] | ||||||
|  | 										}, | ||||||
|  | 										{ | ||||||
|  | 											"id": 2, | ||||||
|  | 											"name": "John Doe", | ||||||
|  | 											"email": "johdoe@example.com", | ||||||
|  | 											"created_at": 1578010100000, | ||||||
|  | 											"updated_at": 1578010105000, | ||||||
|  | 											"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128", | ||||||
|  | 											"is_disabled": false, | ||||||
|  | 											"capabilities": [ | ||||||
|  | 												"hosts.view", | ||||||
|  | 												"hosts.manage" | ||||||
|  | 											] | ||||||
|  | 										}, | ||||||
|  | 										{ | ||||||
|  | 											"id": 3, | ||||||
|  | 											"name": "Jane Doe", | ||||||
|  | 											"email": "janedoe@example.com", | ||||||
|  | 											"created_at": 1578010110000, | ||||||
|  | 											"updated_at": 1578010115000, | ||||||
|  | 											"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128", | ||||||
|  | 											"is_disabled": false, | ||||||
|  | 											"capabilities": [ | ||||||
|  | 												"hosts.view", | ||||||
|  | 												"hosts.manage" | ||||||
|  | 											] | ||||||
|  | 										} | ||||||
|  | 									] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										81
									
								
								backend/embed/api_docs/paths/users/post.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								backend/embed/api_docs/paths/users/post.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,81 @@ | |||||||
|  | { | ||||||
|  | 	"operationId": "createUser", | ||||||
|  | 	"summary": "Create a new User", | ||||||
|  | 	"tags": ["Users"], | ||||||
|  | 	"requestBody": { | ||||||
|  | 		"description": "User to Create", | ||||||
|  | 		"required": true, | ||||||
|  | 		"content": { | ||||||
|  | 			"application/json": { | ||||||
|  | 				"schema": "{{schema.CreateUser}}" | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	}, | ||||||
|  | 	"responses": { | ||||||
|  | 		"201": { | ||||||
|  | 			"description": "201 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["result"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"$ref": "#/components/schemas/UserObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"result": { | ||||||
|  | 									"id": 1, | ||||||
|  | 									"name": "Jamie Curnow", | ||||||
|  | 									"email": "jc@jc21.com", | ||||||
|  | 									"created_at": 1578010100000, | ||||||
|  | 									"updated_at": 1578010100000, | ||||||
|  | 									"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128", | ||||||
|  | 									"is_disabled": false, | ||||||
|  | 									"auth": { | ||||||
|  | 										"$ref": "#/components/schemas/UserAuthObject" | ||||||
|  | 									}, | ||||||
|  | 									"capabilities": ["full-admin"] | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		"400": { | ||||||
|  | 			"description": "400 response", | ||||||
|  | 			"content": { | ||||||
|  | 				"application/json": { | ||||||
|  | 					"schema": { | ||||||
|  | 						"type": "object", | ||||||
|  | 						"required": ["error"], | ||||||
|  | 						"properties": { | ||||||
|  | 							"result": { | ||||||
|  | 								"type": "object", | ||||||
|  | 								"nullable": true | ||||||
|  | 							}, | ||||||
|  | 							"error": { | ||||||
|  | 								"$ref": "#/components/schemas/ErrorObject" | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					}, | ||||||
|  | 					"examples": { | ||||||
|  | 						"default": { | ||||||
|  | 							"value": { | ||||||
|  | 								"error": { | ||||||
|  | 									"code": 400, | ||||||
|  | 									"message": "An user already exists with this email address" | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user