1
zj
2024-08-12 11bb86a81c99672e5e51ca7289f49a57346739e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
package project.ddos.internal;
 
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicLong;
 
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
 
import kernel.util.StringUtils;
import project.ddos.CheckIpRequestCountService;
import project.ddos.IpMenuService;
import project.ddos.UrlSpecialService;
import project.ddos.model.IpMenu;
import project.ddos.utils.BlacklistIpSerivceTimeWindow;
import project.ddos.utils.IpLockRequestTimeWindow;
import project.ddos.utils.IpRequestTimeWindow;
import project.ddos.utils.IpSpecialRequestTimeWindow;
import project.ddos.utils.LocklistIpSerivceTimeWindow;
import project.ddos.utils.SystemParaReadRequestTimeWindow;
import project.redis.RedisHandler;
import project.syspara.SysparaService;
 
public class CheckIpRequestCountServiceImpl implements CheckIpRequestCountService, InitializingBean {
    private Logger logger = LoggerFactory.getLogger(CheckIpRequestCountServiceImpl.class);
    private IpRequestTimeWindow ipRequestTimeWindow;
    private IpSpecialRequestTimeWindow ipSpecialRequestTimeWindow;
    private BlacklistIpSerivceTimeWindow blacklistIpSerivceTimeWindow;
 
    private IpLockRequestTimeWindow ipLockRequestTimeWindow;
    private LocklistIpSerivceTimeWindow locklistIpSerivceTimeWindow;
 
    private SystemParaReadRequestTimeWindow systemParaReadRequestTimeWindow;
    private SysparaService sysparaService;
    private IpMenuService ipMenuService;
    private UrlSpecialService urlSpecialService;
    private RedisHandler redisHandler;
 
    /**
     * 是否开启ip检测
     */
    private String request_check_ip;
    /**
     * 验证ip请求数量限制(十分钟内)
     */
    private Integer request_check_ip_count;
    /**
     * 特殊url验证ip请求数量限制(一分钟内)
     */
    private Integer request_check_ip_special_count;
    /**
     * 是否只有白名单才可以访问
     */
    private boolean request_only_white_menu;
//    private String request_check_ip = "false";
//    private Integer request_check_ip_count = 500;
//    private Integer request_check_ip_special_count = 20;
 
    private Map<String, Integer> ipCache = new ConcurrentHashMap<String, Integer>();
    /**
     * 特殊地址ip处理
     */
    private Map<String, Integer> ipSpecialCache = new ConcurrentHashMap<String, Integer>();
    /**
     * 登录相关地址ip请求数,判定锁定处理
     */
    private Map<String, Integer> ipLockCache = new ConcurrentHashMap<String, Integer>();
    /**
     * ip请求数本地缓存,从服务器启动时开始计数
     */
    private Map<String, AtomicLong> ipCountCache = new ConcurrentHashMap<String, AtomicLong>();
    /**
     * ip请求时间本地缓存,从服务器启动时开始
     */
    private Map<String, Date> ipTimeCacheCache = new ConcurrentHashMap<String, Date>();
    /**
     * ip urls请求数本地缓存,从服务器启动时开始计数
     */
    private Map<String, Map<String, AtomicLong>> ipUrlCountCache = new ConcurrentHashMap<String, Map<String, AtomicLong>>();
    /**
     * 登录页相关所需的urls
     */
    private List<String> urls = new ArrayList<String>();
 
    /**
     * ip访问计数
     * 
     * @param ip
     */
    private void ipCount(String ip, String url) {
        AtomicLong atomicLong = ipCountCache.get(ip);
        Map<String, AtomicLong> urlCountMap = ipUrlCountCache.get(ip);
        if (urlCountMap == null) {
            urlCountMap = new ConcurrentHashMap<String, AtomicLong>();
        }
        if (atomicLong == null) {
            atomicLong = new AtomicLong();
            ipTimeCacheCache.put(ip, new Date());
            atomicLong.incrementAndGet();
            ipCountCache.put(ip, atomicLong);
            // 累计url次数
 
            AtomicLong atomicUrlLong = new AtomicLong();
            atomicUrlLong.incrementAndGet();
            urlCountMap.put(url, atomicUrlLong);
            ipUrlCountCache.put(ip, urlCountMap);
        } else {
            atomicLong.incrementAndGet();
            // 累计url次数
            AtomicLong atomicUrlLong = urlCountMap.get(url);
            if (atomicUrlLong == null) {
                atomicUrlLong = new AtomicLong();
                atomicUrlLong.incrementAndGet();
                urlCountMap.put(url, atomicUrlLong);
                ipUrlCountCache.put(ip, urlCountMap);
            } else {
                atomicUrlLong.incrementAndGet();
            }
//            System.out.println("ip:" + ip + ",url:" + url + ",count:" + atomicUrlLong.get());
        }
//        System.out.println("ip:" + ip + ",count:" + atomicLong.get());
    }
 
