Security: remove hardcoded credentials, use placeholders and config

This commit is contained in:
cynfo3000
2026-03-04 08:17:37 +01:00
parent 240cbe37fa
commit 7f5bb07409
19 changed files with 252 additions and 231 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ const PLATFORMS = [
{ id: 'windows', label: 'Windows', icon: Cpu },
]
const BACKEND_URL = 'https://dsbmueller.spdns.org:8443'
import { BACKEND_URL } from '../config'
export default function Firmware() {
const [firmwareData, setFirmwareData] = useState(null)
@@ -243,10 +243,10 @@ export default function Firmware() {
{installerData?.installers?.some(i => i.platform === 'freebsd') && (
<div className="mb-4 bg-gray-950 rounded p-3 relative">
<div className="text-[10px] text-gray-500 mb-1">Installationsbefehl (OPNsense):</div>
<pre className="text-xs font-mono text-orange-300 whitespace-pre-wrap">{`fetch --no-verify-peer --no-verify-hostname -o /tmp/installer.zip "${BACKEND_URL}/api/v1/installer/download?platform=freebsd&api_key=01532e5a7c9e70bf2757df77a2f5b9b9" && cd /tmp && unzip -o installer.zip && sh /tmp/install.sh`}</pre>
<pre className="text-xs font-mono text-orange-300 whitespace-pre-wrap">{`fetch --no-verify-peer --no-verify-hostname -o /tmp/installer.zip "${BACKEND_URL}/api/v1/installer/download?platform=freebsd&api_key=YOUR_API_KEY" && cd /tmp && unzip -o installer.zip && sh /tmp/install.sh`}</pre>
<button
onClick={() => {
copyToClipboard(`fetch --no-verify-peer --no-verify-hostname -o /tmp/installer.zip "${BACKEND_URL}/api/v1/installer/download?platform=freebsd&api_key=01532e5a7c9e70bf2757df77a2f5b9b9" && cd /tmp && unzip -o installer.zip && sh /tmp/install.sh`)
copyToClipboard(`fetch --no-verify-peer --no-verify-hostname -o /tmp/installer.zip "${BACKEND_URL}/api/v1/installer/download?platform=freebsd&api_key=YOUR_API_KEY" && cd /tmp && unzip -o installer.zip && sh /tmp/install.sh`)
setCopied(true)
setTimeout(() => setCopied(false), 2000)
}}
+2 -1
View File
@@ -3,6 +3,7 @@ import api from '../api/client'
import { useAuthStore } from '../stores/auth'
import { copyToClipboard } from '../utils/clipboard'
import { Plus, Trash2, KeyRound, ShieldAlert, Copy, Check, Key } from 'lucide-react'
import { BACKEND_HOST } from '../config'
export default function SettingsPage() {
const [users, setUsers] = useState([])
@@ -211,7 +212,7 @@ export default function SettingsPage() {
<div className="px-4 py-3 space-y-1 text-sm">
<div className="flex justify-between">
<span className="text-gray-500">Backend</span>
<span className="text-gray-400">192.168.85.13:8443</span>
<span className="text-gray-400">{BACKEND_HOST + ':8443'}</span>
</div>
<div className="flex justify-between">
<span className="text-gray-500">Authentifizierung</span>
+1 -1
View File
@@ -4,7 +4,7 @@ import api from '../api/client'
import StatusBadge from '../components/StatusBadge'
import { Cable, Unplug, ExternalLink, RefreshCw, Search } from 'lucide-react'
const BACKEND_HOST = '192.168.85.13'
import { BACKEND_HOST } from '../config'
export default function Tunnels() {
const [agents, setAgents] = useState([])