forked from KNEMC/KLALB
增加启动xtcp frpc功能
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user