This commit is contained in:
wujiawei 2023-09-05 18:06:10 +08:00
parent 6cb17fbd58
commit 553f06dbed
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,8 @@
package com.luck.client;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class ClientStart {
public static void main(String[] args) throws Exception {
@ -11,6 +14,7 @@ public class ClientStart {
Constant.serverPort = serverPort;
Constant.realPort = realPort;
}
log.info(" 服务端地址: " + Constant.serverIp + " 服务端端口:" + Constant.serverPort + "\n 真实端口: " + Constant.realPort);
// 连接代理服务
ProxySocket.connectProxyServer();
}

View File

@ -1,6 +1,9 @@
package com.luck.server;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class ServerStart {
public static void main(String[] args) throws Exception {
if (null != args && args.length == 2) {
@ -9,6 +12,7 @@ public class ServerStart {
Constant.visitorPort = visitorPort;
Constant.serverPort = serverPort;
}
log.info(" 服务代理端口: " + Constant.visitorPort + " 服务端端口:" + Constant.serverPort);
// 启动访客服务端用于接收访客请求
VisitorSocket.startServer();
// 启动代理服务端用于接收客户端请求