Fix xray panel

This commit is contained in:
2026-07-24 16:04:20 -03:00
parent 44f5b2b09c
commit 6c2fc33fff
4 changed files with 172 additions and 166 deletions
+2 -2
View File
@@ -397,7 +397,7 @@ async function wzSavePastedCert() {
if (!name || !cert || !key) { st.textContent = "Name, cert, and key required."; return; }
st.textContent = "Saving…";
try {
const res = await api("/api/tls/upload-pem", { method:"POST", body: JSON.stringify({ name, cert, key }) });
const res = await api(withServerParam("/api/tls/upload-pem", selectedXrayServer()), { method:"POST", body: JSON.stringify({ name, cert, key }) });
if (!res.ok) throw new Error(await res.text());
const data = await res.json();
document.getElementById("wzTLSCert").value = data.cert_file;
@@ -415,7 +415,7 @@ async function wzGenerateCert() {
if (!domain) { st.textContent = "Domain required."; return; }
st.textContent = "Generating…";
try {
const res = await api("/api/tls/generate-selfsigned", { method:"POST", body: JSON.stringify({ domain }) });
const res = await api(withServerParam("/api/tls/generate-selfsigned", selectedXrayServer()), { method:"POST", body: JSON.stringify({ domain }) });
if (!res.ok) throw new Error(await res.text());
const data = await res.json();
document.getElementById("wzTLSCert").value = data.cert_file;