mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-08 06:08:30 +02:00
Removed alpha prototype source
This commit is contained in:
@@ -1,238 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="theme-color" content="#4b75ff">
|
||||
<link rel="icon" type="image/png" href="./favicon.png" />
|
||||
<title>Control Panel | Zoraxy</title>
|
||||
<link rel="stylesheet" href="script/semantic/semantic.min.css">
|
||||
<script src="script/jquery-3.6.0.min.js"></script>
|
||||
<script src="../script/ao_module.js"></script>
|
||||
<script src="script/semantic/semantic.min.js"></script>
|
||||
<script src="script/tablesort.js"></script>
|
||||
<link rel="stylesheet" href="main.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="menubar">
|
||||
<div class="item">
|
||||
<img class="logo" src="img/logo.svg">
|
||||
</div>
|
||||
|
||||
<div class="ui right floated buttons menutoggle" style="padding-top: 2px;">
|
||||
<button class="ui basic icon button" onclick="$('.toolbar').fadeToggle('fast');"><i class="content icon"></i></button>
|
||||
</div>
|
||||
<div class="ui right floated buttons" style="padding-top: 2px;">
|
||||
<button class="ui basic icon button" onclick="logout();"><i class="sign-out icon"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<div class="toolbar">
|
||||
<div id="mainmenu" class="ui secondary vertical pointing menu">
|
||||
<a class="item active" tag="status">
|
||||
<i class="blue info circle icon"></i>Status
|
||||
</a>
|
||||
<a class="item" tag="vdir">
|
||||
<i class="yellow folder icon"></i> Virtual Directory
|
||||
</a>
|
||||
<a class="item" tag="subd">
|
||||
<i class="teal sitemap icon"></i> Subdomain Proxy
|
||||
</a>
|
||||
<a class="item" tag="rules">
|
||||
<i class="brown plus square icon"></i> Create Proxy Rules
|
||||
</a>
|
||||
<a class="item" tag="setroot">
|
||||
<i class="home icon"></i> Set Proxy Root
|
||||
</a>
|
||||
<div class="ui divider menudivider">Access & Connections</div>
|
||||
<a class="item" tag="cert">
|
||||
<i class="orange lock icon"></i> TLS / SSL certificate
|
||||
</a>
|
||||
<a class="item" tag="redirectset">
|
||||
<i class="violet level up alternate icon"></i> Redirection
|
||||
</a>
|
||||
<a class="item" tag="blacklist">
|
||||
<i class="red ban icon"></i> Blacklist
|
||||
</a>
|
||||
<a class="item" tag="upnp">
|
||||
<i class="blue exchange icon"></i> Port Forward
|
||||
</a>
|
||||
<div class="ui divider menudivider">Bridging</div>
|
||||
<a class="item" tag="">
|
||||
<i class="remove icon"></i> TCP Proxy
|
||||
</a>
|
||||
<a class="item" tag="">
|
||||
<i class="remove icon"></i> HTTP over Websocket
|
||||
</a>
|
||||
<div class="ui divider menudivider">Others</div>
|
||||
<a class="item" tag="utm">
|
||||
<i class="green time icon"></i> Uptime Monitor
|
||||
</a>
|
||||
<a class="item" tag="">
|
||||
<i class="remove icon"></i> Network Tools
|
||||
</a>
|
||||
<a class="item" tag="utils">
|
||||
<i class="grey paperclip icon"></i> Utilities
|
||||
</a>
|
||||
<!-- Add more components here -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="contentWindow">
|
||||
<!-- Status Tab -->
|
||||
<div id="status" class="functiontab" target="status.html" style="display: block ;">
|
||||
<br><br><div class="ui active centered inline loader"></div>
|
||||
</div>
|
||||
|
||||
<!-- Virtual Directory Tab -->
|
||||
<div id="vdir" class="functiontab" target="vdir.html"></div>
|
||||
|
||||
<!-- Subdomain Proxy -->
|
||||
<div id="subd" class="functiontab" target="subd.html"></div>
|
||||
|
||||
<!-- Create Rules -->
|
||||
<div id="rules" class="functiontab" target="rules.html"></div>
|
||||
|
||||
<!-- Set proxy root -->
|
||||
<div id="setroot" class="functiontab" target="rproot.html"></div>
|
||||
|
||||
<!-- Set TLS cert -->
|
||||
<div id="cert" class="functiontab" target="cert.html"></div>
|
||||
|
||||
<!-- Redirections -->
|
||||
<div id="redirectset" class="functiontab" target="redirection.html"></div>
|
||||
|
||||
<!-- Blacklist -->
|
||||
<div id="blacklist" class="functiontab" target="blacklist.html"></div>
|
||||
|
||||
<!-- UPnP based port fowarding -->
|
||||
<div id="upnp" class="functiontab" target="upnp.html"></div>
|
||||
|
||||
<!-- Up Time Monitor -->
|
||||
<div id="utm" class="functiontab" target="uptime.html"></div>
|
||||
|
||||
<!-- Utilities -->
|
||||
<div id="utils" class="functiontab" target="utils.html"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui container" style="color: grey; font-size: 90%">
|
||||
<p>CopyRight Zoraxy project and its author, 2022 - <span class="year"></span></p>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
<script>
|
||||
$(".year").text(new Date().getFullYear());
|
||||
/*
|
||||
Loader function
|
||||
|
||||
Load all the components view from the
|
||||
components/ directory into their corrisponding divs
|
||||
*/
|
||||
let loadingComponents = 0;
|
||||
function initTabs(callback=undefined){
|
||||
$('.functiontab').each(function(){
|
||||
let loadTarget = $(this).attr("target");
|
||||
if (loadTarget != undefined){
|
||||
$(this).load("./components/" + loadTarget, function(){
|
||||
loadingComponents--;
|
||||
});
|
||||
loadingComponents++;
|
||||
}else{
|
||||
$(this).html(`<p>Unable to load components for this tab</p>`);
|
||||
}
|
||||
})
|
||||
if (callback != undefined){
|
||||
waitInit(callback);
|
||||
}
|
||||
}
|
||||
|
||||
function waitInit(callback = undefined, retryCount = 0){
|
||||
if (loadingComponents > 0 && retryCount < 5){
|
||||
setTimeout(function(){
|
||||
waitInit(callback, retryCount++);
|
||||
}, 300);
|
||||
}else if (loadingComponents == 0){
|
||||
callback();
|
||||
}else{
|
||||
alert("Missing component. Please check if your installation is complete.")
|
||||
}
|
||||
}
|
||||
|
||||
initTabs(function(){
|
||||
initRPStaste();
|
||||
|
||||
if (window.location.hash.length > 1){
|
||||
let tabID = window.location.hash.substr(1);
|
||||
openTabById(tabID);
|
||||
}else{
|
||||
openTabById("status");
|
||||
}
|
||||
$(".ui.dropdown").dropdown();
|
||||
$(".ui.checkbox").checkbox();
|
||||
|
||||
//Click on the current tab
|
||||
$("#mainmenu").find(".item").each(function(){
|
||||
$(this).on("click", function(event){
|
||||
let tabid = $(this).attr("tag");
|
||||
openTabById(tabid);
|
||||
});
|
||||
});
|
||||
|
||||
//Initialize all table that is sortable
|
||||
$('table').tablesort();
|
||||
});
|
||||
|
||||
function logout() {
|
||||
$.get("/api/auth/logout", function(response) {
|
||||
if (response === "OK") {
|
||||
window.location.href = "/";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getTabButtonById(targetTabId){
|
||||
let targetTabBtn = undefined;
|
||||
$("#mainmenu").find(".item").each(function(){
|
||||
let tabid = $(this).attr("tag");
|
||||
|
||||
if (tabid == targetTabId){
|
||||
targetTabBtn = $(this);
|
||||
}
|
||||
});
|
||||
|
||||
return targetTabBtn;
|
||||
}
|
||||
|
||||
//Select and open a tab by its tag id
|
||||
function openTabById(tabID){
|
||||
let targetBtn = getTabButtonById(tabID);
|
||||
if (targetBtn == undefined){
|
||||
alert("Invalid tabid given");
|
||||
return;
|
||||
}
|
||||
if (window.innerWidth < 750){
|
||||
//RWD mode, hide toolbar
|
||||
$(".toolbar").fadeOut('fast');
|
||||
}
|
||||
|
||||
$("#mainmenu").find(".item").removeClass("active");
|
||||
$(targetBtn).addClass("active");
|
||||
$(".functiontab").hide();
|
||||
$("#" + tabID).fadeIn('fast');
|
||||
$('html,body').animate({scrollTop: 0}, 'fast');
|
||||
window.location.hash = tabID;
|
||||
}
|
||||
|
||||
$(window).on("resize", function(){
|
||||
if (window.innerWidth >= 750 && $(".toolbar").is(":visible") == false){
|
||||
$(".toolbar").show();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user