Fix
All checks were successful
release-tag / release-image (push) Successful in 1m52s

This commit is contained in:
2025-05-09 10:17:32 +02:00
parent 7ec9cd4919
commit e4bbebffa7

24
main.go
View File

@@ -226,8 +226,8 @@ func initConfigAndTemplates() {
pageIP = defaultIP
}
dhcpScope = os.Getenv("DHCP_SERVER")
dhcpServer = os.Getenv("DHCP_SCOPE")
dhcpScope = os.Getenv("DHCP_SCOPE")
dhcpServer = os.Getenv("DHCP_SERVER")
// Range limit ---------------------------------
if limStr := os.Getenv("RANGE_LIMIT"); limStr != "" {
@@ -267,9 +267,9 @@ var singlePageHTML = `<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title>IPv4 → IPv6Mapper</title>
<title>IPv4IPv6-Mapper</title>
<style>
body{font-family:system-ui,sans-serif;margin:2rem;max-width:46rem}
body{font-family:system-ui,sans-serif;margin:2rem}
form{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem}
input[type=text],input[readonly]{padding:.4rem;font-size:1rem;border:1px solid #ccc;border-radius:4px;flex:1}
button{padding:.5rem 1rem;font-size:1rem;cursor:pointer;border-radius:4px;border:1px solid #666;background:#eee}
@@ -279,7 +279,7 @@ var singlePageHTML = `<!DOCTYPE html>
</style>
<script>async function copy(id){const v=document.getElementById(id).value;await navigator.clipboard.writeText(v);const b=document.getElementById(id+'Btn');const o=b.textContent;b.textContent='✔';setTimeout(()=>b.textContent=o,1200);}</script>
</head><body>
<h1>IPv4 → IPv6 (einzeln)</h1>
<h1>IPv4IPv6 (einzeln)</h1>
<form action="/convert" method="post">
<input name="ipv4" type="text" placeholder="%s" value="{{.IPv4}}" required />
<button>Umrechnen</button>
@@ -287,8 +287,8 @@ var singlePageHTML = `<!DOCTYPE html>
</form>
{{if .HaveResult}}
<div>
<h2>Windows 11Eingaben</h2>
<div class="row"><label>IPAdresse</label><input readonly id="ip" value="{{.IPv6}}"><button type="button" class="copy" id="ipBtn" onclick="copy('ip')">Copy</button></div>
<h2>Windows 11-Eingaben</h2>
<div class="row"><label>IP-Adresse</label><input readonly id="ip" value="{{.IPv6}}"><button type="button" class="copy" id="ipBtn" onclick="copy('ip')">Copy</button></div>
<div class="row"><label>Subnetzpräfix</label><input readonly id="pl" value="96"><button type="button" class="copy" id="plBtn" onclick="copy('pl')">Copy</button></div>
<div class="row"><label>Gateway</label><input readonly id="gw" value="{{.Gateway}}"><button type="button" class="copy" id="gwBtn" onclick="copy('gw')">Copy</button></div>
<div class="row"><label>DNS bevorzugt</label><input readonly id="dns1" value="{{.DNS1}}"><button type="button" class="copy" id="dns1Btn" onclick="copy('dns1')">Copy</button></div>
@@ -303,9 +303,9 @@ var rangePageHTML = `<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title>IPv4Range → IPv6</title>
<title>IPv4-RangeIPv6</title>
<style>
body{font-family:system-ui,sans-serif;margin:2rem;max-width:60rem}
body{font-family:system-ui,sans-serif;margin:2rem}
table{border-collapse:collapse;width:100%}
th,td{border:1px solid #ccc;padding:.4rem;text-align:left;font-family:monospace}
form{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem}
@@ -313,10 +313,10 @@ var rangePageHTML = `<!DOCTYPE html>
button{padding:.5rem 1rem;font-size:1rem;cursor:pointer;border-radius:4px;border:1px solid #666;background:#eee}
</style>
</head><body>
<h1>IPv4Bereich → IPv6Tabelle</h1>
<h1>IPv4-BereichIPv6-Tabelle</h1>
<form action="/range" method="post">
<input name="start" type="text" placeholder="StartIPv4" value="{{.Start}}" required />
<input name="end" type="text" placeholder="EndIPv4" value="{{.End}}" required />
<input name="start" type="text" placeholder="Start-IPv4" value="{{.Start}}" required />
<input name="end" type="text" placeholder="End-IPv4" value="{{.End}}" required />
<button>Konvertieren</button>
<a href="/" style="margin-left:1rem">&laquo; Einzelkonverter</a>
</form>