Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mid-service
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
mid-service
Commits
776f1c14
Commit
776f1c14
authored
Jan 16, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改pom文件
parent
050bb8e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/main/java/com/mortals/xhx/daemon/applicationservice/CaptureStartedService.java
.../xhx/daemon/applicationservice/CaptureStartedService.java
+7
-5
No files found.
src/main/java/com/mortals/xhx/daemon/applicationservice/CaptureStartedService.java
View file @
776f1c14
...
@@ -45,13 +45,15 @@ public class CaptureStartedService implements IApplicationStartedService {
...
@@ -45,13 +45,15 @@ public class CaptureStartedService implements IApplicationStartedService {
String
localHost
=
"127.0.0.1"
;
String
localHost
=
"127.0.0.1"
;
List
<
PcapAddress
>
addresses
=
device
.
getAddresses
();
List
<
PcapAddress
>
addresses
=
device
.
getAddresses
();
Boolean
bool
=
false
;
Boolean
bool
=
false
;
String
ip
=
""
;
boolean
ipv4
=
false
;
for
(
PcapAddress
pcapAddress
:
addresses
)
{
for
(
PcapAddress
pcapAddress
:
addresses
)
{
// 获取网卡IP地址
// 获取网卡IP地址
String
ip
=
pcapAddress
.
getAddress
().
getHostAddress
();
ip
=
pcapAddress
.
getAddress
().
getHostAddress
();
//log.info("device"+JSON.toJSONString(device) + " ip:" + ip+" is local ipw:"+ JSON.toJSONString( NetUtil.localIps()));
//log.info("device"+JSON.toJSONString(device) + " ip:" + ip+" is local ipw:"+ JSON.toJSONString( NetUtil.localIps()));
//非本地网卡
//非本地网卡
boolean
ipv4
=
Validator
.
isIpv4
(
ip
);
ipv4
=
Validator
.
isIpv4
(
ip
);
log
.
info
(
"ip:{}, is ipv4:{}"
,
ip
,
ipv4
);
log
.
info
(
"ip:{}, is ipv4:{}"
,
ip
,
ipv4
);
if
(
ip
!=
null
&&
ip
.
contains
(
localHost
))
{
if
(
ip
!=
null
&&
ip
.
contains
(
localHost
))
{
bool
=
true
;
bool
=
true
;
break
;
break
;
...
@@ -78,7 +80,7 @@ public class CaptureStartedService implements IApplicationStartedService {
...
@@ -78,7 +80,7 @@ public class CaptureStartedService implements IApplicationStartedService {
//获取窗口id 默认值为0
//获取窗口id 默认值为0
windowId
=
props
.
getInt
(
"windowId"
,
0
);
windowId
=
props
.
getInt
(
"windowId"
,
0
);
}
}
//log.info("deviceName:{},ip:{}, is ipv4:{}",device.getName(),ip ,
ipv4);
log
.
info
(
"start deviceName:{},ip:{}, is ipv4:{}"
,
device
.
getName
(),
ip
,
ipv4
);
Map
<
String
,
Set
<
String
>>
filterMap
=
DestInfo
.
build
();
Map
<
String
,
Set
<
String
>>
filterMap
=
DestInfo
.
build
();
//String redirectUrl = "";
//String redirectUrl = "";
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment