import{_ as w}from"./index-DIKmrNCq.js?v=1773287522785";import{_ as R}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{u as C}from"./useLoading-CZ2gSAW7.js?v=1773287522785";import{s as T,e as $}from"./index-BVqS1ZM4.js?v=1773287522785";import{i as B}from"./index-BTglIPU2.js?v=1773287522785";import{k as I,R as k,r as M,e as q,$ as N,a8 as P,a9 as i,a0 as e,S as r,j as c,aa as s,_ as U}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as V,au as j,_ as D,av as F,a9 as L}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./index-DLN4sTNp.js?v=1773287522785";import"./index-CZps0rIN.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";import"./useTableData-BmkIKQ_R.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DG86e1NA.js?v=1773287522785";import"./index-K4YGya6V.js?v=1773287522785";import"./check-CNel7fTH.js?v=1773287522785";import"./index-BRQskX9P.js?v=1773287522785";import"./ssl-lets-progress-6I5lHATh.js?v=1773287522785";import"./ssl-Bm8jcneQ.js?v=1773287522785";import"./ssh-g_xvV-TS.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const H=["textContent"],pe=I({__name:"ssh-protection-config",setup(O,{expose:b}){const{t:u}=k(),d=M(null),t=q({maxRetry:5,period:300,prohibitionTime:86400}),y={maxRetry:{required:!0,message:u("Security.Conf.Index_28"),type:"number",trigger:["blur","input"]},period:{required:!0,message:u("Security.Conf.Index_28"),type:"number",trigger:["blur","input"]},prohibitionTime:{required:!0,message:u("Security.Conf.Index_28"),type:"number",trigger:["blur","input"]}},g=async()=>{var n;await((n=d.value)==null?void 0:n.validate());const o={maxretry:t.maxRetry,findtime:t.period,bantime:t.prohibitionTime};await T(o)},{loading:x,setLoading:f}=C();return(async()=>{try{f(!0);const{message:o}=await $();B(o)&&(t.maxRetry=o.maxretry,t.period=o.findtime,t.prohibitionTime=o.bantime)}finally{f(!1)}})(),b({onConfirm:g}),(o,n)=>{const m=D,p=F,l=j,_=V,h=R,S=w,v=L;return N(),P(v,{show:r(x),class:"p-16px"},{default:i(()=>[e(h,{ref_key:"formRef",ref:d,model:r(t),rules:y},{default:i(()=>[e(_,{label:o.$t("Maximum retry times"),path:"maxRetry"},{default:i(()=>[e(l,{class:"w-200px"},{default:i(()=>[e(m,{value:r(t).maxRetry,"onUpdate:value":n[0]||(n[0]=a=>r(t).maxRetry=a),"show-button":!1},null,8,["value"]),e(p,null,{default:i(()=>[c(s(o.$t("Waf.Site.index_35")),1)]),_:1})]),_:1})]),_:1},8,["label"]),e(_,{label:o.$t("Mail.Backup.index_3"),path:"period"},{default:i(()=>[e(l,{class:"w-200px"},{default:i(()=>[e(m,{value:r(t).period,"onUpdate:value":n[1]||(n[1]=a=>r(t).period=a),"show-button":!1},null,8,["value"]),e(p,null,{default:i(()=>[c(s(o.$t("Security.SiteSecurity.Metric.seconds")),1)]),_:1})]),_:1})]),_:1},8,["label"]),e(_,{label:"Prohibition time",path:"prohibitionTime"},{default:i(()=>[e(l,{class:"w-200px"},{default:i(()=>[e(m,{value:r(t).prohibitionTime,"onUpdate:value":n[2]||(n[2]=a=>r(t).prohibitionTime=a),"show-button":!1},null,8,["value"]),e(p,null,{default:i(()=>[c(s(o.$t("Security.SiteSecurity.Metric.seconds")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),e(S,null,{default:i(()=>[U("li",{textContent:s(o.$t("Monitor SSHD service logs, and prohibit IP access for 86400 seconds if the IP exceeds the maximum number of retries (5 times) within the set period (300 seconds)"))},null,8,H)]),_:1})]),_:1},8,["show"])}}});export{pe as default};
