import{c as e,w as l,q as a,H as o,v as t,x as d,I as p,y as s,N as u,B as r,e as m,F as n,b0 as i,$ as _,C as c,ab as b,ak as y,al as f,U as V,aS as x,G as h,a9 as k}from"./base-lib.js?v=1761009159";import{k as w,d as v,L as U}from"./utils-lib.js?v=1761009159";import{J as j,p as T,f as g,K as C,t as I,L,M as F,N as H,O as N,c as R,P as S,e as q}from"./useController14.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./site.js?v=1761009159";import"./column.js?v=1761009159";import"./index106.js?v=1761009159";import"./validator.js?v=1761009159";import"./useStore4.js?v=1761009159";const B={class:"p-[20px]"},G=e({__name:"setting-proxy",setup:e=>(l(()=>T.value,()=>{j(T.value)}),a(()=>{j(T.value)}),(e,l)=>{const a=w,j=b,T=y,G=f,J=v,K=U,M=V,O=x,P=h,$=k,z=o("bt-loading");return t(),d("div",B,[p((t(),u($,{ref_key:"proxyFormRef",ref:R,model:s(C),rules:s(S),"label-width":"110px",disabled:s(q)},{default:r(()=>[m(j,{label:"代理目录",prop:"path"},{default:r(()=>[m(a,{modelValue:s(C).path,"onUpdate:modelValue":l[0]||(l[0]=e=>s(C).path=e),disabled:"",placeholder:"请输入代理目录",width:"42rem"},null,8,["modelValue"])]),_:1}),m(j,{label:"目标",prop:"targetType"},{default:r(()=>[m(G,{class:"!w-[16rem]",modelValue:s(C).targetType,"onUpdate:modelValue":l[1]||(l[1]=e=>s(C).targetType=e),placeholder:"请选择"},{default:r(()=>[(t(!0),d(n,null,i(s(I),e=>(t(),u(T,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),m(j,{label:" ",prop:"proxysite"},{default:r(()=>[m(a,{modelValue:s(C).proxysite,"onUpdate:modelValue":l[2]||(l[2]=e=>s(C).proxysite=e),placeholder:"http"!==s(C).targetType?"请选择sock文件":"请输入目标URL",width:"42rem",onInput:s(L)},_({_:2},["http"!==s(C).targetType?{name:"append",fn:r(()=>[m(K,{onClick:s(F)},{default:r(()=>[m(J,{icon:"el-folder-opened",class:"cursor-pointer"})]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","placeholder","onInput"])]),_:1}),m(j,{label:"发送域名(host)",prop:"todomain"},{default:r(()=>[m(a,{modelValue:s(C).todomain,"onUpdate:modelValue":l[3]||(l[3]=e=>s(C).todomain=e),placeholder:"请输入发送域名",width:"42rem"},null,8,["modelValue"])]),_:1}),m(j,{label:"备注"},{default:r(()=>[m(a,{modelValue:s(C).ps,"onUpdate:modelValue":l[4]||(l[4]=e=>s(C).ps=e),placeholder:"请输入备注,可为空",width:"42rem"},null,8,["modelValue"])]),_:1}),m(j,{label:"websocket支持"},{default:r(()=>[m(O,{disabled:!s(H),effect:"dark",content:"全局websocket已开启，不允许单独关闭",placement:"top"},{default:r(()=>[m(M,{disabled:s(H),modelValue:s(C).websocket,"onUpdate:modelValue":l[5]||(l[5]=e=>s(C).websocket=e)},null,8,["disabled","modelValue"])]),_:1},8,["disabled"])]),_:1}),m(j,{label:"连接超时时间",prop:"proxy_connect_timeout"},{default:r(()=>[m(a,{modelValue:s(C).proxy_connect_timeout,"onUpdate:modelValue":l[6]||(l[6]=e=>s(C).proxy_connect_timeout=e),textType:"秒",width:"41rem"},{append:r(()=>l[9]||(l[9]=[c(" 秒 ",-1)])),_:1},8,["modelValue"])]),_:1}),m(j,{label:"后端请求超时时间",prop:"proxy_send_timeout"},{default:r(()=>[m(a,{modelValue:s(C).proxy_send_timeout,"onUpdate:modelValue":l[7]||(l[7]=e=>s(C).proxy_send_timeout=e),textType:"秒",width:"41rem"},{append:r(()=>l[10]||(l[10]=[c(" 秒 ",-1)])),_:1},8,["modelValue"])]),_:1}),m(j,{label:"代理响应超时时间",prop:"proxy_read_timeout"},{default:r(()=>[m(a,{modelValue:s(C).proxy_read_timeout,"onUpdate:modelValue":l[8]||(l[8]=e=>s(C).proxy_read_timeout=e),textType:"秒",width:"41rem"},{append:r(()=>l[11]||(l[11]=[c(" 秒 ",-1)])),_:1},8,["modelValue"])]),_:1}),m(j,{label:" "},{default:r(()=>[m(P,{type:"primary",onClick:s(N)},{default:r(()=>l[12]||(l[12]=[c("保存",-1)])),_:1,__:[12]},8,["onClick"])]),_:1})]),_:1},8,["model","rules","disabled"])),[[z,s(g)]])])})});export{G as default};
