소스 검색

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