增加启动xtcp frpc功能

This commit is contained in:
Administrator
2023-01-01 16:20:40 +08:00
parent 1af088a29d
commit 62b22410a3
90 changed files with 11649 additions and 11459 deletions
@@ -47,7 +47,6 @@ public class KLALBServer {
tcc.setTunnel(tll);
UUID uid=new UUID(din.readLong(),din.readLong());
System.out.println(uid);
IOThreadManager nx = null;
synchronized (tcpl) {
if(whm.containsKey(uid)) {
@@ -57,9 +56,14 @@ public class KLALBServer {
IOThreadManager n1=nx;
nx.getCore().setAcceptSYN((b)->{
try {
STJson stj=new STJson(gjso.get());
if(!stj.checkSafety(b.lipport)) {
System.out.println("未授权的请求:"+b.lipport);
return false;
}
Socket soc=new Socket(b.lipport.getIp(),b.lipport.getPort());
LocalTCPConnection ltc=new LocalTCPConnection(soc, b.cuid);
ThreadTool.makeVThreadIfSupport("局域网连接监视线程", ()->{
ThreadTool.makeVThreadIfSupport("局域网连接监视线程", ()->{
try {
n1.handleLocal(ltc, false);
}finally {
@@ -68,7 +72,7 @@ public class KLALBServer {
}).start();
return true;
} catch (IOException e) {
System.out.println("连接本地服务"+b.lipport+"失败,请检查你的本地服务");
System.out.println("连接本地服务"+b.lipport+"失败,请检查你的本地服务");
e.printStackTrace();
}
return false;