mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-01 13:17:21 +02:00
Added http proxy list link port
- Added port number and http proto to http proxy list link #635
This commit is contained in:
parent
76e2861fea
commit
0c8dfd8aa0
@ -57,7 +57,7 @@ func GetRequesterIP(r *http.Request) string {
|
|||||||
//e.g. [15c4:cbb4:cc98:4291:ffc1:3a46:06a1:51a7]
|
//e.g. [15c4:cbb4:cc98:4291:ffc1:3a46:06a1:51a7]
|
||||||
requesterRawIp = requesterRawIp[1 : len(requesterRawIp)-1]
|
requesterRawIp = requesterRawIp[1 : len(requesterRawIp)-1]
|
||||||
}
|
}
|
||||||
|
|
||||||
return requesterRawIp
|
return requesterRawIp
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ func MatchIpCIDR(ip string, cidr string) bool {
|
|||||||
if i := strings.Index(ip, "%"); i != -1 {
|
if i := strings.Index(ip, "%"); i != -1 {
|
||||||
ip = ip[:i]
|
ip = ip[:i]
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse the CIDR string
|
// parse the CIDR string
|
||||||
_, cidrnet, err := net.ParseCIDR(cidr)
|
_, cidrnet, err := net.ParseCIDR(cidr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -47,10 +47,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui small input" style="width: 300px; height: 38px;">
|
<div class="ui small input" style="width: 300px; height: 38px;">
|
||||||
<!-- Prevent the browser from filling the saved Zoraxy login account into the input searchInput below -->
|
<!-- Prevent the browser from filling the saved Zoraxy login account into the input searchInput below -->
|
||||||
<input type="password" autocomplete="off" hidden/>
|
<input type="password" autocomplete="off" hidden/>
|
||||||
<input type="text" id="searchInput" placeholder="Quick Search" onkeydown="handleSearchInput(event);" onchange="handleSearchInput(event);" onblur="handleSearchInput(event);">
|
<input type="text" id="searchInput" placeholder="Quick Search" onkeydown="handleSearchInput(event);" onchange="handleSearchInput(event);" onblur="handleSearchInput(event);">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -144,12 +144,23 @@
|
|||||||
if (subd.Disabled){
|
if (subd.Disabled){
|
||||||
enableChecked = "";
|
enableChecked = "";
|
||||||
}
|
}
|
||||||
|
let httpProto = "http://";
|
||||||
|
if ($("#tls").checkbox("is checked")) {
|
||||||
|
httpProto = "https://";
|
||||||
|
} else {
|
||||||
|
httpProto = "http://";
|
||||||
|
}
|
||||||
|
let hostnameRedirectPort = currentListeningPort;
|
||||||
|
if (hostnameRedirectPort == 80 || hostnameRedirectPort == 443){
|
||||||
|
hostnameRedirectPort = "";
|
||||||
|
}else{
|
||||||
|
hostnameRedirectPort = ":" + hostnameRedirectPort;
|
||||||
|
}
|
||||||
let aliasDomains = ``;
|
let aliasDomains = ``;
|
||||||
if (subd.MatchingDomainAlias != undefined && subd.MatchingDomainAlias.length > 0){
|
if (subd.MatchingDomainAlias != undefined && subd.MatchingDomainAlias.length > 0){
|
||||||
aliasDomains = `<small class="aliasDomains" eptuuid="${subd.RootOrMatchingDomain}" style="color: #636363;">Alias: `;
|
aliasDomains = `<small class="aliasDomains" eptuuid="${subd.RootOrMatchingDomain}" style="color: #636363;">Alias: `;
|
||||||
subd.MatchingDomainAlias.forEach(alias => {
|
subd.MatchingDomainAlias.forEach(alias => {
|
||||||
aliasDomains += `<a href="//${alias}" target="_blank">${alias}</a>, `;
|
aliasDomains += `<a href="${httpProto}${alias}${hostnameRedirectPort}" target="_blank">${alias}</a>, `;
|
||||||
});
|
});
|
||||||
aliasDomains = aliasDomains.substr(0, aliasDomains.length - 2); //Remove the last tailing seperator
|
aliasDomains = aliasDomains.substr(0, aliasDomains.length - 2); //Remove the last tailing seperator
|
||||||
aliasDomains += `</small><br>`;
|
aliasDomains += `</small><br>`;
|
||||||
@ -157,7 +168,7 @@
|
|||||||
|
|
||||||
$("#httpProxyList").append(`<tr eptuuid="${subd.RootOrMatchingDomain}" payload="${subdData}" class="subdEntry">
|
$("#httpProxyList").append(`<tr eptuuid="${subd.RootOrMatchingDomain}" payload="${subdData}" class="subdEntry">
|
||||||
<td data-label="" editable="true" datatype="inbound">
|
<td data-label="" editable="true" datatype="inbound">
|
||||||
<a href="//${subd.RootOrMatchingDomain}" target="_blank">${subd.RootOrMatchingDomain}</a> ${inboundTlsIcon}<br>
|
<a href="${httpProto}${subd.RootOrMatchingDomain}${hostnameRedirectPort}" target="_blank">${subd.RootOrMatchingDomain}</a> ${inboundTlsIcon}<br>
|
||||||
${aliasDomains}
|
${aliasDomains}
|
||||||
<small class="accessRuleNameUnderHost" ruleid="${subd.AccessFilterUUID}"></small>
|
<small class="accessRuleNameUnderHost" ruleid="${subd.AccessFilterUUID}"></small>
|
||||||
</td>
|
</td>
|
||||||
|
@ -524,7 +524,6 @@
|
|||||||
$("#tls").checkbox("set checked");
|
$("#tls").checkbox("set checked");
|
||||||
}else{
|
}else{
|
||||||
$(".tlsEnabledOnly").addClass('disabled');
|
$(".tlsEnabledOnly").addClass('disabled');
|
||||||
$(".tlsEnabledOnly").addClass('disabled');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Initiate the input listener on the checkbox
|
//Initiate the input listener on the checkbox
|
||||||
|
Loading…
x
Reference in New Issue
Block a user