浏览代码

auto update script executed

Toby Chui 1 年之前
父节点
当前提交
85166959cd
共有 3 个文件被更改,包括 36 次插入3 次删除
  1. 24 0
      log/zr_2023-11.log
  2. 9 1
      reverseproxy.go
  3. 3 2
      web/components/rules.html

+ 24 - 0
log/zr_2023-11.log

@@ -151,3 +151,27 @@
 2023-11-25 14:30:40.289262|info             [INFO]mDNS Startup scan completed
 2023-11-25 14:45:40.293781|info             [INFO]mDNS scan result updated
 2023-11-25 15:00:40.301089|info             [INFO]mDNS scan result updated
+2023-11-25 15:40:38.816191|info             [INFO]Starting ACME handler
+2023-11-25 15:40:38.822659|info             [INFO]Serving inbound port 443
+2023-11-25 15:40:38.823184|info             [INFO]TLS mode enabled. Serving proxxy request with TLS
+2023-11-25 15:40:38.823184|info             [INFO]Force latest TLS mode disabled. Minimum TLS version is set to v1.0
+2023-11-25 15:40:38.823184|info             [INFO]Port 80 listener enabled
+2023-11-25 15:40:38.823694|info             [INFO]Force HTTPS mode disabled
+2023-11-25 15:40:39.143750|info             [INFO]Dynamic Reverse Proxy service started
+2023-11-25 15:40:39.328354|info             [INFO]Assigned temporary port:65256
+2023-11-25 15:40:39.328354|info             [INFO]Zoraxy started. Visit control panel at http://localhost:8000
+2023-11-25 15:40:44.757225|info             [INFO]Uptime Monitor background service started
+2023-11-25 15:41:08.804586|info             [INFO]mDNS Startup scan completed
+2023-11-25 15:48:13.805478|info             [INFO]Starting ACME handler
+2023-11-25 15:48:13.811483|info             [INFO]Serving inbound port 443
+2023-11-25 15:48:13.811483|info             [INFO]TLS mode enabled. Serving proxxy request with TLS
+2023-11-25 15:48:13.812484|info             [INFO]Force latest TLS mode disabled. Minimum TLS version is set to v1.0
+2023-11-25 15:48:13.812484|info             [INFO]Port 80 listener enabled
+2023-11-25 15:48:13.812484|info             [INFO]Force HTTPS mode disabled
+2023-11-25 15:48:14.127228|info             [INFO]Dynamic Reverse Proxy service started
+2023-11-25 15:48:14.323206|info             [INFO]Assigned temporary port:51246
+2023-11-25 15:48:14.323206|info             [INFO]Zoraxy started. Visit control panel at http://localhost:8000
+2023-11-25 15:48:19.411092|info             [INFO]Uptime Monitor background service started
+2023-11-25 15:48:26.545543|Uptime           [INFO]Uptime monitor config updated
+2023-11-25 15:48:35.805964|Uptime           [INFO]Uptime monitor config updated
+2023-11-25 15:48:43.795766|info             [INFO]mDNS Startup scan completed

+ 9 - 1
reverseproxy.go

@@ -354,9 +354,15 @@ func ReverseProxyHandleEditEndpoint(w http.ResponseWriter, r *http.Request) {
 	if stv == "" {
 		stv = "false"
 	}
-
 	skipTlsValidation := (stv == "true")
 
+	//Load bypass TLS option
+	bpgtls, _ := utils.PostPara(r, "bpgtls")
+	if bpgtls == "" {
+		bpgtls = "false"
+	}
+	bypassGlobalTLS := (bpgtls == "true")
+
 	rba, _ := utils.PostPara(r, "bauth")
 	if rba == "" {
 		rba = "false"
@@ -376,6 +382,7 @@ func ReverseProxyHandleEditEndpoint(w http.ResponseWriter, r *http.Request) {
 			RootName:             targetProxyEntry.RootOrMatchingDomain,
 			Domain:               endpoint,
 			RequireTLS:           useTLS,
+			BypassGlobalTLS:      false,
 			SkipCertValidations:  skipTlsValidation,
 			RequireBasicAuth:     requireBasicAuth,
 			BasicAuthCredentials: targetProxyEntry.BasicAuthCredentials,
@@ -388,6 +395,7 @@ func ReverseProxyHandleEditEndpoint(w http.ResponseWriter, r *http.Request) {
 			MatchingDomain:       targetProxyEntry.RootOrMatchingDomain,
 			Domain:               endpoint,
 			RequireTLS:           useTLS,
+			BypassGlobalTLS:      bypassGlobalTLS,
 			SkipCertValidations:  skipTlsValidation,
 			RequireBasicAuth:     requireBasicAuth,
 			BasicAuthCredentials: targetProxyEntry.BasicAuthCredentials,

+ 3 - 2
web/components/rules.html

@@ -391,7 +391,6 @@
                         <input type="checkbox" class="SkipCertValidations" ${checkstate}>
                         <label>Skip Verification<br>
                         <small>Check this if proxy target is using self signed certificates</small></label>
-                        
                     </div>
                 `;
                 column.empty().append(input);
@@ -417,7 +416,7 @@
                 column.empty().append(`${originalContent}
                     <div class="ui divider"></div>
                     <div class="ui checkbox" style="margin-top: 0.4em;">
-                        <input type="checkbox" ${payload.BypassGlobalTLS?"checked":""}>
+                        <input type="checkbox" class="BypassGlobalTLS" ${payload.BypassGlobalTLS?"checked":""}>
                         <label>Allow plain HTTP access<br>
                             <small>Allow inbound connections without TLS/SSL</small></label>
                     </div><br>
@@ -453,6 +452,7 @@
         let requireTLS = $(row).find(".RequireTLS")[0].checked;
         let skipCertValidations = $(row).find(".SkipCertValidations")[0].checked;
         let requireBasicAuth = $(row).find(".RequireBasicAuth")[0].checked;
+        let bypassGlobalTLS = $(row).find(".BypassGlobalTLS")[0].checked;
 
         console.log(newDomain, requireTLS, skipCertValidations, requireBasicAuth)
 
@@ -463,6 +463,7 @@
                 "type": epttype,
                 "rootname": uuid,
                 "ep":newDomain,
+                "bpgtls": bypassGlobalTLS,
                 "tls" :requireTLS,
                 "tlsval": skipCertValidations,
                 "bauth" :requireBasicAuth,