diff --git a/src/mod/netutils/ipmatch.go b/src/mod/netutils/ipmatch.go index b5f6ff4..942bf56 100644 --- a/src/mod/netutils/ipmatch.go +++ b/src/mod/netutils/ipmatch.go @@ -57,7 +57,7 @@ func GetRequesterIP(r *http.Request) string { //e.g. [15c4:cbb4:cc98:4291:ffc1:3a46:06a1:51a7] requesterRawIp = requesterRawIp[1 : len(requesterRawIp)-1] } - + return requesterRawIp } @@ -91,7 +91,7 @@ func MatchIpCIDR(ip string, cidr string) bool { if i := strings.Index(ip, "%"); i != -1 { ip = ip[:i] } - + // parse the CIDR string _, cidrnet, err := net.ParseCIDR(cidr) if err != nil { diff --git a/src/web/components/httprp.html b/src/web/components/httprp.html index 272a420..1a9d653 100644 --- a/src/web/components/httprp.html +++ b/src/web/components/httprp.html @@ -47,10 +47,10 @@ -
+
- +
@@ -144,12 +144,23 @@ if (subd.Disabled){ 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 = ``; if (subd.MatchingDomainAlias != undefined && subd.MatchingDomainAlias.length > 0){ aliasDomains = `Alias: `; subd.MatchingDomainAlias.forEach(alias => { - aliasDomains += `${alias}, `; + aliasDomains += `${alias}, `; }); aliasDomains = aliasDomains.substr(0, aliasDomains.length - 2); //Remove the last tailing seperator aliasDomains += `
`; @@ -157,7 +168,7 @@ $("#httpProxyList").append(` - ${subd.RootOrMatchingDomain} ${inboundTlsIcon}
+ ${subd.RootOrMatchingDomain} ${inboundTlsIcon}
${aliasDomains} diff --git a/src/web/components/status.html b/src/web/components/status.html index affaaf8..09910ea 100644 --- a/src/web/components/status.html +++ b/src/web/components/status.html @@ -524,7 +524,6 @@ $("#tls").checkbox("set checked"); }else{ $(".tlsEnabledOnly").addClass('disabled'); - $(".tlsEnabledOnly").addClass('disabled'); } //Initiate the input listener on the checkbox