mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-01 11:34:13 +08:00
feat(waf): 增加概览页 (#4060)
This commit is contained in:
parent
d42df7184c
commit
c49c4b7863
frontend/src
plugins/openresty/waf
36
frontend/src/assets/json/china-name.json
Normal file
36
frontend/src/assets/json/china-name.json
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"Anhui": "安徽",
|
||||||
|
"Beijing": "北京",
|
||||||
|
"Fujian": "福建",
|
||||||
|
"Gansu": "甘肃",
|
||||||
|
"Guangdong": "广东",
|
||||||
|
"Guangxi": "广西",
|
||||||
|
"Guizhou": "贵州",
|
||||||
|
"Hainan": "海南",
|
||||||
|
"Hebei": "河北",
|
||||||
|
"Henan": "河南",
|
||||||
|
"Heilongjiang": "黑龙江",
|
||||||
|
"Hubei": "湖北",
|
||||||
|
"Hunan": "湖南",
|
||||||
|
"Jilin": "吉林",
|
||||||
|
"Jiangsu": "江苏",
|
||||||
|
"Jiangxi": "江西",
|
||||||
|
"Liaoning": "辽宁",
|
||||||
|
"Inner Mongolia": "内蒙古",
|
||||||
|
"Ningxia": "宁夏",
|
||||||
|
"Qinghai": "青海",
|
||||||
|
"Shandong": "山东",
|
||||||
|
"Shanxi": "山西",
|
||||||
|
"Shaanxi": "陕西",
|
||||||
|
"Shanghai": "上海",
|
||||||
|
"Sichuan": "四川",
|
||||||
|
"Tianjin": "天津",
|
||||||
|
"Tibet": "西藏",
|
||||||
|
"Xinjiang": "新疆",
|
||||||
|
"Yunnan": "云南",
|
||||||
|
"Zhejiang": "浙江",
|
||||||
|
"Chongqing": "重庆",
|
||||||
|
"HongKong": "香港",
|
||||||
|
"Macao": "澳门",
|
||||||
|
"Taiwan": "台湾"
|
||||||
|
}
|
27252
frontend/src/assets/json/china.json
Normal file
27252
frontend/src/assets/json/china.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,224 +1,192 @@
|
|||||||
{
|
{
|
||||||
"Afghanistan": "阿富汗",
|
"Afghanistan": "阿富汗",
|
||||||
"Singapore": "新加坡",
|
|
||||||
"Angola": "安哥拉",
|
|
||||||
"Albania": "阿尔巴尼亚",
|
"Albania": "阿尔巴尼亚",
|
||||||
"United Arab Emirates": "阿联酋",
|
"Algeria": "阿尔及利亚",
|
||||||
|
"Angola": "安哥拉",
|
||||||
"Argentina": "阿根廷",
|
"Argentina": "阿根廷",
|
||||||
"Armenia": "亚美尼亚",
|
"Armenia": "亚美尼亚",
|
||||||
"French Southern and Antarctic Lands": "法属南半球和南极领地",
|
|
||||||
"Australia": "澳大利亚",
|
"Australia": "澳大利亚",
|
||||||
"Austria": "奥地利",
|
"Austria": "奥地利",
|
||||||
"Azerbaijan": "阿塞拜疆",
|
"Azerbaijan": "阿塞拜疆",
|
||||||
"Burundi": "布隆迪",
|
"Bahamas": "巴哈马",
|
||||||
"Belgium": "比利时",
|
"Bahrain": "巴林",
|
||||||
"Benin": "贝宁",
|
|
||||||
"Burkina Faso": "布基纳法索",
|
|
||||||
"Bangladesh": "孟加拉国",
|
"Bangladesh": "孟加拉国",
|
||||||
"Bulgaria": "保加利亚",
|
|
||||||
"The Bahamas": "巴哈马",
|
|
||||||
"Bosnia and Herzegovina": "波斯尼亚和黑塞哥维那",
|
|
||||||
"Belarus": "白俄罗斯",
|
"Belarus": "白俄罗斯",
|
||||||
|
"Belgium": "比利时",
|
||||||
"Belize": "伯利兹",
|
"Belize": "伯利兹",
|
||||||
"Bermuda": "百慕大",
|
"Benin": "贝宁",
|
||||||
"Bolivia": "玻利维亚",
|
|
||||||
"Brazil": "巴西",
|
|
||||||
"Brunei": "文莱",
|
|
||||||
"Bhutan": "不丹",
|
"Bhutan": "不丹",
|
||||||
|
"Bolivia": "玻利维亚",
|
||||||
|
"Bosnia and Herz.": "波斯尼亚和黑塞哥维那",
|
||||||
"Botswana": "博茨瓦纳",
|
"Botswana": "博茨瓦纳",
|
||||||
"Central African Republic": "中非共和国",
|
"Brazil": "巴西",
|
||||||
|
"British Virgin Islands": "英属维京群岛",
|
||||||
|
"Brunei": "文莱",
|
||||||
|
"Bulgaria": "保加利亚",
|
||||||
|
"Burkina Faso": "布基纳法索",
|
||||||
|
"Burundi": "布隆迪",
|
||||||
|
"Cambodia": "柬埔寨",
|
||||||
|
"Cameroon": "喀麦隆",
|
||||||
"Canada": "加拿大",
|
"Canada": "加拿大",
|
||||||
"Switzerland": "瑞士",
|
"Cape Verde": "佛得角",
|
||||||
|
"Cayman Islands": "开曼群岛",
|
||||||
|
"Central African Rep.": "中非共和国",
|
||||||
|
"Chad": "乍得",
|
||||||
"Chile": "智利",
|
"Chile": "智利",
|
||||||
"China": "中国",
|
"China": "中国",
|
||||||
"Ivory Coast": "象牙海岸",
|
|
||||||
"Cameroon": "喀麦隆",
|
|
||||||
"Democratic Republic of the Congo": "刚果民主共和国",
|
|
||||||
"Republic of the Congo": "刚果共和国",
|
|
||||||
"Colombia": "哥伦比亚",
|
"Colombia": "哥伦比亚",
|
||||||
|
"Comoros": "科摩罗",
|
||||||
|
"Congo": "刚果",
|
||||||
"Costa Rica": "哥斯达黎加",
|
"Costa Rica": "哥斯达黎加",
|
||||||
|
"Croatia": "克罗地亚",
|
||||||
"Cuba": "古巴",
|
"Cuba": "古巴",
|
||||||
"Northern Cyprus": "北塞浦路斯",
|
|
||||||
"Cyprus": "塞浦路斯",
|
"Cyprus": "塞浦路斯",
|
||||||
"Czech Republic": "捷克共和国",
|
"Czech Rep.": "捷克共和国",
|
||||||
"Germany": "德国",
|
"Côte d'Ivoire": "科特迪瓦",
|
||||||
"Djibouti": "吉布提",
|
"Dem. Rep. Congo": "刚果民主共和国",
|
||||||
|
"Dem. Rep. Korea": "朝鲜",
|
||||||
"Denmark": "丹麦",
|
"Denmark": "丹麦",
|
||||||
"Dominican Republic": "多明尼加共和国",
|
"Djibouti": "吉布提",
|
||||||
"Algeria": "阿尔及利亚",
|
"Dominican Rep.": "多米尼加共和国",
|
||||||
"Ecuador": "厄瓜多尔",
|
"Ecuador": "厄瓜多尔",
|
||||||
"Egypt": "埃及",
|
"Egypt": "埃及",
|
||||||
|
"El Salvador": "萨尔瓦多",
|
||||||
|
"Equatorial Guinea": "赤道几内亚",
|
||||||
"Eritrea": "厄立特里亚",
|
"Eritrea": "厄立特里亚",
|
||||||
"Spain": "西班牙",
|
|
||||||
"Estonia": "爱沙尼亚",
|
"Estonia": "爱沙尼亚",
|
||||||
"Ethiopia": "埃塞俄比亚",
|
"Ethiopia": "埃塞俄比亚",
|
||||||
|
"Falkland Is.": "福克兰群岛",
|
||||||
|
"Fiji": "斐济",
|
||||||
"Finland": "芬兰",
|
"Finland": "芬兰",
|
||||||
"Fiji": "斐",
|
"Fr. S. Antarctic Lands": "所罗门群岛",
|
||||||
"Falkland Islands": "福克兰群岛",
|
|
||||||
"France": "法国",
|
"France": "法国",
|
||||||
"Gabon": "加蓬",
|
"Gabon": "加蓬",
|
||||||
"United Kingdom": "英国",
|
|
||||||
"Georgia": "格鲁吉亚",
|
|
||||||
"Ghana": "加纳",
|
|
||||||
"Guinea": "几内亚",
|
|
||||||
"Gambia": "冈比亚",
|
"Gambia": "冈比亚",
|
||||||
"Guinea Bissau": "几内亚比绍",
|
"Georgia": "格鲁吉亚",
|
||||||
|
"Germany": "德国",
|
||||||
|
"Ghana": "加纳",
|
||||||
"Greece": "希腊",
|
"Greece": "希腊",
|
||||||
"Greenland": "格陵兰",
|
"Greenland": "格陵兰",
|
||||||
"Guatemala": "危地马拉",
|
"Guatemala": "危地马拉",
|
||||||
"French Guiana": "法属圭亚那",
|
"Guinea": "几内亚",
|
||||||
|
"Guinea-Bissau": "几内亚比绍",
|
||||||
"Guyana": "圭亚那",
|
"Guyana": "圭亚那",
|
||||||
"Honduras": "洪都拉斯",
|
|
||||||
"Croatia": "克罗地亚",
|
|
||||||
"Haiti": "海地",
|
"Haiti": "海地",
|
||||||
|
"Honduras": "洪都拉斯",
|
||||||
"Hungary": "匈牙利",
|
"Hungary": "匈牙利",
|
||||||
"Indonesia": "印度尼西亚",
|
"Iceland": "冰岛",
|
||||||
"India": "印度",
|
"India": "印度",
|
||||||
"Ireland": "爱尔兰",
|
"Indonesia": "印度尼西亚",
|
||||||
"Iran": "伊朗",
|
"Iran": "伊朗",
|
||||||
"Iraq": "伊拉克",
|
"Iraq": "伊拉克",
|
||||||
"Iceland": "冰岛",
|
"Ireland": "爱尔兰",
|
||||||
|
"Isle of Man": "马恩岛",
|
||||||
"Israel": "以色列",
|
"Israel": "以色列",
|
||||||
"Italy": "意大利",
|
"Italy": "意大利",
|
||||||
"Jamaica": "牙买加",
|
"Jamaica": "牙买加",
|
||||||
"Jordan": "约旦",
|
|
||||||
"Japan": "日本",
|
"Japan": "日本",
|
||||||
|
"Jordan": "约旦",
|
||||||
"Kazakhstan": "哈萨克斯坦",
|
"Kazakhstan": "哈萨克斯坦",
|
||||||
"Kenya": "肯尼亚",
|
"Kenya": "肯尼亚",
|
||||||
"Kyrgyzstan": "吉尔吉斯斯坦",
|
"Korea": "韩国",
|
||||||
"Cambodia": "柬埔寨",
|
|
||||||
"Kosovo": "科索沃",
|
|
||||||
"Kuwait": "科威特",
|
"Kuwait": "科威特",
|
||||||
"Laos": "老挝",
|
"Kyrgyzstan": "吉尔吉斯斯坦",
|
||||||
|
"Lao PDR": "老挝",
|
||||||
|
"Latvia": "拉脱维亚",
|
||||||
"Lebanon": "黎巴嫩",
|
"Lebanon": "黎巴嫩",
|
||||||
|
"Lesotho": "莱索托",
|
||||||
"Liberia": "利比里亚",
|
"Liberia": "利比里亚",
|
||||||
"Libya": "利比亚",
|
"Libya": "利比亚",
|
||||||
"Sri Lanka": "斯里兰卡",
|
|
||||||
"Lesotho": "莱索托",
|
|
||||||
"Lithuania": "立陶宛",
|
"Lithuania": "立陶宛",
|
||||||
"Luxembourg": "卢森堡",
|
"Luxembourg": "卢森堡",
|
||||||
"Latvia": "拉脱维亚",
|
|
||||||
"Morocco": "摩洛哥",
|
|
||||||
"Moldova": "摩尔多瓦",
|
|
||||||
"Madagascar": "马达加斯加",
|
|
||||||
"Mexico": "墨西哥",
|
|
||||||
"Macedonia": "马其顿",
|
"Macedonia": "马其顿",
|
||||||
"Mali": "马里",
|
"Madagascar": "马达加斯加",
|
||||||
"Myanmar": "缅甸",
|
|
||||||
"Montenegro": "黑山",
|
|
||||||
"Mongolia": "蒙古",
|
|
||||||
"Mozambique": "莫桑比克",
|
|
||||||
"Mauritania": "毛里塔尼亚",
|
|
||||||
"Malawi": "马拉维",
|
"Malawi": "马拉维",
|
||||||
"Malaysia": "马来西亚",
|
"Malaysia": "马来西亚",
|
||||||
|
"Maldives": "马尔代夫",
|
||||||
|
"Mali": "马里",
|
||||||
|
"Malta": "马耳他",
|
||||||
|
"Mauritania": "毛利塔尼亚",
|
||||||
|
"Mauritius": "毛里求斯",
|
||||||
|
"Mexico": "墨西哥",
|
||||||
|
"Moldova": "摩尔多瓦",
|
||||||
|
"Monaco": "摩纳哥",
|
||||||
|
"Mongolia": "蒙古",
|
||||||
|
"Montenegro": "黑山共和国",
|
||||||
|
"Morocco": "摩洛哥",
|
||||||
|
"Mozambique": "莫桑比克",
|
||||||
|
"Myanmar": "缅甸",
|
||||||
"Namibia": "纳米比亚",
|
"Namibia": "纳米比亚",
|
||||||
|
"Nepal": "尼泊尔",
|
||||||
|
"Netherlands": "荷兰",
|
||||||
"New Caledonia": "新喀里多尼亚",
|
"New Caledonia": "新喀里多尼亚",
|
||||||
|
"New Zealand": "新西兰",
|
||||||
|
"Nicaragua": "尼加拉瓜",
|
||||||
"Niger": "尼日尔",
|
"Niger": "尼日尔",
|
||||||
"Nigeria": "尼日利亚",
|
"Nigeria": "尼日利亚",
|
||||||
"Nicaragua": "尼加拉瓜",
|
|
||||||
"Netherlands": "荷兰",
|
|
||||||
"Norway": "挪威",
|
"Norway": "挪威",
|
||||||
"Nepal": "尼泊尔",
|
|
||||||
"New Zealand": "新西兰",
|
|
||||||
"Oman": "阿曼",
|
"Oman": "阿曼",
|
||||||
"Pakistan": "巴基斯坦",
|
"Pakistan": "巴基斯坦",
|
||||||
"Panama": "巴拿马",
|
"Panama": "巴拿马",
|
||||||
|
"Papua New Guinea": "巴布亚新几内亚",
|
||||||
|
"Paraguay": "巴拉圭",
|
||||||
"Peru": "秘鲁",
|
"Peru": "秘鲁",
|
||||||
"Philippines": "菲律宾",
|
"Philippines": "菲律宾",
|
||||||
"Papua New Guinea": "巴布亚新几内亚",
|
|
||||||
"Poland": "波兰",
|
"Poland": "波兰",
|
||||||
"Puerto Rico": "波多黎各",
|
|
||||||
"North Korea": "北朝鲜",
|
|
||||||
"Portugal": "葡萄牙",
|
"Portugal": "葡萄牙",
|
||||||
"Paraguay": "巴拉圭",
|
"Puerto Rico": "波多黎各",
|
||||||
"Qatar": "卡塔尔",
|
"Qatar": "卡塔尔",
|
||||||
|
"Reunion": "留尼旺",
|
||||||
"Romania": "罗马尼亚",
|
"Romania": "罗马尼亚",
|
||||||
"Russia": "俄罗斯",
|
"Russia": "俄罗斯",
|
||||||
"Rwanda": "卢旺达",
|
"Rwanda": "卢旺达",
|
||||||
"Western Sahara": "西撒哈拉",
|
"S. Geo. and S. Sandw. Is.": "南乔治亚和南桑威奇群岛",
|
||||||
|
"S. Sudan": "南苏丹",
|
||||||
|
"San Marino": "圣马力诺",
|
||||||
"Saudi Arabia": "沙特阿拉伯",
|
"Saudi Arabia": "沙特阿拉伯",
|
||||||
"Sudan": "苏丹",
|
|
||||||
"South Sudan": "南苏丹",
|
|
||||||
"Senegal": "塞内加尔",
|
"Senegal": "塞内加尔",
|
||||||
"Solomon Islands": "所罗门群岛",
|
"Serbia": "塞尔维亚",
|
||||||
"Sierra Leone": "塞拉利昂",
|
"Sierra Leone": "塞拉利昂",
|
||||||
"El Salvador": "萨尔瓦多",
|
"Singapore": "新加坡",
|
||||||
"Somaliland": "索马里兰",
|
|
||||||
"Somalia": "索马里",
|
|
||||||
"Republic of Serbia": "塞尔维亚",
|
|
||||||
"Suriname": "苏里南",
|
|
||||||
"Slovakia": "斯洛伐克",
|
"Slovakia": "斯洛伐克",
|
||||||
"Slovenia": "斯洛文尼亚",
|
"Slovenia": "斯洛文尼亚",
|
||||||
"Sweden": "瑞典",
|
"Solomon Is.": "所罗门群岛",
|
||||||
|
"Somalia": "索马里",
|
||||||
|
"South Africa": "南非",
|
||||||
|
"Spain": "西班牙",
|
||||||
|
"Sri Lanka": "斯里兰卡",
|
||||||
|
"Sudan": "苏丹",
|
||||||
|
"Suriname": "苏里南",
|
||||||
"Swaziland": "斯威士兰",
|
"Swaziland": "斯威士兰",
|
||||||
|
"Sweden": "瑞典",
|
||||||
|
"Switzerland": "瑞士",
|
||||||
"Syria": "叙利亚",
|
"Syria": "叙利亚",
|
||||||
"Chad": "乍得",
|
"Taiwan": "中国台湾",
|
||||||
"Togo": "多哥",
|
|
||||||
"Thailand": "泰国",
|
|
||||||
"Tajikistan": "塔吉克斯坦",
|
"Tajikistan": "塔吉克斯坦",
|
||||||
"Turkmenistan": "土库曼斯坦",
|
"Tanzania": "坦桑尼亚",
|
||||||
"East Timor": "东帝汶",
|
"Thailand": "泰国",
|
||||||
"Trinidad and Tobago": "特里尼达和多巴哥",
|
"Togo": "多哥",
|
||||||
|
"Tonga": "汤加",
|
||||||
|
"Trinidad and Tobago": "特立尼达和多巴哥",
|
||||||
"Tunisia": "突尼斯",
|
"Tunisia": "突尼斯",
|
||||||
"Turkey": "土耳其",
|
"Turkey": "土耳其",
|
||||||
"United Republic of Tanzania": "坦桑尼亚",
|
"Turkmenistan": "土库曼斯坦",
|
||||||
|
"U.S. Virgin Islands": "美属维尔京群岛",
|
||||||
"Uganda": "乌干达",
|
"Uganda": "乌干达",
|
||||||
"Ukraine": "乌克兰",
|
"Ukraine": "乌克兰",
|
||||||
"Uruguay": "乌拉圭",
|
"United Arab Emirates": "阿拉伯联合酋长国",
|
||||||
|
"United Kingdom": "英国",
|
||||||
"United States": "美国",
|
"United States": "美国",
|
||||||
|
"Uruguay": "乌拉圭",
|
||||||
"Uzbekistan": "乌兹别克斯坦",
|
"Uzbekistan": "乌兹别克斯坦",
|
||||||
|
"Vanuatu": "瓦努阿图",
|
||||||
|
"Vatican City": "梵蒂冈城",
|
||||||
"Venezuela": "委内瑞拉",
|
"Venezuela": "委内瑞拉",
|
||||||
"Vietnam": "越南",
|
"Vietnam": "越南",
|
||||||
"Vanuatu": "瓦努阿图",
|
|
||||||
"West Bank": "西岸",
|
|
||||||
"Yemen": "也门",
|
|
||||||
"South Africa": "南非",
|
|
||||||
"Zambia": "赞比亚",
|
|
||||||
"Korea": "韩国",
|
|
||||||
"Tanzania": "坦桑尼亚",
|
|
||||||
"Zimbabwe": "津巴布韦",
|
|
||||||
"Congo": "刚果",
|
|
||||||
"Central African Rep.": "中非",
|
|
||||||
"Serbia": "塞尔维亚",
|
|
||||||
"Bosnia and Herz.": "波斯尼亚和黑塞哥维那",
|
|
||||||
"Czech Rep.": "捷克",
|
|
||||||
"W. Sahara": "西撒哈拉",
|
"W. Sahara": "西撒哈拉",
|
||||||
"Lao PDR": "老挝",
|
"Yemen": "也门",
|
||||||
"Dem.Rep.Korea": "朝鲜",
|
"Yugoslavia": "南斯拉夫",
|
||||||
"Falkland Is.": "福克兰群岛",
|
"Zaire": "扎伊尔",
|
||||||
"Timor-Leste": "东帝汶",
|
"Zambia": "赞比亚",
|
||||||
"Solomon Is.": "所罗门群岛",
|
"Zimbabwe": "津巴布韦"
|
||||||
"Palestine": "巴勒斯坦",
|
|
||||||
"N. Cyprus": "北塞浦路斯",
|
|
||||||
"Aland": "奥兰群岛",
|
|
||||||
"Fr. S. Antarctic Lands": "法属南半球和南极陆地",
|
|
||||||
"Mauritius": "毛里求斯",
|
|
||||||
"Comoros": "科摩罗",
|
|
||||||
"Eq. Guinea": "赤道几内亚",
|
|
||||||
"Guinea-Bissau": "几内亚比绍",
|
|
||||||
"Dominican Rep.": "多米尼加",
|
|
||||||
"Saint Lucia": "圣卢西亚",
|
|
||||||
"Dominica": "多米尼克",
|
|
||||||
"Antigua and Barb.": "安提瓜和巴布达",
|
|
||||||
"U.S. Virgin Is.": "美国原始岛屿",
|
|
||||||
"Montserrat": "蒙塞拉特",
|
|
||||||
"Grenada": "格林纳达",
|
|
||||||
"Barbados": "巴巴多斯",
|
|
||||||
"Samoa": "萨摩亚",
|
|
||||||
"Bahamas": "巴哈马",
|
|
||||||
"Cayman Is.": "开曼群岛",
|
|
||||||
"Faeroe Is.": "法罗群岛",
|
|
||||||
"IsIe of Man": "马恩岛",
|
|
||||||
"Malta": "马耳他共和国",
|
|
||||||
"Jersey": "泽西",
|
|
||||||
"Cape Verde": "佛得角共和国",
|
|
||||||
"Turks and Caicos Is.": "特克斯和凯科斯群岛",
|
|
||||||
"St. Vin. and Gren.": "圣文森特和格林纳丁斯",
|
|
||||||
"Singapore Rep.": "新加坡",
|
|
||||||
"Côte d'Ivoire": "科特迪瓦",
|
|
||||||
"Siachen Glacier": "锡亚琴冰川",
|
|
||||||
"Br. Indian Ocean Ter.": "英属印度洋领土",
|
|
||||||
"Dem. Rep. Congo": "刚果民主共和国",
|
|
||||||
"Dem. Rep. Korea": "朝鲜",
|
|
||||||
"S. Sudan": "南苏丹"
|
|
||||||
}
|
}
|
File diff suppressed because one or more lines are too long
@ -2143,13 +2143,29 @@ const message = {
|
|||||||
manage: 'Management',
|
manage: 'Management',
|
||||||
},
|
},
|
||||||
xpack: {
|
xpack: {
|
||||||
name: 'X-Pack',
|
name: 'Professional Edition',
|
||||||
waf: {
|
waf: {
|
||||||
name: 'WAF',
|
name: 'WAF',
|
||||||
blackWhite: 'Black and White List',
|
blackWhite: 'black and white list',
|
||||||
globalSetting: 'Global Setting',
|
globalSetting: 'Global Setting',
|
||||||
websiteSetting: 'Website Setting',
|
websiteSetting: 'Website Settings',
|
||||||
blockRecords: 'Block Records',
|
blockRecords: 'Block records',
|
||||||
|
world: 'world',
|
||||||
|
china: 'China',
|
||||||
|
intercept: 'interception',
|
||||||
|
request: 'request',
|
||||||
|
count4xx: '4xx quantity',
|
||||||
|
count5xx: '5xx quantity',
|
||||||
|
todayStatus: 'Today status',
|
||||||
|
reqMap: 'Request map (30 days)',
|
||||||
|
resource: 'source',
|
||||||
|
count: 'Quantity',
|
||||||
|
hight: 'high',
|
||||||
|
low: 'low',
|
||||||
|
reqCount: 'Number of requests',
|
||||||
|
interceptCount: 'Interception number',
|
||||||
|
requestTrends: 'Request Trends (7 days)',
|
||||||
|
interceptTrends: 'Intercept Trends (7 days)',
|
||||||
},
|
},
|
||||||
monitor: {
|
monitor: {
|
||||||
name: 'Website Monitoring',
|
name: 'Website Monitoring',
|
||||||
|
@ -2005,13 +2005,29 @@ const message = {
|
|||||||
manage: '管理',
|
manage: '管理',
|
||||||
},
|
},
|
||||||
xpack: {
|
xpack: {
|
||||||
name: 'X-Pack',
|
name: '專業版',
|
||||||
waf: {
|
waf: {
|
||||||
name: 'WAF',
|
name: 'WAF',
|
||||||
blackWhite: '黑白名單',
|
blackWhite: '黑白名單',
|
||||||
globalSetting: '全局設置',
|
globalSetting: '全域設定',
|
||||||
websiteSetting: '網站設置',
|
websiteSetting: '網站設定',
|
||||||
blockRecords: '封鎖記錄',
|
blockRecords: '封鎖記錄',
|
||||||
|
world: '世界',
|
||||||
|
china: '中國',
|
||||||
|
intercept: '攔截',
|
||||||
|
request: '請求',
|
||||||
|
count4xx: '4xx 數量',
|
||||||
|
count5xx: '5xx 數量',
|
||||||
|
todayStatus: '今日狀態',
|
||||||
|
reqMap: '請求地圖(30日)',
|
||||||
|
resource: '來源',
|
||||||
|
count: '數量',
|
||||||
|
hight: '高',
|
||||||
|
low: '低',
|
||||||
|
reqCount: '請求數',
|
||||||
|
interceptCount: '攔截數',
|
||||||
|
requestTrends: '請求趨勢(7天)',
|
||||||
|
interceptTrends: '攔截趨勢(7天)',
|
||||||
},
|
},
|
||||||
monitor: {
|
monitor: {
|
||||||
name: '網站監控',
|
name: '網站監控',
|
||||||
|
@ -2006,13 +2006,29 @@ const message = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
xpack: {
|
xpack: {
|
||||||
name: 'X-Pack',
|
name: '专业版',
|
||||||
waf: {
|
waf: {
|
||||||
name: 'WAF',
|
name: 'WAF',
|
||||||
blackWhite: '黑白名单',
|
blackWhite: '黑白名单',
|
||||||
globalSetting: '全局设置',
|
globalSetting: '全局设置',
|
||||||
websiteSetting: '网站设置',
|
websiteSetting: '网站设置',
|
||||||
blockRecords: '封锁记录',
|
blockRecords: '封锁记录',
|
||||||
|
world: '世界',
|
||||||
|
china: '中国',
|
||||||
|
intercept: '拦截',
|
||||||
|
request: '请求',
|
||||||
|
count4xx: '4xx 数量',
|
||||||
|
count5xx: '5xx 数量',
|
||||||
|
todayStatus: '今日状态',
|
||||||
|
reqMap: '请求地图(30日)',
|
||||||
|
resource: '来源',
|
||||||
|
count: '数量',
|
||||||
|
hight: '高',
|
||||||
|
low: '低',
|
||||||
|
reqCount: '请求数',
|
||||||
|
interceptCount: '拦截数',
|
||||||
|
requestTrends: '请求趋势(7日)',
|
||||||
|
interceptTrends: '拦截趋势(7日)',
|
||||||
},
|
},
|
||||||
monitor: {
|
monitor: {
|
||||||
name: '网站监控',
|
name: '网站监控',
|
||||||
|
@ -28,7 +28,7 @@ local function check_table(table_name,wafdb)
|
|||||||
return rows > 0
|
return rows > 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function _M.init_db()
|
function _M.init()
|
||||||
local ok, sqlite3 = pcall(function()
|
local ok, sqlite3 = pcall(function()
|
||||||
return require "lsqlite3"
|
return require "lsqlite3"
|
||||||
end)
|
end)
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
local db = require "db"
|
local db = require "db"
|
||||||
local config = require "config"
|
local config = require "config"
|
||||||
|
local geoip = require "geoip"
|
||||||
|
|
||||||
config.load_config_file()
|
config.load_config_file()
|
||||||
|
db.init()
|
||||||
db.init_db()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
local redis_util = require "redis_util"
|
local redis_util = require "redis_util"
|
||||||
local action = require "action"
|
local action = require "action"
|
||||||
local cc = require "cc"
|
local cc = require "cc"
|
||||||
local fileUtils = require "file"
|
local file_utils = require "file"
|
||||||
local ck = require "resty.cookie"
|
local ck = require "resty.cookie"
|
||||||
local geo = require "geoip"
|
local geo = require "geoip"
|
||||||
local libinjection = require "resty.libinjection"
|
local libinjection = require "resty.libinjection"
|
||||||
@ -154,7 +154,7 @@ local function get_request_body()
|
|||||||
if not body_data then
|
if not body_data then
|
||||||
local body_file = ngx.req.get_body_file()
|
local body_file = ngx.req.get_body_file()
|
||||||
if body_file then
|
if body_file then
|
||||||
body_data = fileUtils.read_file2string(body_file, true)
|
body_data = file_utils.read_file2string(body_file, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return body_data
|
return body_data
|
||||||
|
@ -8,7 +8,7 @@ local upper_str = string.upper
|
|||||||
local tonumber = tonumber
|
local tonumber = tonumber
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
|
|
||||||
local function write_req_Log(wafdb,attack)
|
local function write_req_log(wafdb,attack)
|
||||||
local rule_table = nil
|
local rule_table = nil
|
||||||
local action = ""
|
local action = ""
|
||||||
local rule = nil
|
local rule = nil
|
||||||
@ -73,8 +73,12 @@ local function write_req_Log(wafdb,attack)
|
|||||||
for k, v in pairs(headers) do
|
for k, v in pairs(headers) do
|
||||||
local value = ""
|
local value = ""
|
||||||
if v then
|
if v then
|
||||||
|
if type(v) == "table" then
|
||||||
|
value = table.concat(v, ",")
|
||||||
|
else
|
||||||
value = v
|
value = v
|
||||||
end
|
end
|
||||||
|
end
|
||||||
logs_str = logs_str .. upper_str(k) .. ": " .. value .. "\n"
|
logs_str = logs_str .. upper_str(k) .. ": " .. value .. "\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -214,6 +218,6 @@ if config.is_waf_on() then
|
|||||||
local wafdb = utils.get_wafdb(config.waf_db_path)
|
local wafdb = utils.get_wafdb(config.waf_db_path)
|
||||||
if wafdb ~= nil then
|
if wafdb ~= nil then
|
||||||
count_req_status(wafdb,is_attack)
|
count_req_status(wafdb,is_attack)
|
||||||
write_req_Log(wafdb,is_attack)
|
write_req_log(wafdb,is_attack)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
local geoip = require "geoip"
|
local geoip = require "geoip"
|
||||||
local lib = require "lib"
|
local lib = require "lib"
|
||||||
local fileUtils = require "file"
|
local file_utils = require "file"
|
||||||
local config = require "config"
|
local config = require "config"
|
||||||
local cc = require "cc"
|
local cc = require "cc"
|
||||||
local utils = require "utils"
|
local utils = require "utils"
|
||||||
@ -11,7 +11,7 @@ local sub_str = string.sub
|
|||||||
local find_str = string.find
|
local find_str = string.find
|
||||||
local split_str = utils.split
|
local split_str = utils.split
|
||||||
local encode = cjson.encode
|
local encode = cjson.encode
|
||||||
local read_file2table = fileUtils.read_file2table
|
local read_file2table = file_utils.read_file2table
|
||||||
local tonumber = tonumber
|
local tonumber = tonumber
|
||||||
local date = os.date
|
local date = os.date
|
||||||
local format_str = string.format
|
local format_str = string.format
|
||||||
@ -64,9 +64,10 @@ local function init()
|
|||||||
if not ua then
|
if not ua then
|
||||||
ua = ""
|
ua = ""
|
||||||
end
|
end
|
||||||
ngx.ctx.ua = ua
|
|
||||||
geoip.init()
|
geoip.init()
|
||||||
|
|
||||||
|
ngx.ctx.ua = ua
|
||||||
ngx.ctx.geoip = get_geo_ip(ip)
|
ngx.ctx.geoip = get_geo_ip(ip)
|
||||||
|
|
||||||
local msg = "访问 IP " .. ip
|
local msg = "访问 IP " .. ip
|
||||||
@ -143,10 +144,17 @@ local function waf_api()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
ngx.log(ngx.ERR,"access waf")
|
||||||
|
|
||||||
if config.is_waf_on() then
|
if config.is_waf_on() then
|
||||||
init()
|
init()
|
||||||
waf_api()
|
waf_api()
|
||||||
|
|
||||||
|
if ngx.ctx.website_key == "unknown" then
|
||||||
|
ngx.exit(403)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if lib.is_white_ip() then
|
if lib.is_white_ip() then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@ -174,5 +182,4 @@ if config.is_waf_on() then
|
|||||||
lib.cookie_check()
|
lib.cookie_check()
|
||||||
lib.post_check()
|
lib.post_check()
|
||||||
lib.header_check()
|
lib.header_check()
|
||||||
|
|
||||||
end
|
end
|
Loading…
x
Reference in New Issue
Block a user