Skip to content

Commit bc13b63

Browse files
committed
feat: release 80/443 port
1 parent e05784e commit bc13b63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/caddy/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ export class CaddyInstant {
175175
if (!this.inited)
176176
await this.init()
177177

178-
if (await tryPort(443))
178+
if (https && await tryPort(443))
179179
await kill(443, 'tcp')
180-
if (process.platform === 'win32' && await tryPort(80))
180+
if ((process.platform === 'win32' || !https) && await tryPort(80))
181181
await kill(80, 'tcp')
182182

183183
if (!await this.updateHost(source.split(':')[0], target.split(':')[0]))

0 commit comments

Comments
 (0)