    /**
     * 是否开启检测功能
     * 
     * @return
     */
    public boolean checkButton() {
        if (StringUtils.isEmptyString(systemParaReadRequestTimeWindow.get("systemParaRead"))) {
            readPara();
            systemParaReadRequestTimeWindow.put("systemParaRead", "1");
        }
        return "true".equals(request_check_ip);
    }
 
    public void readPara() {
        String old_request_check_ip = request_check_ip;
        int old_request_check_ip_count = request_check_ip_count;
        int old_request_check_ip_special_count = request_check_ip_special_count;
        boolean old_request_only_white_menu = request_only_white_menu;
        request_check_ip = sysparaService.find("request_check_ip").getValue();
        request_check_ip_count = sysparaService.find("request_check_ip_count").getInteger();
        request_check_ip_special_count = sysparaService.find("request_check_ip_special_count").getInteger();
        request_only_white_menu = sysparaService.find("request_only_white_menu").getBoolean();
        if (!old_request_check_ip.equals(request_check_ip)) {
            logger.info("request_check_ip 修改,原值:[{}],新值[{}]", old_request_check_ip, request_check_ip);
        }
        if (old_request_check_ip_count != request_check_ip_count) {
            logger.info("request_check_ip_count 修改,原值:[{}],新值[{}]", old_request_check_ip_count, request_check_ip_count);
        }
        if (old_request_check_ip_special_count != request_check_ip_special_count) {
            logger.info("request_check_ip_special_count 修改,原值:[{}],新值[{}]", old_request_check_ip_special_count,
                    request_check_ip_special_count);
        }
        if (old_request_only_white_menu != request_only_white_menu) {
            logger.info("request_only_white_menu 修改,原值:[{}],新值[{}]", old_request_only_white_menu, request_only_white_menu);
        }
 
    }
 
    /**
     * 返回true:ip已被封, false:ip正常
     * 
     * @param ip
     * @return
     */
    @Override
    public boolean chcekIp(String ip, String url) {
//        String request_check_ip = sysparaService.find("request_check_ip").getValue();
//        Integer request_check_ip_count = sysparaService.find("request_check_ip_count").getInteger();
        if (!"true".equals(request_check_ip))
            return false;// 不为1时 未开启,直接返回false不做处理
        ipCount(ip, url);
        IpMenu ipMenu = ipMenuService.cacheByIp(ip);
        if (ipMenu != null && ipMenu.getDelete_status() != -1 && IpMenu.IP_WHITE.equals(ipMenu.getType())) {// 白名单直接过
            return false;
        } else if (request_only_white_menu) {
            return true;
        }
        if (checkLockUrl(ip, url)) {// 先判断是否锁定
            return true;
        }
        if (blacklistIpSerivceTimeWindow.getBlackIp(ip) != null)
            return true;// ip被封,不发送
        if (ipMenu != null && ipMenu.getDelete_status() != -1 && IpMenu.IP_BLACK.equals(ipMenu.getType())) {// 黑名单已过期的
            ipMenu.setDelete_status(-1);
            ipMenuService.update(ipMenu);
        }
        if (ipRequestTimeWindow.getIpSend(ip) != null) {
            Integer count = ipCache.get(ip);
//            System.out.println("ip:" + ip + ",count:" + count);
            count++;
            if (count >= request_check_ip_count) {// 从ip发送第一条开始
                // System.out.println("ip:" + ip + ",count:" + count);
//                blacklistIpSerivceTimeWindow.putBlackIp(ip, ip);
                ipCache.remove(ip);
                ipRequestTimeWindow.delIpSend(ip);
 
                if (null == ipMenu) {
                    ipMenu = new IpMenu();
                    ipMenu.setCreate_time(new Date());
                    ipMenu.setDelete_status(0);
                    ipMenu.setLast_opera_time(new Date());
                    ipMenu.setType(IpMenu.IP_BLACK);
                    ipMenu.setIp(ip);
                    ipMenuService.save(ipMenu);
                } else {
                    ipMenu.setDelete_status(0);
                    ipMenu.setLast_opera_time(new Date());
                    ipMenu.setType(IpMenu.IP_BLACK);
                    ipMenuService.update(ipMenu);
                }
                return true;
            } else {
                ipCache.put(ip, count++);
            }
 
        } else {
            ipCache.put(ip, 1);
            ipRequestTimeWindow.putIpSend(ip, ip);
        }
        if (checkSpecialUrl(ip, url)) {
            return true;
        }
 
        return false;
 
    }
 
    /**
     * 检验特殊url处理 返回true:ip已被封, false:ip正常
     * 
     * @param ip
     * @return
     */
    public boolean checkSpecialUrl(String ip, String url) {
//        Integer request_check_ip_special_count = sysparaService.find("request_check_ip_special_count").getInteger();
        if (!urlSpecialService.cacheAllUrls().contains(url)) {
            return false;
        }
        if (ipSpecialRequestTimeWindow.getIpSend(ip) != null) {
            Integer count = ipSpecialCache.get(ip);
//            System.out.println("ip:" + ip + ",count:" + count);
            count++;
            if (count >= request_check_ip_special_count) {// 从ip发送第一条开始
 
//                blacklistIpSerivceTimeWindow.putBlackIp(ip, ip);
                ipSpecialCache.remove(ip);
                ipSpecialRequestTimeWindow.delIpSend(ip);
 
                IpMenu ipMenu = ipMenuService.cacheByIp(ip);
                if (null == ipMenu) {
                    ipMenu = new IpMenu();
                    ipMenu.setCreate_time(new Date());
                    ipMenu.setDelete_status(0);
                    ipMenu.setLast_opera_time(new Date());
                    ipMenu.setType(IpMenu.IP_BLACK);
                    ipMenu.setIp(ip);
                    ipMenuService.save(ipMenu);
                } else {
                    ipMenu.setDelete_status(0);
                    ipMenu.setLast_opera_time(new Date());
                    ipMenu.setType(IpMenu.IP_BLACK);
                    ipMenuService.update(ipMenu);
                }
                return true;
            } else {
                ipSpecialCache.put(ip, count++);
            }
 
        } else {
            ipSpecialCache.put(ip, 1);
            ipSpecialRequestTimeWindow.putIpSend(ip, ip);
        }
        return false;
    }
 
    /**
     * 检验锁定相关url处理 返回true:ip已被封, false:ip正常
     * 
     * @param ip
     * @return
     */
    public boolean checkLockUrl(String ip, String url) {
        if (!urls.contains(url)) {
            return false;
        }
        if (ipLockRequestTimeWindow.getIpSend(ip) != null) {
            Integer count = this.ipLockCache.get(ip);
//            System.out.println("ip:" + ip + ",count:" + count);
            count++;
            if (count >= request_check_ip_count) {// 从ip发送第一条开始
 
//                blacklistIpSerivceTimeWindow.putBlackIp(ip, ip);
                ipLockCache.remove(ip);
                ipLockRequestTimeWindow.delIpSend(ip);
 
                IpMenu ipMenu = ipMenuService.cacheByIp(ip);
                if (null == ipMenu) {
                    ipMenu = new IpMenu();
                    ipMenu.setCreate_time(new Date());
                    ipMenu.setDelete_status(0);
                    ipMenu.setLast_opera_time(new Date());
                    ipMenu.setType(IpMenu.IP_LOCK);
                    ipMenu.setIp(ip);
                    ipMenuService.save(ipMenu);
                } else {
                    ipMenu.setDelete_status(0);
                    ipMenu.setLast_opera_time(new Date());
                    ipMenu.setType(IpMenu.IP_LOCK);
                    ipMenuService.update(ipMenu);
                }
                return true;
            } else {
                ipLockCache.put(ip, count++);
            }
 
        } else {
            ipLockCache.put(ip, 1);
            ipLockRequestTimeWindow.putIpSend(ip, ip);
        }
        return false;
    }
 
    public Map<String, AtomicLong> getIpCountCache() {
        return ipCountCache;
    }
 
    public Map<String, Date> getIpTimeCacheCache() {
        return ipTimeCacheCache;
    }
 
    public void clearIpCountCache() {
        ipCountCache.clear();
    }
 
    public void clearIpTimeCacheCache() {
        ipTimeCacheCache.clear();
    }
 
