parent
0b0ffdfd5c
commit
f170f59866
|
@ -666,4 +666,20 @@ public class demo {
|
||||||
log.info("demoList2 difference demoList1: {}", demoList.equals(demoList2));
|
log.info("demoList2 difference demoList1: {}", demoList.equals(demoList2));
|
||||||
log.info("tmpTable difference tmpTable: {}", tmpTable.equals(tmpTable2));
|
log.info("tmpTable difference tmpTable: {}", tmpTable.equals(tmpTable2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ip port match test.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void ipPortMatchTest() {
|
||||||
|
String[] srcPort = new String[] {"", "80", "443", "81", null};
|
||||||
|
String[] dstPort = new String[] {"", "80", "443", "81", null};
|
||||||
|
|
||||||
|
for(String s : srcPort) {
|
||||||
|
for(String d : dstPort) {
|
||||||
|
log.info("HTTP: [{}] match [{}] is {}", s, d, Helper.isIpPortMatch(s, d, HttpType.HTTP));
|
||||||
|
log.info("HTTPS: [{}] match [{}] is {}", s, d, Helper.isIpPortMatch(s, d, HttpType.HTTPS));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue