|
@@ -76,7 +76,7 @@
|
|
<th>Remove</th>
|
|
<th>Remove</th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
- <tbody>
|
|
|
|
|
|
+ <tbody id="vdirList">
|
|
<tr>
|
|
<tr>
|
|
<td data-label="">test</td>
|
|
<td data-label="">test</td>
|
|
<td data-label="">test</td>
|
|
<td data-label="">test</td>
|
|
@@ -96,7 +96,7 @@
|
|
<th>Remove</th>
|
|
<th>Remove</th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
- <tbody>
|
|
|
|
|
|
+ <tbody id="subdList">
|
|
|
|
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
@@ -125,14 +125,15 @@
|
|
<input type="text" name="first-name" placeholder="First Name">
|
|
<input type="text" name="first-name" placeholder="First Name">
|
|
<div class="ui message">
|
|
<div class="ui message">
|
|
Example of subdomain matching keyword:<br>
|
|
Example of subdomain matching keyword:<br>
|
|
- <code>s1.arozos.com</code> (Any access starting with s1.arozos.com will be proxy to the IP address below)<br>
|
|
|
|
|
|
+ <code>s1.arozos.com</code> <br>(Any access starting with s1.arozos.com will be proxy to the IP address below)<br>
|
|
Example of virtual directory name: <br>
|
|
Example of virtual directory name: <br>
|
|
- <code>s1</code> (Any access to {this_server}/s1/ will be proxy to the IP address below)
|
|
|
|
|
|
+ <code>/s1/home</code> <br>(Any access to {this_server}/s1/ will be proxy to the IP address below)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<div class="field">
|
|
- <label>Last Name</label>
|
|
|
|
|
|
+ <label>IP Address or Domain Name with port</label>
|
|
<input type="text" name="last-name" placeholder="Last Name">
|
|
<input type="text" name="last-name" placeholder="Last Name">
|
|
|
|
+ <small>E.g. 192.168.0.101:8000 or example.com</small>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<button class="ui teal button" type="submit">Create Proxy Endpoint</button>
|
|
<button class="ui teal button" type="submit">Create Proxy Endpoint</button>
|
|
@@ -208,6 +209,65 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //Virtual directories functions
|
|
|
|
+ listVdirs();
|
|
|
|
+ function listVdirs(){
|
|
|
|
+ $("#vdirList").html(``);
|
|
|
|
+ $.get("list?type=vdir", function(data){
|
|
|
|
+ if (data.error !== undefined){
|
|
|
|
+ $("#vdirList").append(`<tr>
|
|
|
|
+ <td data-label="" colspan="3"><i class="remove icon"></i> ${data.error}</td>
|
|
|
|
+ </tr>`);
|
|
|
|
+ }else if (data.length == 0){
|
|
|
|
+ $("#vdirList").append(`<tr>
|
|
|
|
+ <td data-label="" colspan="3"><i class="question icon"></i> No Virtual Directory Record</td>
|
|
|
|
+ </tr>`);
|
|
|
|
+ }else{
|
|
|
|
+ data.forEach(vdir => {
|
|
|
|
+ let tlsIcon = "";
|
|
|
|
+ if (vdir.RequireTLS){
|
|
|
|
+ tlsIcon = `<i class="lock icon"></i>`;
|
|
|
|
+ }
|
|
|
|
+ $("#vdirList").append(`<tr>
|
|
|
|
+ <td data-label="">${vdir.Root}</td>
|
|
|
|
+ <td data-label="">${vdir.Domain} ${tlsIcon}</td>
|
|
|
|
+ <td data-label=""><button class="ui circular mini red basic button"><i class="remove icon"></i> Remove Vdir</button></td>
|
|
|
|
+ </tr>`);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ initSubdomainProxy();
|
|
|
|
+ function initSubdomainProxy(){
|
|
|
|
+ $("#subdList").html(``);
|
|
|
|
+ $.get("list?type=subd", function(data){
|
|
|
|
+ if (data.error !== undefined){
|
|
|
|
+ $("#subdList").append(`<tr>
|
|
|
|
+ <td data-label="" colspan="3"><i class="remove icon"></i> ${data.error}</td>
|
|
|
|
+ </tr>`);
|
|
|
|
+ }else if (data.length == 0){
|
|
|
|
+ $("#subdList").append(`<tr>
|
|
|
|
+ <td data-label="" colspan="3"><i class="question icon"></i> No Subdomain Proxy Record</td>
|
|
|
|
+ </tr>`);
|
|
|
|
+ }else{
|
|
|
|
+ data.forEach(subd => {
|
|
|
|
+ let tlsIcon = "";
|
|
|
|
+ if (subd.RequireTLS){
|
|
|
|
+ tlsIcon = `<i class="lock icon"></i>`;
|
|
|
|
+ }
|
|
|
|
+ $("#subdList").append(`<tr>
|
|
|
|
+ <td data-label="">${subd.MatchingDomain}</td>
|
|
|
|
+ <td data-label="">${subd.Domain} ${tlsIcon}</td>
|
|
|
|
+ <td data-label=""><button class="ui circular mini red basic button"><i class="remove icon"></i> Remove Subd</button></td>
|
|
|
|
+ </tr>`);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
function errmsg(message){
|
|
function errmsg(message){
|
|
$("#errmsg").html(`<i class="red remove icon"></i> ${message}`);
|
|
$("#errmsg").html(`<i class="red remove icon"></i> ${message}`);
|
|
$("#errmsg").slideDown('fast').delay(5000).slideUp('fast');
|
|
$("#errmsg").slideDown('fast').delay(5000).slideUp('fast');
|