panel apperance, added experimental tcp/udp proxy support, slight performance improvement for http proxy

This commit is contained in:
yusing
2024-03-02 17:02:11 +08:00
parent 12e23c3517
commit 9cb1b1d31a
21 changed files with 865 additions and 207 deletions

View File

@@ -7,7 +7,7 @@
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background-color: #343a40;
background-color: #131516;
color: #ffffff;
}
@@ -38,6 +38,10 @@
border-bottom-right-radius: 10px;
}
table caption {
color: antiquewhite;
}
.health-circle {
height: 15px;
width: 15px;
@@ -83,33 +87,65 @@
</script>
</head>
<body>
<body class="m-3">
<div class="container">
<h1 style="color: #ffffff;">Route Panel</h1>
<table class="table table-striped table-dark w-auto">
<thead>
<tr>
<th>Subdomain</th>
<th>Path</th>
<th>URL</th>
<th>Health</th>
</tr>
</thead>
<tbody>
{{range $subdomain, $routes := .}}
{{range $route := $routes.Iter}}
<tr>
<td>{{$subdomain}}</td>
<td>{{$route.Path}}</td>
<td>{{$route.Url.String}}</td>
<td class="align-middle">
<div class="health-circle"></div>
</td> <!-- Health column -->
</tr>
{{end}}
{{end}}
</tbody>
</table>
<h1 class="text-success">
Route Panel
</h1>
<div class="row">
<div class="table-responsive col-md-6">
<table class="table table-striped table-dark caption-top w-auto">
<caption>HTTP Proxies</caption>
<thead>
<tr>
<th>Alias</th>
<th>Path</th>
<th>URL</th>
<th>Health</th>
</tr>
</thead>
<tbody>
{{range $alias, $httpRoutes := .HTTPRoutes}}
{{range $route := $httpRoutes}}
<tr>
<td>{{$alias}}</td>
<td>{{$route.Path}}</td>
<td>{{$route.Url.String}}</td>
<td class="align-middle">
<div class="health-circle"></div>
</td> <!-- Health column -->
</tr>
{{end}}
{{end}}
</tbody>
</table>
</div>
<div class="table-responsive col-md-6">
<table class="table table-striped table-dark caption-top w-auto">
<caption>Streams</caption>
<thead>
<tr>
<th>Alias</th>
<th>Source</th>
<th>Target</th>
<th>Health</th>
</tr>
</thead>
<tbody>
{{range $_, $route := .StreamRoutes}}
<tr>
<td>{{$route.Alias}}</td>
<td>{{$route.ListeningUrl}}</td>
<td>{{$route.TargetUrl}}</td>
<td class="align-middle">
<div class="health-circle"></div>
</td> <!-- Health column -->
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
</div>
</body>