feat: zone dropdown in create form, fix light mode colors, restructure .env.example

This commit is contained in:
chunzhimoe
2026-04-12 17:16:22 +08:00
parent 948fe3935e
commit f775e5c80c
4 changed files with 208 additions and 152 deletions
+35 -23
View File
@@ -1,29 +1,41 @@
# Cloudflare credentials (server-side only, never sent to browser)
CLOUDFLARE_ACCOUNT_ID=your_account_id_here
CLOUDFLARE_API_TOKEN=your_api_token_here
# ═══════════════════════════════════════════════════════════════
# SSH Launcher — Environment Variables
# Copy to .env.local for local dev, or paste into Vercel dashboard
# (Settings → Environment Variables → Import .env)
# ═══════════════════════════════════════════════════════════════
# Required API Token permissions:
# - Access: Apps and Policies Write (list + create Access apps)
# - Cloudflare Tunnel: Edit (create / configure / delete tunnels)
# - DNS: Edit (create CNAME records)
# - Zone: Read (lookup zone ID for a hostname)
# Optional: Cloudflare Access Service Token for fetching server metrics
# (Create one in Zero Trust > Settings > Service Auth)
CF_SERVICE_CLIENT_ID=
CF_SERVICE_CLIENT_SECRET=
# Upstash Redis — stores per-user CF credentials (multi-user)
# Create a free database at https://console.upstash.com
UPSTASH_REDIS_URL=https://your-db.upstash.io
UPSTASH_REDIS_TOKEN=your_upstash_token_here
# GitHub OAuth (create at https://github.com/settings/developers)
# Callback URL: https://your-domain.vercel.app/api/auth/callback/github
# ── GitHub OAuth ─────────────────────────────────────────────
# Create at https://github.com/settings/developers → New OAuth App
# Homepage URL: https://your-domain.vercel.app
# Callback URL: https://your-domain.vercel.app/api/auth/callback/github
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# Required for next-auth session encryption (run: openssl rand -base64 32)
# ── NextAuth ─────────────────────────────────────────────────
# Generate secret: openssl rand -base64 32
NEXTAUTH_SECRET=
# Optional on Vercel set to your production URL if self-hosting
# Required only when self-hosting (Vercel sets this automatically)
# NEXTAUTH_URL=https://your-domain.vercel.app
# ── Upstash Redis ─────────────────────────────────────────────
# Stores per-user Cloudflare credentials (multi-user)
# Create a free database at https://console.upstash.com
# Copy the REST API URL and Token from the database dashboard
UPSTASH_REDIS_URL=
UPSTASH_REDIS_TOKEN=
# ── Cloudflare API (optional — can set per-user via /settings) ─
# If set here, all users share these credentials (single-user mode)
# Required Token permissions:
# Account → Cloudflare Tunnel: Edit
# Account → Access: Apps and Policies: Edit
# Zone → DNS: Edit
# Zone → Zone: Read
CLOUDFLARE_ACCOUNT_ID=
CLOUDFLARE_API_TOKEN=
# ── Cloudflare Access Service Token (optional) ───────────────
# Used to fetch server metrics through Access-protected tunnels
# Create in Zero Trust → Access → Service Auth → Service Tokens
CF_SERVICE_CLIENT_ID=
CF_SERVICE_CLIENT_SECRET=