mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-06 13:27:55 +08:00
[fix] 流量访问、添加下步计划内网渗透
This commit is contained in:
parent
c9798d7289
commit
ee6cafa8f2
13
version.md
13
version.md
@ -4,8 +4,19 @@
|
||||
[fix] 添加配置spring.lazy.netty.enable 控制是否开启客户端默认是自动连接服务端的 需要手动关闭
|
||||
|
||||
|
||||
#### 1.2.7-JDK17-SNAPSHOT
|
||||
#### 1.2.6-JDK17-SNAPSHOT
|
||||
[fix] 客户端添加按钮删除
|
||||
[fix] 修改浏览器title内网穿透
|
||||
[fix] HandleChannelTypeAdvanced 添加权重 order 越小越靠前
|
||||
[fix] 新增网络映射新增、修改、删除、自动变更
|
||||
|
||||
#### 1.2.7-JDK17-SNAPSHOT
|
||||
[fix] 修复网络流量统计,同步线程导致io阻塞问题
|
||||
[fix] 修改默认读缓冲区大小2M,写缓冲区大小1M
|
||||
[fix] 操作系统默认读写缓冲区大小212992(cat /proc/sys/net/core/wmem_max 、cat /proc/sys/net/core/rmem_max、cat /proc/sys/net/core/wmem_default、 cat /proc/sys/net/core/rmem_default ),通过如下命令进行修改
|
||||
sudo sysctl -w net.core.rmem_default=4194304
|
||||
sudo sysctl -w net.core.rmem_max=4194304
|
||||
sudo sysctl -w net.core.wmem_default=4194304
|
||||
sudo sysctl -w net.core.wmem_max=4194304
|
||||
[fix] 修复下线客户端、删除映射无法刷新问题
|
||||
#### 下一版本计划内网渗透
|
@ -31,8 +31,6 @@ public class VisitorFilter extends DebugChannelInitializer<SocketChannel> {
|
||||
@Override
|
||||
protected void initChannel0(SocketChannel ch) throws Exception {
|
||||
ChannelPipeline pipeline = ch.pipeline();
|
||||
ch.config().setReceiveBufferSize(1024 * 1024);
|
||||
ch.config().setSendBufferSize(1024 * 1024);
|
||||
pipeline.addLast(new ChannelDuplexHandler());
|
||||
pipeline.addLast(new VisitorHandler(internalNetworkPenetrationRealClient, channelFlowAdapter));
|
||||
}
|
||||
|
@ -114,9 +114,20 @@ public interface LazyVisitorPortPerDayFlowApplication {
|
||||
*/
|
||||
Result<LazyClientPortFlowPerDayEchartsDTO> findClient7DayFlow();
|
||||
|
||||
/**
|
||||
* 获取客户流量数据
|
||||
* @param dayLength 天数
|
||||
* @param clientIds 客户端
|
||||
* @return
|
||||
*/
|
||||
|
||||
Result<LazyClientPortFlowPerDayEchartsDTO> findClientDayFlow(int dayLength, List<String> clientIds);
|
||||
|
||||
/**
|
||||
* 获取客户流量数据
|
||||
* @return
|
||||
*/
|
||||
Result<LazyClientFlowPerDayEchartsDTO> findClientPerDayFlow();
|
||||
|
||||
|
||||
}
|
@ -181,10 +181,27 @@ public class LazyVisitorPortPerDayFlowApplicationImpl implements LazyVisitorPort
|
||||
@Override
|
||||
public Result<LazyClientPortFlowPerDayEchartsDTO> findClient7DayFlow() {
|
||||
|
||||
int dayLength = 7;
|
||||
|
||||
LazyNettyClientState lazyNettyClientState = new LazyNettyClientState();
|
||||
String serverId = serverNodeProperties.getNodeId();
|
||||
|
||||
lazyNettyClientState.setServerId(serverId);
|
||||
return findClientDayFlow(dayLength, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户流量数据
|
||||
*
|
||||
* @param dayLength 天数
|
||||
* @param clientIds 客户端
|
||||
* @return
|
||||
*/
|
||||
|
||||
@Override
|
||||
public Result<LazyClientPortFlowPerDayEchartsDTO> findClientDayFlow(int dayLength, List<String> clientIds) {
|
||||
LazyClientPortFlowPerDayEchartsDTO lazyClientPortFlowPerDayEchartsDTO = new LazyClientPortFlowPerDayEchartsDTO();
|
||||
|
||||
|
||||
int dayLength = 7;
|
||||
// 流量日期
|
||||
List<String> dayList = Stream.iterate(1, n -> n + 1).limit(dayLength).map(index -> {
|
||||
LocalDate minus = LocalDate.now().minusDays(dayLength - index);
|
||||
@ -196,11 +213,14 @@ public class LazyVisitorPortPerDayFlowApplicationImpl implements LazyVisitorPort
|
||||
|
||||
lazyNettyClientState.setServerId(serverId);
|
||||
// 客户端ID
|
||||
List<String> clientIdList = lazyNettyClientStateRepository.findList(lazyNettyClientState)
|
||||
if (ObjectUtils.isEmpty(clientIds)) {
|
||||
// 客户端ID
|
||||
clientIds = lazyNettyClientStateRepository.findList(lazyNettyClientState)
|
||||
.applyOther(nettyClientStates -> nettyClientStates
|
||||
.stream().map(LazyNettyClientState::getClientId)
|
||||
.toList());
|
||||
lazyClientPortFlowPerDayEchartsDTO.setClientIdList(clientIdList);
|
||||
}
|
||||
lazyClientPortFlowPerDayEchartsDTO.setClientIdList(clientIds);
|
||||
LazyVisitorPortPerDayFlow lazyVisitorPortPerDayFlow1 = new LazyVisitorPortPerDayFlow();
|
||||
lazyVisitorPortPerDayFlow1.setServerId(serverId);
|
||||
List<LazyVisitorPortPerDayFlow> lazyVisitorPortPerDayFlowList = lazyVisitorPortPerDayFlowRepository.findList(lazyVisitorPortPerDayFlow1)
|
||||
|
@ -10,6 +10,8 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.wu.framework.web.response.Result;
|
||||
import org.wu.framework.web.spring.EasyController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* describe 每日统计流量
|
||||
*
|
||||
@ -36,6 +38,18 @@ public class LazyVisitorPortPerDayFlowProvider {
|
||||
return lazyVisitorPortPerDayFlowApplication.findClient7DayFlow();
|
||||
}
|
||||
|
||||
/**
|
||||
* describe 获取客户流量数据
|
||||
*
|
||||
* @author Jia wei Wu
|
||||
**/
|
||||
|
||||
@Operation(summary = "获取客户流量数据")
|
||||
@GetMapping("/findClientDayFlow")
|
||||
public Result<LazyClientPortFlowPerDayEchartsDTO> findClientPortDayFlow(int dayLength, List<String> clientIds) {
|
||||
return lazyVisitorPortPerDayFlowApplication.findClientDayFlow(dayLength,clientIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户流量数据
|
||||
* @return
|
||||
|
@ -4,8 +4,10 @@ spring:
|
||||
client:
|
||||
# inet-host: 124.222.48.62
|
||||
# inet-port: 32647
|
||||
inet-host: 127.0.0.1
|
||||
inet-port: 7001
|
||||
inet-host: 124.222.152.160
|
||||
inet-port: 30560
|
||||
# inet-host: 127.0.0.1
|
||||
# inet-port: 7001
|
||||
inet-path: wu-lazy-cloud-heartbeat-server
|
||||
client-id: wujiawei # 客户端ID
|
||||
# inet-host: 124.222.48.62 # 服务端地址
|
||||
|
Loading…
x
Reference in New Issue
Block a user