瀏覽代碼

if 443 not available fallback to 51821

abhishek9686 3 月之前
父節點
當前提交
53c2156c22
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      logic/hosts.go

+ 3 - 0
logic/hosts.go

@@ -566,6 +566,9 @@ func CheckHostPorts(h *models.Host) {
 	}
 	// iterate until port is not found or max iteration is reached
 	for i := 0; portsInUse[h.ListenPort] && i < maxPort-minPort+1; i++ {
+		if h.ListenPort == 443 {
+			h.ListenPort = 51821
+		}
 		h.ListenPort++
 		if h.ListenPort > maxPort {
 			h.ListenPort = minPort