Initial commit — SETEC LABS Manager (Setec_CDM)
Flask-based VPS management panel with SSH remote command execution. Includes E2E encrypted SSH tunnel (AES-256-GCM + Go agent), setup wizard, security hardening tools, DNS management, firewall configs, monitoring, backup, and .sec patch update system. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
105
setec-web/hosting.py
Normal file
105
setec-web/hosting.py
Normal file
@@ -0,0 +1,105 @@
|
||||
# Hosting provider API definitions
|
||||
# Each provider has its DNS API endpoint format and auth method
|
||||
|
||||
PROVIDERS = {
|
||||
"hostinger": {
|
||||
"name": "Hostinger",
|
||||
"dns_base": "https://api.hostinger.com/api/dns/v1/zones",
|
||||
"auth_type": "bearer",
|
||||
"auth_header": "Authorization",
|
||||
"auth_prefix": "Bearer ",
|
||||
"docs": "https://developers.hostinger.com",
|
||||
"api_key_label": "API Key",
|
||||
"notes": "Generate API key from Hostinger hPanel > API Keys",
|
||||
},
|
||||
"cloudflare": {
|
||||
"name": "Cloudflare",
|
||||
"dns_base": "https://api.cloudflare.com/client/v4/zones",
|
||||
"auth_type": "bearer",
|
||||
"auth_header": "Authorization",
|
||||
"auth_prefix": "Bearer ",
|
||||
"docs": "https://developers.cloudflare.com/api",
|
||||
"api_key_label": "API Token",
|
||||
"notes": "Create API token at dash.cloudflare.com > My Profile > API Tokens",
|
||||
"needs_zone_id": True,
|
||||
},
|
||||
"digitalocean": {
|
||||
"name": "DigitalOcean",
|
||||
"dns_base": "https://api.digitalocean.com/v2/domains",
|
||||
"auth_type": "bearer",
|
||||
"auth_header": "Authorization",
|
||||
"auth_prefix": "Bearer ",
|
||||
"docs": "https://docs.digitalocean.com/reference/api",
|
||||
"api_key_label": "API Token",
|
||||
"notes": "Generate token at cloud.digitalocean.com > API > Tokens",
|
||||
},
|
||||
"vultr": {
|
||||
"name": "Vultr",
|
||||
"dns_base": "https://api.vultr.com/v2/domains",
|
||||
"auth_type": "bearer",
|
||||
"auth_header": "Authorization",
|
||||
"auth_prefix": "Bearer ",
|
||||
"docs": "https://www.vultr.com/api",
|
||||
"api_key_label": "API Key",
|
||||
"notes": "Get API key from my.vultr.com > Account > API",
|
||||
},
|
||||
"linode": {
|
||||
"name": "Linode (Akamai)",
|
||||
"dns_base": "https://api.linode.com/v4/domains",
|
||||
"auth_type": "bearer",
|
||||
"auth_header": "Authorization",
|
||||
"auth_prefix": "Bearer ",
|
||||
"docs": "https://www.linode.com/docs/api",
|
||||
"api_key_label": "Personal Access Token",
|
||||
"notes": "Create token at cloud.linode.com > My Profile > API Tokens",
|
||||
},
|
||||
"godaddy": {
|
||||
"name": "GoDaddy",
|
||||
"dns_base": "https://api.godaddy.com/v1/domains",
|
||||
"auth_type": "sso",
|
||||
"auth_header": "Authorization",
|
||||
"auth_prefix": "sso-key ",
|
||||
"docs": "https://developer.godaddy.com",
|
||||
"api_key_label": "API Key:Secret",
|
||||
"notes": "Format: key:secret. Get from developer.godaddy.com > API Keys",
|
||||
},
|
||||
"namecheap": {
|
||||
"name": "Namecheap",
|
||||
"dns_base": "https://api.namecheap.com/xml.response",
|
||||
"auth_type": "query",
|
||||
"docs": "https://www.namecheap.com/support/api/intro",
|
||||
"api_key_label": "API Key",
|
||||
"notes": "Enable API at namecheap.com > Profile > Tools > API Access. Requires IP whitelist.",
|
||||
},
|
||||
"hetzner": {
|
||||
"name": "Hetzner",
|
||||
"dns_base": "https://dns.hetzner.com/api/v1/zones",
|
||||
"auth_type": "header",
|
||||
"auth_header": "Auth-API-Token",
|
||||
"auth_prefix": "",
|
||||
"docs": "https://dns.hetzner.com/api-docs",
|
||||
"api_key_label": "API Token",
|
||||
"notes": "Create token at dns.hetzner.com > API Tokens",
|
||||
},
|
||||
"ovh": {
|
||||
"name": "OVH",
|
||||
"dns_base": "https://api.ovh.com/1.0/domain/zone",
|
||||
"auth_type": "ovh",
|
||||
"docs": "https://api.ovh.com",
|
||||
"api_key_label": "Application Key",
|
||||
"notes": "Requires Application Key, Application Secret, and Consumer Key from api.ovh.com/createApp",
|
||||
},
|
||||
"aws_route53": {
|
||||
"name": "AWS Route 53",
|
||||
"dns_base": "https://route53.amazonaws.com/2013-04-01/hostedzone",
|
||||
"auth_type": "aws",
|
||||
"docs": "https://docs.aws.amazon.com/Route53/latest/APIReference",
|
||||
"api_key_label": "Access Key ID",
|
||||
"notes": "Requires AWS Access Key ID and Secret Access Key with Route53 permissions",
|
||||
},
|
||||
}
|
||||
|
||||
PROVIDER_LIST = [
|
||||
{"id": k, **{kk: vv for kk, vv in v.items()}}
|
||||
for k, v in PROVIDERS.items()
|
||||
]
|
||||
Reference in New Issue
Block a user