    /**
     * 分页获取ip计数相关信息,(防止因跨服务请求导致网络带宽不足而响应慢)
     * 
     * @param pageNo
     * @param pageSize
     * @param ip_para
     * @param type_para
     * @param limit_count
     * @param isExcludeBlack true:排除黑名单
     * @return
     */
    public List<Map<String, Object>> cachePagedQueryIpCount(int pageNo, int pageSize, String ip_para, String type_para,
            Long limit_count, boolean isExcludeMenu) {
        Map<String, AtomicLong> ipCountCache = this.getIpCountCache();
        Map<String, Date> ipTimeCacheCache = this.getIpTimeCacheCache();
        List<Map<String, Object>> pageList = new ArrayList<Map<String, Object>>();
        for (Entry<String, AtomicLong> entry : ipCountCache.entrySet()) {
            if (StringUtils.isNotEmpty(ip_para) && entry.getKey().indexOf(ip_para) == -1) {// ip赛选条件
                continue;
            }
            IpMenu ipMenu = ipMenuService.cacheByIp(entry.getKey());
            if (StringUtils.isNotEmpty(type_para) && ipMenu != null && !type_para.equals(ipMenu.getType())
                    && ipMenu.getDelete_status() == 0) {// 类型赛选条件
                continue;
            }
            if (isExcludeMenu && ipMenu != null && ipMenu.getDelete_status() == 0) {// 是否排除黑名单
                continue;
            }
            if (limit_count != null && limit_count > entry.getValue().get()) {
                continue;
            }
            Map<String, Object> data = new HashMap<String, Object>();
            data.put("ip", entry.getKey());
            data.put("count", entry.getValue().get());
            data.put("create_time", ipTimeCacheCache.get(entry.getKey()));
            data.put("type", ipMenu == null || ipMenu.getDelete_status() == -1 ? null : ipMenu.getType());
            pageList.add(data);
        }
        if (pageList.isEmpty()) {
            return new LinkedList<Map<String, Object>>();
        }
        java.util.Collections.sort(pageList, new Comparator<Map<String, Object>>() {
            @Override
            public int compare(Map<String, Object> paramT1, Map<String, Object> paramT2) {
                // TODO Auto-generated method stub
                Long t1 = Long.valueOf(paramT1.get("count").toString());
                Long t2 = Long.valueOf(paramT2.get("count").toString());
                return -t1.compareTo(t2);
            }
        });
 
        int start = (pageNo - 1) * pageSize;
        start = start <= 0 ? 0 : start;//
        int end = start + pageSize;
 
        if (start >= pageList.size()) {// 起始数据大于总量,返回空
            return new LinkedList<Map<String, Object>>();
        }
        if (pageList.size() <= end)
            end = pageList.size();
 
        List<Map<String, Object>> list = pageList.subList(start, end);
        return list;
    }
 
    /**
     * 根据ips批量获取对应的请求数据,减少交互
     * 
     * @param ips
     * @return
     */
    public Map<String, Long> ipCountByIps(List<String> ips) {
        Map<String, Long> map = new HashMap<String, Long>();
        for (String ip : ips) {
            map.put(ip, !this.ipCountCache.containsKey(ip) ? 0L : ipCountCache.get(ip).get());
        }
 
        return map;
    }
 
    /**
     * 获取ip请求汇总数据
     * 
     * @return
     */
    public Map<String, Object> ipCountSumDates() {
        Map<String, Object> map = new HashMap<String, Object>();
        Long sumRequest = 0l;
        Long sumIp = 0l;
        for (Entry<String, AtomicLong> entry : ipCountCache.entrySet()) {
            IpMenu ipMenu = ipMenuService.cacheByIp(entry.getKey());
            if (ipMenu != null && ipMenu.getDelete_status() == 0) {// 排除名单
                continue;
            }
            sumIp++;
            sumRequest += entry.getValue().get();
        }
        map.put("ip_request_sum", sumRequest);
        map.put("ip_sum", sumIp);
        return map;
    }
 
    public void afterPropertiesSet() throws Exception {
        request_check_ip = sysparaService.findByDB("request_check_ip").getValue();
        request_check_ip_count = sysparaService.findByDB("request_check_ip_count").getInteger();
        request_check_ip_special_count = sysparaService.findByDB("request_check_ip_special_count").getInteger();
        request_only_white_menu = sysparaService.findByDB("request_only_white_menu").getBoolean();
        initLoginPageRelationAction();
    }
 
