From 2b371e073f05c6fe2f038bf40c8129538e7bff09 Mon Sep 17 00:00:00 2001 From: lynn Date: Mon, 30 May 2022 14:04:25 +0800 Subject: [PATCH] u --- .../cn/promptness/rpt/server/executor/RegisterExecutor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rpt-server/src/main/java/cn/promptness/rpt/server/executor/RegisterExecutor.java b/rpt-server/src/main/java/cn/promptness/rpt/server/executor/RegisterExecutor.java index 3757721..fc1ecb1 100644 --- a/rpt-server/src/main/java/cn/promptness/rpt/server/executor/RegisterExecutor.java +++ b/rpt-server/src/main/java/cn/promptness/rpt/server/executor/RegisterExecutor.java @@ -91,6 +91,11 @@ private List fillRemoteResult(ChannelHandlerContext context, Meta meta) } private void registerHttp(ChannelHandlerContext context, Meta meta, RemoteConfig remoteConfig, List domainList, CountDownLatch countDownLatch) { + if (Config.getServerConfig().getHttpPort() == 0 && Config.getServerConfig().getHttpsPort() == 0) { + meta.setConnection(false).addRemoteResult("服务端未开启HTTP穿透功能"); + countDownLatch.countDown(); + return; + } if (!StringUtils.hasText(remoteConfig.getDomain())) { meta.setConnection(false).addRemoteResult(String.format("服务端绑定域名[%s]不合法", remoteConfig.getDomain())); countDownLatch.countDown();