mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-06 21:28:30 +02:00
Added experimental acme renew from Let's Encrypt
This commit is contained in:
@@ -67,6 +67,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<button class="ui basic button" onclick="initManagedDomainCertificateList();"><i class="green refresh icon"></i> Refresh List</button>
|
||||
<button class="ui basic button" onclick="openACMEManager();"><i class="yellow refresh icon"></i> Auto Renew (ACME) Settings</button>
|
||||
</div>
|
||||
<div class="ui message">
|
||||
<h4><i class="info circle icon"></i> Sub-domain Certificates</h4>
|
||||
@@ -106,11 +107,14 @@
|
||||
msgbox(data.error, false, 5000);
|
||||
}else{
|
||||
$("#certifiedDomainList").html("");
|
||||
data.sort((a,b) => {
|
||||
return a.Domain > b.Domain
|
||||
});
|
||||
data.forEach(entry => {
|
||||
$("#certifiedDomainList").append(`<tr>
|
||||
<td>${entry.Domain}</td>
|
||||
<td>${entry.LastModifiedDate}</td>
|
||||
<td>${entry.ExpireDate}</td>
|
||||
<td>${entry.ExpireDate} (${entry.RemainingDays} days left)</td>
|
||||
<td><button title="Delete key-pair" class="ui mini basic red icon button" onclick="deleteCertificate('${entry.Domain}');"><i class="ui red trash icon"></i></button></td>
|
||||
</tr>`);
|
||||
});
|
||||
@@ -125,6 +129,10 @@
|
||||
}
|
||||
initManagedDomainCertificateList();
|
||||
|
||||
function openACMEManager(){
|
||||
showSideWrapper('snippet/acme.html');
|
||||
}
|
||||
|
||||
function handleDomainUploadByKeypress(){
|
||||
handleDomainKeysUpload(function(){
|
||||
$("#certUploadingDomain").text($("#certdomain").val().trim());
|
||||
|
@@ -45,8 +45,17 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class=""></div>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
<!-- Whois-->
|
||||
<h2>Whois</h2>
|
||||
<p>Check the owner and registration information of a given domain</p>
|
||||
<div class="ui icon input">
|
||||
<input id="whoisdomain" type="text" onkeypress="if(event.keyCode === 13) { performWhoisLookup(); }" placeholder="Domain or IP">
|
||||
<i onclick="performWhoisLookup();" class="circular search link icon"></i>
|
||||
</div><br>
|
||||
<small>Lookup might take a few minutes to complete</small>
|
||||
<br>
|
||||
<div id="whois_table"></div>
|
||||
</div>
|
||||
|
||||
<div class="ui bottom attached tab segment nettoolstab" data-tab="tab2">
|
||||
@@ -485,10 +494,70 @@ function ping(){
|
||||
$("#traceroute_results").val("");
|
||||
msgbox(data.error, false, 6000);
|
||||
}else{
|
||||
$("#traceroute_results").val(data.join("\n"));
|
||||
$("#traceroute_results").val(`--------- ICMP Ping -------------
|
||||
${data.ICMP.join("\n")}\n
|
||||
---------- TCP Ping -------------
|
||||
${data.TCP.join("\n")}\n
|
||||
---------- UDP Ping -------------
|
||||
${data.UDP.join("\n")}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function performWhoisLookup(){
|
||||
let whoisDomain = $("#whoisdomain").val().trim();
|
||||
$("#whoisdomain").parent().addClass("disabled");
|
||||
$("#whoisdomain").parent().css({
|
||||
"cursor": "wait"
|
||||
});
|
||||
$.get("/api/tools/whois?target=" + whoisDomain, function(data){
|
||||
$("#whoisdomain").parent().removeClass("disabled");
|
||||
$("#whoisdomain").parent().css({
|
||||
"cursor": "auto"
|
||||
});
|
||||
if (data.error != undefined){
|
||||
msgbox(data.error, false, 6000);
|
||||
}else{
|
||||
renderWhoisDomainTable(data);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function renderWhoisDomainTable(jsonData) {
|
||||
|
||||
function formatDate(dateString) {
|
||||
var date = new Date(dateString);
|
||||
return date.toLocaleString('en-US', { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
||||
}
|
||||
|
||||
var table = $('<table>').addClass('ui definition table');
|
||||
|
||||
// Create table body
|
||||
var body = $('<tbody>');
|
||||
for (var key in jsonData) {
|
||||
var value = jsonData[key];
|
||||
var row = $('<tr>');
|
||||
row.append($('<td>').text(key));
|
||||
if (key.endsWith('Date')) {
|
||||
row.append($('<td>').text(formatDate(value)));
|
||||
} else if (Array.isArray(value)) {
|
||||
row.append($('<td>').text(value.join(', ')));
|
||||
}else if (typeof(value) == "object"){
|
||||
row.append($('<td>').text(JSON.stringify(value)));
|
||||
} else {
|
||||
row.append($('<td>').text(value));
|
||||
}
|
||||
body.append(row);
|
||||
}
|
||||
|
||||
// Append the table body to the table
|
||||
table.append(body);
|
||||
|
||||
// Append the table to the target element
|
||||
$('#whois_table').empty().append(table);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
@@ -72,7 +72,7 @@
|
||||
<i class="ui green checkmark icon"></i> Redirection Rules Added
|
||||
</div>
|
||||
<br><br>
|
||||
<!--
|
||||
|
||||
<div class="advancezone ui basic segment">
|
||||
<div class="ui accordion advanceSettings">
|
||||
<div class="title">
|
||||
@@ -85,7 +85,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user