    public void initLoginPageRelationAction() {
//        /pages/login/index登录页:1、project.web.api/syspara.action 2、project.web.api/user!login.action
        urls.add("/api/syspara.action");
        urls.add("/api/user!login.action");
//        /pages/login/forget找回密码:1、project.web.api/syspara.action 2、project.web.api/user!resetpswByGoogle 3、project.web.api/user!resetpsw.action 4、project.web.api/idcode!execute.action 5、project.web.api/user!getUserNameVerifTarget
//        urls.add("/project.web.api/syspara.action");
        urls.add("/api/user!resetpswByGoogle.action");
        urls.add("/api/user!resetpsw.action");
        urls.add("/api/idcode!execute.action");
        urls.add("/api/withdrawCallback!execute.action");
        urls.add("/api/rechargeCallback!execute.action");
        urls.add("/api/project.web.api/user!getUserNameVerifTarget.action");
//        /pages/login/register-new注册页面:1、project.web.api/localuser!getImageCode 2、project.web.api/idcode!execute 3、project.web.api/localuser!register_username 4、project.web.api/localuser!register
        urls.add("/api/localuser!getImageCode.action");
        urls.add("/api/idcode!execute.action");
        urls.add("/api/localuser!register_username.action");
        urls.add("/api/localuser!register.action");
//        /pages/user/server客服 1、project.web.api/onlinechat!list.action 2、project.web.api/onlinechat!send 3、project.web.api/onlinechat!unread
        urls.add("/api/onlinechat!list.action");
        urls.add("/api/onlinechat!send.action");
        urls.add("/api/onlinechat!unread.action");
    }
 
    /**
     * 登录页相关所需的urls
     */
    public List<String> loginPageRelationAction() {
        return urls;
    }
 
    public Map<String, AtomicLong> cacheUrlCount(String ip) {
        return ipUrlCountCache.get(ip);
    }
 
    /**
     * ip请求数相关缓存清除
     * 
     * @param ip
     */
    public void cacheRemoveIp(String ip) {
        this.ipCountCache.remove(ip);
        this.ipTimeCacheCache.remove(ip);
        this.ipUrlCountCache.remove(ip);
 
        /**
         * 对应的时间窗ip清除
         */
        ipRequestTimeWindow.delIpSend(ip);
        ipSpecialRequestTimeWindow.delIpSend(ip);
        ipLockRequestTimeWindow.delIpSend(ip);
 
        ipLockCache.remove(ip);
        ipCache.remove(ip);
        ipSpecialCache.remove(ip);
 
    }
 
    /**
     * ip请求清除不在名单里的数据
     */
    public void cacheRequestClearNoMenu() {
        for (String key : ipCountCache.keySet()) {
            IpMenu ipMenu = ipMenuService.cacheByIp(key);
            if (ipMenu != null && ipMenu.getDelete_status() == 0) {// 排除名单
                continue;
            }
//            this.ipCountCache.remove(key);
//            this.ipTimeCacheCache.remove(key);
//            this.ipUrlCountCache.remove(key);
            cacheRemoveIp(key);
        }
    }
 
    /**
     * ip是否锁定
     * 
     * @param ip
     * @return
     */
    public boolean isLock(String ip) {
        return locklistIpSerivceTimeWindow.getLockIp(ip) != null;
    }
 
    public void setIpRequestTimeWindow(IpRequestTimeWindow ipRequestTimeWindow) {
        this.ipRequestTimeWindow = ipRequestTimeWindow;
    }
 
    public void setBlacklistIpSerivceTimeWindow(BlacklistIpSerivceTimeWindow blacklistIpSerivceTimeWindow) {
        this.blacklistIpSerivceTimeWindow = blacklistIpSerivceTimeWindow;
    }
 
    public void setSysparaService(SysparaService sysparaService) {
        this.sysparaService = sysparaService;
    }
 
    public void setIpMenuService(IpMenuService ipMenuService) {
        this.ipMenuService = ipMenuService;
    }
 
    public void setIpSpecialRequestTimeWindow(IpSpecialRequestTimeWindow ipSpecialRequestTimeWindow) {
        this.ipSpecialRequestTimeWindow = ipSpecialRequestTimeWindow;
    }
 
    public void setUrlSpecialService(UrlSpecialService urlSpecialService) {
        this.urlSpecialService = urlSpecialService;
    }
 
    public void setRedisHandler(RedisHandler redisHandler) {
        this.redisHandler = redisHandler;
    }
 
    public void setSystemParaReadRequestTimeWindow(SystemParaReadRequestTimeWindow systemParaReadRequestTimeWindow) {
        this.systemParaReadRequestTimeWindow = systemParaReadRequestTimeWindow;
    }
 
    public void setIpLockRequestTimeWindow(IpLockRequestTimeWindow ipLockRequestTimeWindow) {
        this.ipLockRequestTimeWindow = ipLockRequestTimeWindow;
    }
 
    public void setLocklistIpSerivceTimeWindow(LocklistIpSerivceTimeWindow locklistIpSerivceTimeWindow) {
        this.locklistIpSerivceTimeWindow = locklistIpSerivceTimeWindow;
    }
 
}