Repository: fatedier/frp (language: go)

Issue:
配置加密和压缩后，服务端显示未开启。
### Bug Description

![image](https://github.com/fatedier/frp/assets/46226528/c9093010-7b07-4d53-b20d-7021e89bfd99)


### frpc Version

0.52.1

### frps Version

0.52.1

### System Architecture

linux/amd64

### Configurations

```
[[proxies]]
name = "web1"
type = "tcp"
localIP = "127.0.0.1"
localPort = 80
remotePort = 180
transport.useEncryption = true
transport.useCompression = true
```

### Logs

_No response_

### Steps to reproduce

1. 
2. 
3. 
...


### Affected area

- [ ] Docs
- [ ] Installation
- [ ] Performance and Scalability
- [ ] Security
- [ ] User Experience
- [ ] Test and Release
- [ ] Developer Infrastructure
- [ ] Client Plugin
- [ ] Server Plugin
- [ ] Extensions
- [ ] Others


Discussion / hints:

Fix patch:
diff --git a/Release.md b/Release.md
index 2413376f7b8..61ea1f44ec3 100644
--- a/Release.md
+++ b/Release.md
@@ -1,1 +1,3 @@
 ### Fixes
+
+* Encryption and compression are not displayed correctly in the dashboard.
diff --git a/assets/frps/static/index-9465253b.js b/assets/frps/static/index-c322b7dd.js
similarity index 99%
rename from assets/frps/static/index-9465253b.js
rename to assets/frps/static/index-c322b7dd.js
index c2f4e63ddc1..466c8b29eab 100644
--- a/assets/frps/static/index-9465253b.js
+++ b/assets/frps/static/index-c322b7dd.js
@@ -71,4 +71,4 @@ PERFORMANCE OF THIS SOFTWARE.
 
 `:"<br/>",m=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],h,null,d)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=ft(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,d=u.getData(f),h=this._renderMode,v=r.positionDefault,p=ml([d.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(c,f),y=new Xv;m.marker=y.makeTooltipMarker("item",Lu(m.color),h);var _=SS(u.formatTooltip(c,!1,f)),b=p.get("order"),S=p.get("valueFormatter"),w=_.frag,x=w?AS(S?se({valueFormatter:S},w):w,y,h,b,a.get("useUTC"),p.get("textStyle")):_.text,C="item_"+u.name+"_"+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,m,C,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=ft(n),o=a.tooltipConfig,s=o.option||{};if(Te(s)){var l=s;s={content:l,formatter:l}}var u=[s],c=this._ecModel.getComponent(a.componentMainType,a.componentIndex);c&&u.push(c),u.push({formatter:s.content});var f=r.positionDefault,d=ml(u,this._tooltipModel,f?{position:f}:null),h=d.get("content"),v=Math.random()+"",p=new Xv;this._showOrMove(d,function(){var g=Qe(d.get("formatterParams")||{});this._showTooltipContent(d,h,g,v,r.offsetX,r.offsetY,r.position,n,p)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var d=r.get("formatter");l=l||r.get("position");var h=n,v=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),p=v.color;if(d)if(Te(d)){var g=r.ecModel.get("useUTC"),m=ge(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;h=d,y&&(h=mh(m.axisValue,h,g)),h=U2(h,i,!0)}else if(Ve(d)){var _=_t(function(b,S){b===this._ticket&&(f.setContent(S,c,r,p,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,h=d(i,a,_)}else h=d;f.setContent(h,c,r,p,l),f.show(r,p),this._updatePosition(r,l,o,s,f,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||ge(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!ge(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),d=r.get("align"),h=r.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),Ve(n)&&(n=n([i,a],s,o.el,v,{viewSize:[u,c],contentSize:f.slice()})),ge(n))i=gt(n[0],u),a=gt(n[1],c);else if(Ie(n)){var p=n;p.width=f[0],p.height=f[1];var g=Ls(p,{width:u,height:c});i=g.x,a=g.y,d=null,h=null}else if(Te(n)&&l){var m=kte(n,v,f,r.get("borderWidth"));i=m[0],a=m[1]}else{var m=Ote(i,a,o,u,c,d?null:20,h?null:20);i=m[0],a=m[1]}if(d&&(i-=uC(d)?f[0]/2:d==="right"?f[0]:0),h&&(a-=uC(h)?f[1]/2:h==="bottom"?f[1]:0),JL(r)){var m=Rte(i,a,o,u,c);i=m[0],a=m[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&O(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&O(u,function(d,h){var v=f[h]||{},p=d.seriesDataIndices||[],g=v.seriesDataIndices||[];o=o&&d.value===v.value&&d.axisType===v.axisType&&d.axisId===v.axisId&&p.length===g.length,o&&O(p,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&O(d.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],b=a[y];_&&b&&b.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){Ge.node||!n.getDom()||(sm(this,"_updatePosition"),this._tooltipContent.dispose(),xm("itemTooltip",n))},t.type="tooltip",t}(Si);function ml(e,t,r){var n=t.ecModel,i;r?(i=new rr(r,n,n),i=new rr(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof rr&&(o=o.get("tooltip",!0)),Te(o)&&(o={formatter:o}),o&&(i=new rr(o,i,n)))}return i}function lC(e,t){return e.dispatchAction||_t(t.dispatchAction,t)}function Ote(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function Rte(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function kte(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function uC(e){return e==="center"||e==="middle"}function Nte(e,t,r){var n=r0(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=ic(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=ft(u).tooltipConfig;if(c&&c.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}const Fte=Ite;function Bte(e){ua(QL),e.registerComponentModel(mte),e.registerComponentView(Fte),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Tr),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Tr)}var $te=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(St),Hte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=qe(r.get("textBaseline"),r.get("textVerticalAlign")),c=new dr({style:la(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),d=r.get("subtext"),h=new dr({style:la(s,{text:d,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=r.get("link"),p=r.get("sublink"),g=r.get("triggerEvent",!0);c.silent=!v&&!g,h.silent=!p&&!g,v&&c.on("click",function(){iS(v,"_"+r.get("target"))}),p&&h.on("click",function(){iS(p,"_"+r.get("subtarget"))}),ft(c).eventData=ft(h).eventData=g?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),d&&a.add(h);var m=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=Ls(y,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),h.setStyle(b),m=a.getBoundingRect();var S=_.margin,w=r.getItemStyle(["color","opacity"]);w.fill=r.get("backgroundColor");var x=new Ht({shape:{x:m.x-S[3],y:m.y-S[0],width:m.width+S[1]+S[3],height:m.height+S[0]+S[2],r:r.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});a.add(x)}},t.type="title",t}(Si);function zte(e){e.registerComponentModel($te),e.registerComponentView(Hte)}var Wte=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},Vte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),ge(n)&&O(n,function(a,o){Te(a)&&(a={type:a}),n[o]=st(a,Wte(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},t.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,d=f.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(d)),d.length?n=n.concat(d):c=!0}else c=!0;c&&t0(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=Ue(),s=Re(a,function(l){return(Te(l)||bt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new rr(l,this,this.ecModel))},this);this._data=Vt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;O(a,function(o){n[o.get("name")]=!1})}n[r]=!0},t.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},t.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},t.prototype.allSelect=function(){var r=this._data,n=this.option.selected;O(r,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;O(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&ot(this._availableNames,r)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(St);const Cm=Vte;var jo=Rt,Tm=O,gf=cn,Gte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new gf),this.group.add(this._selectorGroup=new gf),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=r.getBoxLayoutParams(),f={width:i.getWidth(),height:i.getHeight()},d=r.get("padding"),h=Ls(c,f,d),v=this.layoutInner(r,o,h,a,l,u),p=Ls(dt({width:v.width,height:v.height},c),f,d);this.group.x=p.x-v.x,this.group.y=p.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=pte(v,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=Ue(),f=n.get("selectedMode"),d=[];i.eachRawSeries(function(h){!h.get("legendHoverLink")&&d.push(h.id)}),Tm(n.getData(),function(h,v){var p=h.get("name");if(!this.newlineDisabled&&(p===""||p===`
 `)){var g=new gf;g.newline=!0,u.add(g);return}var m=i.getSeriesByName(p)[0];if(!c.get(p))if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},b=y.getVisual("legendIcon"),S=y.getVisual("style"),w=this._createItem(m,p,v,h,n,r,_,S,b,f,a);w.on("click",jo(cC,p,null,a,d)).on("mouseover",jo(Mm,m.name,null,a,d)).on("mouseout",jo(Am,m.name,null,a,d)),c.set(p,!0)}else i.eachRawSeries(function(x){if(!c.get(p)&&x.legendVisualProvider){var C=x.legendVisualProvider;if(!C.containName(p))return;var M=C.indexOfName(p),E=C.getItemVisual(M,"style"),A=C.getItemVisual(M,"legendIcon"),T=so(E.fill);T&&T[3]===0&&(T[3]=.2,E=se(se({},E),{fill:Ky(T,"rgba")}));var D=this._createItem(x,p,v,h,n,r,{},E,A,f,a);D.on("click",jo(cC,null,p,a,d)).on("mouseover",jo(Mm,null,p,a,d)).on("mouseout",jo(Am,null,p,a,d)),c.set(p,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();Tm(r,function(u){var c=u.type,f=new dr({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(f);var d=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);m0(f,{normal:d,emphasis:h},{defaultText:u.title}),Kg(f)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,d){var h=r.visualDrawType,v=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var b=Ute(c,a,l,u,h,g,d),S=new gf,w=a.getModel("textStyle");if(Ve(r.getLegendIcon)&&(!_||_==="inherit"))S.add(r.getLegendIcon({itemWidth:v,itemHeight:p,icon:c,iconRotate:m,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}));else{var x=_==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;S.add(jte({itemWidth:v,itemHeight:p,icon:c,iconRotate:x,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}))}var C=s==="left"?v+5:-5,M=s,E=o.get("formatter"),A=n;Te(E)&&E?A=E.replace("{name}",n??""):Ve(E)&&(A=E(n));var T=a.get("inactiveColor");S.add(new dr({style:la(w,{text:A,x:C,y:p/2,fill:g?w.getTextColor():T,align:M,verticalAlign:"middle"})}));var D=new Ht({shape:S.getBoundingRect(),invisible:!0}),N=a.getModel("tooltip");return N.get("show")&&p0({el:D,componentModel:o,itemName:n,itemTooltipOption:N.option}),S.add(D),S.eachChild(function(H){H.silent=!0}),D.silent=!f,this.getContentGroup().add(S),Kg(S),S.__legendDataIndex=i,S},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Xl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Xl("horizontal",u,r.get("selectorItemGap",!0));var d=u.getBoundingRect(),h=[-d.x,-d.y],v=r.get("selectorButtonGap",!0),p=r.getOrient().index,g=p===0?"width":"height",m=p===0?"height":"width",y=p===0?"y":"x";s==="end"?h[p]+=c[g]+v:f[p]+=d[g]+v,h[1-p]+=c[m]/2-d[m]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+v+d[g],_[m]=Math.max(c[m],d[m]),_[y]=Math.min(0,d[y]+h[1-p]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Si);function Ute(e,t,r,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),Tm(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:dm(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var d=t.getModel("lineStyle"),h=d.getLineStyle();if(s(h,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!a){var v=t.get("inactiveBorderWidth"),p=u[c];u.lineWidth=v==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=d.get("inactiveColor"),h.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function jte(e){var t=e.icon||"roundRect",r=R0(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function cC(e,t,r,n){Am(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),Mm(e,t,r,n)}function nD(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;n<i&&!(r=t[n].states.emphasis);)n++;return r&&r.hoverLayer}function Mm(e,t,r,n){nD(r)||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function Am(e,t,r,n){nD(r)||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}const iD=Gte;function Yte(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(r){for(var n=0;n<t.length;n++)if(!t[n].isSelected(r.name))return!1;return!0})}function yl(e,t,r){var n={},i=e==="toggleSelected",a;return r.eachComponent("legend",function(o){i&&a!=null?o[a?"select":"unSelect"](t.name):e==="allSelect"||e==="inverseSelect"?o[e]():(o[e](t.name),a=o.isSelected(t.name));var s=o.getData();O(s,function(l){var u=l.get("name");if(!(u===`
-`||u==="")){var c=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&c:n[u]=c}})}),e==="allSelect"||e==="inverseSelect"?{selected:n}:{name:t.name,selected:n}}function qte(e){e.registerAction("legendToggleSelect","legendselectchanged",Rt(yl,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Rt(yl,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Rt(yl,"inverseSelect")),e.registerAction("legendSelect","legendselected",Rt(yl,"select")),e.registerAction("legendUnSelect","legendunselected",Rt(yl,"unSelect"))}function aD(e){e.registerComponentModel(Cm),e.registerComponentView(iD),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Yte),e.registerSubTypeDefaulter("legend",function(){return"plain"}),qte(e)}var Kte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=xh(r);e.prototype.init.call(this,r,n,i),fC(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),fC(this,this.option,r)},t.type="legend.scroll",t.defaultOption=I2(Cm.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(Cm);function fC(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,Ds(t,r,{type:"box",ignoreSize:!!i})}const Xte=Kte;var dC=cn,wp=["width","height"],Sp=["x","y"],Zte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new dC),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new dC)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),d=ge(f)?f:[f,f];v("pagePrev",0);var h=n.getModel("pageTextStyle");c.add(new dr({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(p,g){var m=p+"DataIndex",y=v0(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:_t(u._pageGo,u,m,n,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});y.name=p,c.add(y)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=wp[u],f=Sp[u],d=wp[1-u],h=Sp[1-u];o&&Xl("horizontal",l,r.get("selectorItemGap",!0));var v=r.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],m=Qe(i);o&&(m[c]=i[c]-p[c]-v);var y=this._layoutContentAndController(r,a,m,u,c,d,h,f);if(o){if(s==="end")g[u]+=y[c]+v;else{var _=p[c]+v;g[u]-=_,y[f]-=_}y[c]+=p[c]+v,g[1-u]+=y[h]+y[d]/2-p[d]/2,y[d]=Math.max(y[d],p[d]),y[h]=Math.min(y[h],p[h]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,d=this._controllerGroup;Xl(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),Xl("horizontal",d,r.get("pageButtonItemGap",!0));var h=c.getBoundingRect(),v=d.getBoundingRect(),p=this._showController=h[o]>i[o],g=[-h.x,-h.y];n||(g[a]=c[u]);var m=[0,0],y=[-v.x,-v.y],_=qe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(p){var b=r.get("pageButtonPosition",!0);b==="end"?y[a]+=i[o]-v[o]:m[a]+=v[o]+_}y[1-a]+=h[s]/2-v[s]/2,c.setPosition(g),f.setPosition(m),d.setPosition(y);var S={x:0,y:0};if(S[o]=p?i[o]:h[o],S[s]=Math.max(h[s],v[s]),S[l]=Math.min(0,v[l]+y[1-a]),f.__rectSize=i[o],p){var w={x:0,y:0};w[o]=Math.max(i[o]-v[o]-_,0),w[s]=S[s],f.setClipPath(new Ht({shape:w})),f.__rectSize=w[o]}else d.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(r);return x.pageIndex!=null&&Er(c,{x:x.contentPosition[0],y:x.contentPosition[1]},p?r:null),this._updatePageInfoView(r,x),S},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;O(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=n[f]!=null,h=i.childOfName(c);h&&(h.setStyle("fill",d?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",Te(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=wp[o],l=Sp[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],d=c.length,h=d?1:0,v={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var p=b(f);v.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=d;++g)_=b(c[g]),(!_&&y.e>m.s+a||_&&!S(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=m.i),++v.pageCount)),y=_;for(var g=u-1,m=p,y=p,_=null;g>=-1;--g)_=b(c[g]),(!_||!S(y,_.s))&&m.i<y.i&&(y=m,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=m.i),++v.pageCount,++v.pageIndex),m=_;return v;function b(w){if(w){var x=w.getBoundingRect(),C=x[l]+w[l];return{s:C,e:C+x[s],i:w.__legendDataIndex}}}function S(w,x){return w.e>=x&&w.s<=x+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(iD);const Qte=Zte;function Jte(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function ere(e){ua(aD),e.registerComponentModel(Xte),e.registerComponentView(Qte),Jte(e)}function tre(e){ua(aD),ua(ere)}ua([KJ,OJ,$ee,sJ,zte,Bte,tre,vte]);function rre(e,t,r){const n=B0(document.getElementById(e),"macarons");n.showLoading();const i={title:{text:"Network Traffic",subtext:"today",left:"center"},tooltip:{trigger:"item",formatter:function(a){return aa.fileSize(a.data.value)+" ("+a.percent+"%)"}},legend:{orient:"vertical",left:"left",data:["Traffic In","Traffic Out"]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[{value:t,name:"Traffic In"},{value:r,name:"Traffic Out"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};n.setOption(i),n.hideLoading()}function nre(e,t){const r=B0(document.getElementById(e),"macarons");r.showLoading();const n={title:{text:"Proxies",subtext:"now",left:"center"},tooltip:{trigger:"item",formatter:function(i){return String(i.data.value)}},legend:{orient:"vertical",left:"left",data:[]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};t.proxyTypeCount.tcp!=null&&t.proxyTypeCount.tcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.tcp,name:"TCP"}),n.legend.data.push("TCP")),t.proxyTypeCount.udp!=null&&t.proxyTypeCount.udp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.udp,name:"UDP"}),n.legend.data.push("UDP")),t.proxyTypeCount.http!=null&&t.proxyTypeCount.http!=0&&(n.series[0].data.push({value:t.proxyTypeCount.http,name:"HTTP"}),n.legend.data.push("HTTP")),t.proxyTypeCount.https!=null&&t.proxyTypeCount.https!=0&&(n.series[0].data.push({value:t.proxyTypeCount.https,name:"HTTPS"}),n.legend.data.push("HTTPS")),t.proxyTypeCount.stcp!=null&&t.proxyTypeCount.stcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.stcp,name:"STCP"}),n.legend.data.push("STCP")),t.proxyTypeCount.sudp!=null&&t.proxyTypeCount.sudp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.sudp,name:"SUDP"}),n.legend.data.push("SUDP")),t.proxyTypeCount.xtcp!=null&&t.proxyTypeCount.xtcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.xtcp,name:"XTCP"}),n.legend.data.push("XTCP")),r.setOption(n),r.hideLoading()}function ire(e,t,r){const n={width:"600px",height:"400px"},i=B0(document.getElementById(e),"macarons",n);i.showLoading(),t=t.reverse(),r=r.reverse();let a=new Date;a=new Date(a.getFullYear(),a.getMonth(),a.getDate()-6);const o=[];for(let l=0;l<7;l++)o.push(a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()),a=new Date(a.getFullYear(),a.getMonth(),a.getDate()+1);const s={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(l){let u="";l.length>0&&(u+=l[0].name+"<br/>");for(const c of l){const f='<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:'+c.color+'"></span>';u+=f+c.seriesName+": "+aa.fileSize(c.value)+"<br/>"}return u}},legend:{data:["Traffic In","Traffic Out"]},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:o}],yAxis:[{type:"value",axisLabel:{formatter:function(l){return aa.fileSize(l)}}}],series:[{name:"Traffic In",type:"bar",data:t},{name:"Traffic Out",type:"bar",data:r}]};i.setOption(s),i.hideLoading()}const hC=ce({__name:"LongSpan",props:{content:null,length:null},setup(e){return(t,r)=>{const n=Ju;return Y(),me(pt,null,[ee(n,{content:e.content,placement:"top"},{default:Z(()=>[nr(ae("span",null,Me(e.content.slice(0,e.length))+"...",513),[[yi,e.content.length>e.length]])]),_:1},8,["content"]),nr(ae("span",null,Me(e.content),513),[[yi,e.content.length<30]])],64)}}}),are={class:"source"},ore=ae("div",{id:"traffic",style:{width:"400px",height:"250px","margin-bottom":"30px"}},null,-1),sre=ae("div",{id:"proxies",style:{width:"400px",height:"250px"}},null,-1),lre=ce({__name:"ServerOverview",setup(e){let t=B({version:"",bindPort:0,kcpBindPort:0,quicBindPort:0,vhostHTTPPort:0,vhostHTTPSPort:0,tcpmuxHTTPConnectPort:0,subdomainHost:"",maxPoolCount:0,maxPortsPerClient:"",allowPortsStr:"",tlsForce:!1,heartbeatTimeout:0,clientCounts:0,curConns:0,proxyCounts:0});return(()=>{fetch("../api/serverinfo",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value.version=n.version,t.value.bindPort=n.bindPort,t.value.kcpBindPort=n.kcpBindPort,t.value.quicBindPort=n.quicBindPort,t.value.vhostHTTPPort=n.vhostHTTPPort,t.value.vhostHTTPSPort=n.vhostHTTPSPort,t.value.tcpmuxHTTPConnectPort=n.tcpmuxHTTPConnectPort,t.value.subdomainHost=n.subdomainHost,t.value.maxPoolCount=n.maxPoolCount,t.value.maxPortsPerClient=n.maxPortsPerClient,t.value.maxPortsPerClient=="0"&&(t.value.maxPortsPerClient="no limit"),t.value.allowPortsStr=n.allowPortsStr,t.value.tlsForce=n.tlsForce,t.value.heartbeatTimeout=n.heartbeatTimeout,t.value.clientCounts=n.clientCounts,t.value.curConns=n.curConns,t.value.proxyCounts=0,n.proxyTypeCount!=null&&(n.proxyTypeCount.tcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.tcp),n.proxyTypeCount.udp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.udp),n.proxyTypeCount.http!=null&&(t.value.proxyCounts+=n.proxyTypeCount.http),n.proxyTypeCount.https!=null&&(t.value.proxyCounts+=n.proxyTypeCount.https),n.proxyTypeCount.stcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.stcp),n.proxyTypeCount.sudp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.sudp),n.proxyTypeCount.xtcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.xtcp)),rre("traffic",n.totalTrafficIn,n.totalTrafficOut),nre("proxies",n)}).catch(()=>{DA({showClose:!0,message:"Get server info from frps failed!",type:"warning"})})})(),(n,i)=>{const a=zM,o=HM,s=pA,l=vA;return Y(),me("div",null,[ee(l,null,{default:Z(()=>[ee(s,{md:12},{default:Z(()=>[ae("div",are,[ee(o,{"label-position":"left","label-width":"220px",class:"server_info"},{default:Z(()=>[ee(a,{label:"Version"},{default:Z(()=>[ae("span",null,Me(P(t).version),1)]),_:1}),ee(a,{label:"BindPort"},{default:Z(()=>[ae("span",null,Me(P(t).bindPort),1)]),_:1}),P(t).kcpBindPort!=0?(Y(),_e(a,{key:0,label:"KCP Bind Port"},{default:Z(()=>[ae("span",null,Me(P(t).kcpBindPort),1)]),_:1})):Fe("",!0),P(t).quicBindPort!=0?(Y(),_e(a,{key:1,label:"QUIC Bind Port"},{default:Z(()=>[ae("span",null,Me(P(t).quicBindPort),1)]),_:1})):Fe("",!0),P(t).vhostHTTPPort!=0?(Y(),_e(a,{key:2,label:"Http Port"},{default:Z(()=>[ae("span",null,Me(P(t).vhostHTTPPort),1)]),_:1})):Fe("",!0),P(t).vhostHTTPSPort!=0?(Y(),_e(a,{key:3,label:"Https Port"},{default:Z(()=>[ae("span",null,Me(P(t).vhostHTTPSPort),1)]),_:1})):Fe("",!0),P(t).tcpmuxHTTPConnectPort!=0?(Y(),_e(a,{key:4,label:"TCPMux HTTPConnect Port"},{default:Z(()=>[ae("span",null,Me(P(t).tcpmuxHTTPConnectPort),1)]),_:1})):Fe("",!0),P(t).subdomainHost!=""?(Y(),_e(a,{key:5,label:"Subdomain Host"},{default:Z(()=>[ee(hC,{content:P(t).subdomainHost,length:30},null,8,["content"])]),_:1})):Fe("",!0),ee(a,{label:"Max PoolCount"},{default:Z(()=>[ae("span",null,Me(P(t).maxPoolCount),1)]),_:1}),ee(a,{label:"Max Ports Per Client"},{default:Z(()=>[ae("span",null,Me(P(t).maxPortsPerClient),1)]),_:1}),P(t).allowPortsStr!=""?(Y(),_e(a,{key:6,label:"Allow Ports"},{default:Z(()=>[ee(hC,{content:P(t).allowPortsStr,length:30},null,8,["content"])]),_:1})):Fe("",!0),P(t).tlsForce===!0?(Y(),_e(a,{key:7,label:"TLS Force"},{default:Z(()=>[ae("span",null,Me(P(t).tlsForce),1)]),_:1})):Fe("",!0),ee(a,{label:"HeartBeat Timeout"},{default:Z(()=>[ae("span",null,Me(P(t).heartbeatTimeout),1)]),_:1}),ee(a,{label:"Client Counts"},{default:Z(()=>[ae("span",null,Me(P(t).clientCounts),1)]),_:1}),ee(a,{label:"Current Connections"},{default:Z(()=>[ae("span",null,Me(P(t).curConns),1)]),_:1}),ee(a,{label:"Proxy Counts"},{default:Z(()=>[ae("span",null,Me(P(t).proxyCounts),1)]),_:1})]),_:1})])]),_:1}),ee(s,{md:12},{default:Z(()=>[ore,sre]),_:1})]),_:1})])}}});class Us{constructor(t){Wt(this,"name");Wt(this,"type");Wt(this,"encryption");Wt(this,"compression");Wt(this,"conns");Wt(this,"trafficIn");Wt(this,"trafficOut");Wt(this,"lastStartTime");Wt(this,"lastCloseTime");Wt(this,"status");Wt(this,"clientVersion");Wt(this,"addr");Wt(this,"port");Wt(this,"customDomains");Wt(this,"hostHeaderRewrite");Wt(this,"locations");Wt(this,"subdomain");this.name=t.name,this.type="",this.encryption=!1,this.compression=!1,t.conf!=null&&t.conf.useEncryption!=null&&(this.encryption=t.conf.useEncryption),t.conf!=null&&t.conf.useCompression!=null&&(this.compression=t.conf.useCompression),this.conns=t.curConns,this.trafficIn=t.todayTrafficIn,this.trafficOut=t.todayTrafficOut,this.lastStartTime=t.lastStartTime,this.lastCloseTime=t.lastCloseTime,this.status=t.status,this.clientVersion=t.clientVersion,this.addr="",this.port=0,this.customDomains="",this.hostHeaderRewrite="",this.locations="",this.subdomain=""}}class ure extends Us{constructor(t){super(t),this.type="tcp",t.conf!=null?(this.addr=":"+t.conf.remotePort,this.port=t.conf.remotePort):(this.addr="",this.port=0)}}class cre extends Us{constructor(t){super(t),this.type="udp",t.conf!=null?(this.addr=":"+t.conf.remotePort,this.port=t.conf.remotePort):(this.addr="",this.port=0)}}class fre extends Us{constructor(t,r,n){super(t),this.type="http",this.port=r,t.conf!=null&&(t.conf.customDomains!=null&&(this.customDomains=t.conf.customDomains),this.hostHeaderRewrite=t.conf.hostHeaderRewrite,this.locations=t.conf.locations,t.conf.subdomain!=null&&t.conf.subdomain!=""&&(this.subdomain=t.conf.subdomain+"."+n))}}class dre extends Us{constructor(t,r,n){super(t),this.type="https",this.port=r,t.conf!=null&&(t.conf.customDomains!=null&&(this.customDomains=t.conf.customDomains),t.conf.subdomain!=null&&t.conf.subdomain!=""&&(this.subdomain=t.conf.subdomain+"."+n))}}class hre extends Us{constructor(t){super(t),this.type="stcp"}}class vre extends Us{constructor(t){super(t),this.type="sudp"}}const pre=["id"],gre=ce({__name:"Traffic",props:{proxyName:null},setup(e){const t=e;return(()=>{let n="../api/traffic/"+t.proxyName;fetch(n,{credentials:"include"}).then(i=>i.json()).then(i=>{ire(t.proxyName,i.trafficIn,i.trafficOut)}).catch(i=>{DA({showClose:!0,message:"Get traffic info failed!"+i,type:"warning"})})})(),(n,i)=>(Y(),me("div",{id:e.proxyName,style:{width:"600px",height:"400px"}},null,8,pre))}}),mre=ce({__name:"ProxyViewExpand",props:{row:null,proxyType:null},setup(e){return(t,r)=>{const n=zM,i=HM;return e.proxyType==="http"||e.proxyType==="https"?(Y(),_e(i,{key:0,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:Z(()=>[ee(n,{label:"Name"},{default:Z(()=>[ae("span",null,Me(e.row.name),1)]),_:1}),ee(n,{label:"Type"},{default:Z(()=>[ae("span",null,Me(e.row.type),1)]),_:1}),ee(n,{label:"Domains"},{default:Z(()=>[ae("span",null,Me(e.row.customDomains),1)]),_:1}),ee(n,{label:"SubDomain"},{default:Z(()=>[ae("span",null,Me(e.row.subdomain),1)]),_:1}),ee(n,{label:"locations"},{default:Z(()=>[ae("span",null,Me(e.row.locations),1)]),_:1}),ee(n,{label:"HostRewrite"},{default:Z(()=>[ae("span",null,Me(e.row.hostHeaderRewrite),1)]),_:1}),ee(n,{label:"Encryption"},{default:Z(()=>[ae("span",null,Me(e.row.encryption),1)]),_:1}),ee(n,{label:"Compression"},{default:Z(()=>[ae("span",null,Me(e.row.compression),1)]),_:1}),ee(n,{label:"Last Start"},{default:Z(()=>[ae("span",null,Me(e.row.lastStartTime),1)]),_:1}),ee(n,{label:"Last Close"},{default:Z(()=>[ae("span",null,Me(e.row.lastCloseTime),1)]),_:1})]),_:1})):(Y(),_e(i,{key:1,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:Z(()=>[ee(n,{label:"Name"},{default:Z(()=>[ae("span",null,Me(e.row.name),1)]),_:1}),ee(n,{label:"Type"},{default:Z(()=>[ae("span",null,Me(e.row.type),1)]),_:1}),ee(n,{label:"Addr"},{default:Z(()=>[ae("span",null,Me(e.row.addr),1)]),_:1}),ee(n,{label:"Encryption"},{default:Z(()=>[ae("span",null,Me(e.row.encryption),1)]),_:1}),ee(n,{label:"Compression"},{default:Z(()=>[ae("span",null,Me(e.row.compression),1)]),_:1}),ee(n,{label:"Last Start"},{default:Z(()=>[ae("span",null,Me(e.row.lastStartTime),1)]),_:1}),ee(n,{label:"Last Close"},{default:Z(()=>[ae("span",null,Me(e.row.lastCloseTime),1)]),_:1})]),_:1}))}}}),js=ce({__name:"ProxyView",props:{proxies:null,proxyType:null},setup(e){const t=(n,i)=>aa.fileSize(n.trafficIn),r=(n,i)=>aa.fileSize(n.trafficOut);return(n,i)=>{const a=gre,o=J6,s=IW,l=ZV,u=O8,c=XV;return Y(),me("div",null,[ee(c,{data:e.proxies,"default-sort":{prop:"name",order:"ascending"},style:{width:"100%"}},{default:Z(()=>[ee(l,{type:"expand"},{default:Z(f=>[ee(s,{placement:"right",width:"600",style:{"margin-left":"0px"},trigger:"click"},{default:Z(()=>[ee(a,{proxyName:f.row.name},null,8,["proxyName"])]),reference:Z(()=>[ee(o,{type:"primary",size:"large",name:f.row.name,style:{"margin-bottom":"10px"}},{default:Z(()=>[Bt("Traffic Statistics ")]),_:2},1032,["name"])]),_:2},1024),ee(mre,{row:f.row,proxyType:e.proxyType},null,8,["row","proxyType"])]),_:1}),ee(l,{label:"Name",prop:"name",sortable:""}),ee(l,{label:"Port",prop:"port",sortable:""}),ee(l,{label:"Connections",prop:"conns",sortable:""}),ee(l,{label:"Traffic In",prop:"trafficIn",formatter:t,sortable:""}),ee(l,{label:"Traffic Out",prop:"trafficOut",formatter:r,sortable:""}),ee(l,{label:"ClientVersion",prop:"clientVersion",sortable:""}),ee(l,{label:"Status",prop:"status",sortable:""},{default:Z(f=>[f.row.status==="online"?(Y(),_e(u,{key:0,type:"success"},{default:Z(()=>[Bt(Me(f.row.status),1)]),_:2},1024)):(Y(),_e(u,{key:1,type:"danger"},{default:Z(()=>[Bt(Me(f.row.status),1)]),_:2},1024))]),_:1})]),_:1},8,["data"])])}}}),yre=ce({__name:"ProxiesTCP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/tcp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new ure(i))})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"tcp"},null,8,["proxies"]))}}),_re=ce({__name:"ProxiesUDP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/udp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new cre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"udp"},null,8,["proxies"]))}}),bre=ce({__name:"ProxiesHTTP",setup(e){let t=B([]);return(()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhostHTTPPort,i=a.subdomainHost,!(n==null||n==0)&&fetch("../api/proxy/http",{credentials:"include"}).then(o=>o.json()).then(o=>{for(let s of o.proxies)t.value.push(new fre(s,n,i))})})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"http"},null,8,["proxies"]))}}),wre=ce({__name:"ProxiesHTTPS",setup(e){let t=B([]);return(()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhostHTTPSPort,i=a.subdomainHost,!(n==null||n==0)&&fetch("../api/proxy/https",{credentials:"include"}).then(o=>o.json()).then(o=>{for(let s of o.proxies)t.value.push(new dre(s,n,i))})})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"https"},null,8,["proxies"]))}}),Sre=ce({__name:"ProxiesSTCP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/stcp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new hre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"stcp"},null,8,["proxies"]))}}),xre=ce({__name:"ProxiesSUDP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/sudp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new vre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"sudp"},null,8,["proxies"]))}}),Cre=xU({history:$G(),routes:[{path:"/",name:"ServerOverview",component:lre},{path:"/proxies/tcp",name:"ProxiesTCP",component:yre},{path:"/proxies/udp",name:"ProxiesUDP",component:_re},{path:"/proxies/http",name:"ProxiesHTTP",component:bre},{path:"/proxies/https",name:"ProxiesHTTPS",component:wre},{path:"/proxies/stcp",name:"ProxiesSTCP",component:Sre},{path:"/proxies/sudp",name:"ProxiesSUDP",component:xre}]}),oD=YO(bG);oD.use(Cre);oD.mount("#app")});export default Tre();
+`||u==="")){var c=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&c:n[u]=c}})}),e==="allSelect"||e==="inverseSelect"?{selected:n}:{name:t.name,selected:n}}function qte(e){e.registerAction("legendToggleSelect","legendselectchanged",Rt(yl,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Rt(yl,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Rt(yl,"inverseSelect")),e.registerAction("legendSelect","legendselected",Rt(yl,"select")),e.registerAction("legendUnSelect","legendunselected",Rt(yl,"unSelect"))}function aD(e){e.registerComponentModel(Cm),e.registerComponentView(iD),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Yte),e.registerSubTypeDefaulter("legend",function(){return"plain"}),qte(e)}var Kte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=xh(r);e.prototype.init.call(this,r,n,i),fC(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),fC(this,this.option,r)},t.type="legend.scroll",t.defaultOption=I2(Cm.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(Cm);function fC(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,Ds(t,r,{type:"box",ignoreSize:!!i})}const Xte=Kte;var dC=cn,wp=["width","height"],Sp=["x","y"],Zte=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new dC),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new dC)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),d=ge(f)?f:[f,f];v("pagePrev",0);var h=n.getModel("pageTextStyle");c.add(new dr({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(p,g){var m=p+"DataIndex",y=v0(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:_t(u._pageGo,u,m,n,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});y.name=p,c.add(y)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=wp[u],f=Sp[u],d=wp[1-u],h=Sp[1-u];o&&Xl("horizontal",l,r.get("selectorItemGap",!0));var v=r.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],m=Qe(i);o&&(m[c]=i[c]-p[c]-v);var y=this._layoutContentAndController(r,a,m,u,c,d,h,f);if(o){if(s==="end")g[u]+=y[c]+v;else{var _=p[c]+v;g[u]-=_,y[f]-=_}y[c]+=p[c]+v,g[1-u]+=y[h]+y[d]/2-p[d]/2,y[d]=Math.max(y[d],p[d]),y[h]=Math.min(y[h],p[h]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,d=this._controllerGroup;Xl(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),Xl("horizontal",d,r.get("pageButtonItemGap",!0));var h=c.getBoundingRect(),v=d.getBoundingRect(),p=this._showController=h[o]>i[o],g=[-h.x,-h.y];n||(g[a]=c[u]);var m=[0,0],y=[-v.x,-v.y],_=qe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(p){var b=r.get("pageButtonPosition",!0);b==="end"?y[a]+=i[o]-v[o]:m[a]+=v[o]+_}y[1-a]+=h[s]/2-v[s]/2,c.setPosition(g),f.setPosition(m),d.setPosition(y);var S={x:0,y:0};if(S[o]=p?i[o]:h[o],S[s]=Math.max(h[s],v[s]),S[l]=Math.min(0,v[l]+y[1-a]),f.__rectSize=i[o],p){var w={x:0,y:0};w[o]=Math.max(i[o]-v[o]-_,0),w[s]=S[s],f.setClipPath(new Ht({shape:w})),f.__rectSize=w[o]}else d.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(r);return x.pageIndex!=null&&Er(c,{x:x.contentPosition[0],y:x.contentPosition[1]},p?r:null),this._updatePageInfoView(r,x),S},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;O(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=n[f]!=null,h=i.childOfName(c);h&&(h.setStyle("fill",d?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",Te(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=wp[o],l=Sp[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],d=c.length,h=d?1:0,v={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var p=b(f);v.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=d;++g)_=b(c[g]),(!_&&y.e>m.s+a||_&&!S(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=m.i),++v.pageCount)),y=_;for(var g=u-1,m=p,y=p,_=null;g>=-1;--g)_=b(c[g]),(!_||!S(y,_.s))&&m.i<y.i&&(y=m,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=m.i),++v.pageCount,++v.pageIndex),m=_;return v;function b(w){if(w){var x=w.getBoundingRect(),C=x[l]+w[l];return{s:C,e:C+x[s],i:w.__legendDataIndex}}}function S(w,x){return w.e>=x&&w.s<=x+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(iD);const Qte=Zte;function Jte(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function ere(e){ua(aD),e.registerComponentModel(Xte),e.registerComponentView(Qte),Jte(e)}function tre(e){ua(aD),ua(ere)}ua([KJ,OJ,$ee,sJ,zte,Bte,tre,vte]);function rre(e,t,r){const n=B0(document.getElementById(e),"macarons");n.showLoading();const i={title:{text:"Network Traffic",subtext:"today",left:"center"},tooltip:{trigger:"item",formatter:function(a){return aa.fileSize(a.data.value)+" ("+a.percent+"%)"}},legend:{orient:"vertical",left:"left",data:["Traffic In","Traffic Out"]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[{value:t,name:"Traffic In"},{value:r,name:"Traffic Out"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};n.setOption(i),n.hideLoading()}function nre(e,t){const r=B0(document.getElementById(e),"macarons");r.showLoading();const n={title:{text:"Proxies",subtext:"now",left:"center"},tooltip:{trigger:"item",formatter:function(i){return String(i.data.value)}},legend:{orient:"vertical",left:"left",data:[]},series:[{type:"pie",radius:"55%",center:["50%","60%"],data:[],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};t.proxyTypeCount.tcp!=null&&t.proxyTypeCount.tcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.tcp,name:"TCP"}),n.legend.data.push("TCP")),t.proxyTypeCount.udp!=null&&t.proxyTypeCount.udp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.udp,name:"UDP"}),n.legend.data.push("UDP")),t.proxyTypeCount.http!=null&&t.proxyTypeCount.http!=0&&(n.series[0].data.push({value:t.proxyTypeCount.http,name:"HTTP"}),n.legend.data.push("HTTP")),t.proxyTypeCount.https!=null&&t.proxyTypeCount.https!=0&&(n.series[0].data.push({value:t.proxyTypeCount.https,name:"HTTPS"}),n.legend.data.push("HTTPS")),t.proxyTypeCount.stcp!=null&&t.proxyTypeCount.stcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.stcp,name:"STCP"}),n.legend.data.push("STCP")),t.proxyTypeCount.sudp!=null&&t.proxyTypeCount.sudp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.sudp,name:"SUDP"}),n.legend.data.push("SUDP")),t.proxyTypeCount.xtcp!=null&&t.proxyTypeCount.xtcp!=0&&(n.series[0].data.push({value:t.proxyTypeCount.xtcp,name:"XTCP"}),n.legend.data.push("XTCP")),r.setOption(n),r.hideLoading()}function ire(e,t,r){const n={width:"600px",height:"400px"},i=B0(document.getElementById(e),"macarons",n);i.showLoading(),t=t.reverse(),r=r.reverse();let a=new Date;a=new Date(a.getFullYear(),a.getMonth(),a.getDate()-6);const o=[];for(let l=0;l<7;l++)o.push(a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()),a=new Date(a.getFullYear(),a.getMonth(),a.getDate()+1);const s={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(l){let u="";l.length>0&&(u+=l[0].name+"<br/>");for(const c of l){const f='<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:'+c.color+'"></span>';u+=f+c.seriesName+": "+aa.fileSize(c.value)+"<br/>"}return u}},legend:{data:["Traffic In","Traffic Out"]},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:o}],yAxis:[{type:"value",axisLabel:{formatter:function(l){return aa.fileSize(l)}}}],series:[{name:"Traffic In",type:"bar",data:t},{name:"Traffic Out",type:"bar",data:r}]};i.setOption(s),i.hideLoading()}const hC=ce({__name:"LongSpan",props:{content:null,length:null},setup(e){return(t,r)=>{const n=Ju;return Y(),me(pt,null,[ee(n,{content:e.content,placement:"top"},{default:Z(()=>[nr(ae("span",null,Me(e.content.slice(0,e.length))+"...",513),[[yi,e.content.length>e.length]])]),_:1},8,["content"]),nr(ae("span",null,Me(e.content),513),[[yi,e.content.length<30]])],64)}}}),are={class:"source"},ore=ae("div",{id:"traffic",style:{width:"400px",height:"250px","margin-bottom":"30px"}},null,-1),sre=ae("div",{id:"proxies",style:{width:"400px",height:"250px"}},null,-1),lre=ce({__name:"ServerOverview",setup(e){let t=B({version:"",bindPort:0,kcpBindPort:0,quicBindPort:0,vhostHTTPPort:0,vhostHTTPSPort:0,tcpmuxHTTPConnectPort:0,subdomainHost:"",maxPoolCount:0,maxPortsPerClient:"",allowPortsStr:"",tlsForce:!1,heartbeatTimeout:0,clientCounts:0,curConns:0,proxyCounts:0});return(()=>{fetch("../api/serverinfo",{credentials:"include"}).then(n=>n.json()).then(n=>{t.value.version=n.version,t.value.bindPort=n.bindPort,t.value.kcpBindPort=n.kcpBindPort,t.value.quicBindPort=n.quicBindPort,t.value.vhostHTTPPort=n.vhostHTTPPort,t.value.vhostHTTPSPort=n.vhostHTTPSPort,t.value.tcpmuxHTTPConnectPort=n.tcpmuxHTTPConnectPort,t.value.subdomainHost=n.subdomainHost,t.value.maxPoolCount=n.maxPoolCount,t.value.maxPortsPerClient=n.maxPortsPerClient,t.value.maxPortsPerClient=="0"&&(t.value.maxPortsPerClient="no limit"),t.value.allowPortsStr=n.allowPortsStr,t.value.tlsForce=n.tlsForce,t.value.heartbeatTimeout=n.heartbeatTimeout,t.value.clientCounts=n.clientCounts,t.value.curConns=n.curConns,t.value.proxyCounts=0,n.proxyTypeCount!=null&&(n.proxyTypeCount.tcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.tcp),n.proxyTypeCount.udp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.udp),n.proxyTypeCount.http!=null&&(t.value.proxyCounts+=n.proxyTypeCount.http),n.proxyTypeCount.https!=null&&(t.value.proxyCounts+=n.proxyTypeCount.https),n.proxyTypeCount.stcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.stcp),n.proxyTypeCount.sudp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.sudp),n.proxyTypeCount.xtcp!=null&&(t.value.proxyCounts+=n.proxyTypeCount.xtcp)),rre("traffic",n.totalTrafficIn,n.totalTrafficOut),nre("proxies",n)}).catch(()=>{DA({showClose:!0,message:"Get server info from frps failed!",type:"warning"})})})(),(n,i)=>{const a=zM,o=HM,s=pA,l=vA;return Y(),me("div",null,[ee(l,null,{default:Z(()=>[ee(s,{md:12},{default:Z(()=>[ae("div",are,[ee(o,{"label-position":"left","label-width":"220px",class:"server_info"},{default:Z(()=>[ee(a,{label:"Version"},{default:Z(()=>[ae("span",null,Me(P(t).version),1)]),_:1}),ee(a,{label:"BindPort"},{default:Z(()=>[ae("span",null,Me(P(t).bindPort),1)]),_:1}),P(t).kcpBindPort!=0?(Y(),_e(a,{key:0,label:"KCP Bind Port"},{default:Z(()=>[ae("span",null,Me(P(t).kcpBindPort),1)]),_:1})):Fe("",!0),P(t).quicBindPort!=0?(Y(),_e(a,{key:1,label:"QUIC Bind Port"},{default:Z(()=>[ae("span",null,Me(P(t).quicBindPort),1)]),_:1})):Fe("",!0),P(t).vhostHTTPPort!=0?(Y(),_e(a,{key:2,label:"Http Port"},{default:Z(()=>[ae("span",null,Me(P(t).vhostHTTPPort),1)]),_:1})):Fe("",!0),P(t).vhostHTTPSPort!=0?(Y(),_e(a,{key:3,label:"Https Port"},{default:Z(()=>[ae("span",null,Me(P(t).vhostHTTPSPort),1)]),_:1})):Fe("",!0),P(t).tcpmuxHTTPConnectPort!=0?(Y(),_e(a,{key:4,label:"TCPMux HTTPConnect Port"},{default:Z(()=>[ae("span",null,Me(P(t).tcpmuxHTTPConnectPort),1)]),_:1})):Fe("",!0),P(t).subdomainHost!=""?(Y(),_e(a,{key:5,label:"Subdomain Host"},{default:Z(()=>[ee(hC,{content:P(t).subdomainHost,length:30},null,8,["content"])]),_:1})):Fe("",!0),ee(a,{label:"Max PoolCount"},{default:Z(()=>[ae("span",null,Me(P(t).maxPoolCount),1)]),_:1}),ee(a,{label:"Max Ports Per Client"},{default:Z(()=>[ae("span",null,Me(P(t).maxPortsPerClient),1)]),_:1}),P(t).allowPortsStr!=""?(Y(),_e(a,{key:6,label:"Allow Ports"},{default:Z(()=>[ee(hC,{content:P(t).allowPortsStr,length:30},null,8,["content"])]),_:1})):Fe("",!0),P(t).tlsForce===!0?(Y(),_e(a,{key:7,label:"TLS Force"},{default:Z(()=>[ae("span",null,Me(P(t).tlsForce),1)]),_:1})):Fe("",!0),ee(a,{label:"HeartBeat Timeout"},{default:Z(()=>[ae("span",null,Me(P(t).heartbeatTimeout),1)]),_:1}),ee(a,{label:"Client Counts"},{default:Z(()=>[ae("span",null,Me(P(t).clientCounts),1)]),_:1}),ee(a,{label:"Current Connections"},{default:Z(()=>[ae("span",null,Me(P(t).curConns),1)]),_:1}),ee(a,{label:"Proxy Counts"},{default:Z(()=>[ae("span",null,Me(P(t).proxyCounts),1)]),_:1})]),_:1})])]),_:1}),ee(s,{md:12},{default:Z(()=>[ore,sre]),_:1})]),_:1})])}}});class Us{constructor(t){Wt(this,"name");Wt(this,"type");Wt(this,"encryption");Wt(this,"compression");Wt(this,"conns");Wt(this,"trafficIn");Wt(this,"trafficOut");Wt(this,"lastStartTime");Wt(this,"lastCloseTime");Wt(this,"status");Wt(this,"clientVersion");Wt(this,"addr");Wt(this,"port");Wt(this,"customDomains");Wt(this,"hostHeaderRewrite");Wt(this,"locations");Wt(this,"subdomain");var r,n,i,a;this.name=t.name,this.type="",this.encryption=!1,this.compression=!1,this.encryption=((n=(r=t.conf)==null?void 0:r.transport)==null?void 0:n.useEncryption)||this.encryption,this.compression=((a=(i=t.conf)==null?void 0:i.transport)==null?void 0:a.useCompression)||this.compression,this.conns=t.curConns,this.trafficIn=t.todayTrafficIn,this.trafficOut=t.todayTrafficOut,this.lastStartTime=t.lastStartTime,this.lastCloseTime=t.lastCloseTime,this.status=t.status,this.clientVersion=t.clientVersion,this.addr="",this.port=0,this.customDomains="",this.hostHeaderRewrite="",this.locations="",this.subdomain=""}}class ure extends Us{constructor(t){super(t),this.type="tcp",t.conf!=null?(this.addr=":"+t.conf.remotePort,this.port=t.conf.remotePort):(this.addr="",this.port=0)}}class cre extends Us{constructor(t){super(t),this.type="udp",t.conf!=null?(this.addr=":"+t.conf.remotePort,this.port=t.conf.remotePort):(this.addr="",this.port=0)}}class fre extends Us{constructor(t,r,n){super(t),this.type="http",this.port=r,t.conf&&(this.customDomains=t.conf.customDomains||this.customDomains,this.hostHeaderRewrite=t.conf.hostHeaderRewrite,this.locations=t.conf.locations,t.conf.subdomain&&(this.subdomain=`${t.conf.subdomain}.${n}`))}}class dre extends Us{constructor(t,r,n){super(t),this.type="https",this.port=r,t.conf!=null&&(this.customDomains=t.conf.customDomains||this.customDomains,t.conf.subdomain&&(this.subdomain=`${t.conf.subdomain}.${n}`))}}class hre extends Us{constructor(t){super(t),this.type="stcp"}}class vre extends Us{constructor(t){super(t),this.type="sudp"}}const pre=["id"],gre=ce({__name:"Traffic",props:{proxyName:null},setup(e){const t=e;return(()=>{let n="../api/traffic/"+t.proxyName;fetch(n,{credentials:"include"}).then(i=>i.json()).then(i=>{ire(t.proxyName,i.trafficIn,i.trafficOut)}).catch(i=>{DA({showClose:!0,message:"Get traffic info failed!"+i,type:"warning"})})})(),(n,i)=>(Y(),me("div",{id:e.proxyName,style:{width:"600px",height:"400px"}},null,8,pre))}}),mre=ce({__name:"ProxyViewExpand",props:{row:null,proxyType:null},setup(e){return(t,r)=>{const n=zM,i=HM;return e.proxyType==="http"||e.proxyType==="https"?(Y(),_e(i,{key:0,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:Z(()=>[ee(n,{label:"Name"},{default:Z(()=>[ae("span",null,Me(e.row.name),1)]),_:1}),ee(n,{label:"Type"},{default:Z(()=>[ae("span",null,Me(e.row.type),1)]),_:1}),ee(n,{label:"Domains"},{default:Z(()=>[ae("span",null,Me(e.row.customDomains),1)]),_:1}),ee(n,{label:"SubDomain"},{default:Z(()=>[ae("span",null,Me(e.row.subdomain),1)]),_:1}),ee(n,{label:"locations"},{default:Z(()=>[ae("span",null,Me(e.row.locations),1)]),_:1}),ee(n,{label:"HostRewrite"},{default:Z(()=>[ae("span",null,Me(e.row.hostHeaderRewrite),1)]),_:1}),ee(n,{label:"Encryption"},{default:Z(()=>[ae("span",null,Me(e.row.encryption),1)]),_:1}),ee(n,{label:"Compression"},{default:Z(()=>[ae("span",null,Me(e.row.compression),1)]),_:1}),ee(n,{label:"Last Start"},{default:Z(()=>[ae("span",null,Me(e.row.lastStartTime),1)]),_:1}),ee(n,{label:"Last Close"},{default:Z(()=>[ae("span",null,Me(e.row.lastCloseTime),1)]),_:1})]),_:1})):(Y(),_e(i,{key:1,"label-position":"left",inline:"",class:"proxy-table-expand"},{default:Z(()=>[ee(n,{label:"Name"},{default:Z(()=>[ae("span",null,Me(e.row.name),1)]),_:1}),ee(n,{label:"Type"},{default:Z(()=>[ae("span",null,Me(e.row.type),1)]),_:1}),ee(n,{label:"Addr"},{default:Z(()=>[ae("span",null,Me(e.row.addr),1)]),_:1}),ee(n,{label:"Encryption"},{default:Z(()=>[ae("span",null,Me(e.row.encryption),1)]),_:1}),ee(n,{label:"Compression"},{default:Z(()=>[ae("span",null,Me(e.row.compression),1)]),_:1}),ee(n,{label:"Last Start"},{default:Z(()=>[ae("span",null,Me(e.row.lastStartTime),1)]),_:1}),ee(n,{label:"Last Close"},{default:Z(()=>[ae("span",null,Me(e.row.lastCloseTime),1)]),_:1})]),_:1}))}}}),js=ce({__name:"ProxyView",props:{proxies:null,proxyType:null},setup(e){const t=(n,i)=>aa.fileSize(n.trafficIn),r=(n,i)=>aa.fileSize(n.trafficOut);return(n,i)=>{const a=gre,o=J6,s=IW,l=ZV,u=O8,c=XV;return Y(),me("div",null,[ee(c,{data:e.proxies,"default-sort":{prop:"name",order:"ascending"},style:{width:"100%"}},{default:Z(()=>[ee(l,{type:"expand"},{default:Z(f=>[ee(s,{placement:"right",width:"600",style:{"margin-left":"0px"},trigger:"click"},{default:Z(()=>[ee(a,{proxyName:f.row.name},null,8,["proxyName"])]),reference:Z(()=>[ee(o,{type:"primary",size:"large",name:f.row.name,style:{"margin-bottom":"10px"}},{default:Z(()=>[Bt("Traffic Statistics ")]),_:2},1032,["name"])]),_:2},1024),ee(mre,{row:f.row,proxyType:e.proxyType},null,8,["row","proxyType"])]),_:1}),ee(l,{label:"Name",prop:"name",sortable:""}),ee(l,{label:"Port",prop:"port",sortable:""}),ee(l,{label:"Connections",prop:"conns",sortable:""}),ee(l,{label:"Traffic In",prop:"trafficIn",formatter:t,sortable:""}),ee(l,{label:"Traffic Out",prop:"trafficOut",formatter:r,sortable:""}),ee(l,{label:"ClientVersion",prop:"clientVersion",sortable:""}),ee(l,{label:"Status",prop:"status",sortable:""},{default:Z(f=>[f.row.status==="online"?(Y(),_e(u,{key:0,type:"success"},{default:Z(()=>[Bt(Me(f.row.status),1)]),_:2},1024)):(Y(),_e(u,{key:1,type:"danger"},{default:Z(()=>[Bt(Me(f.row.status),1)]),_:2},1024))]),_:1})]),_:1},8,["data"])])}}}),yre=ce({__name:"ProxiesTCP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/tcp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new ure(i))})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"tcp"},null,8,["proxies"]))}}),_re=ce({__name:"ProxiesUDP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/udp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new cre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"udp"},null,8,["proxies"]))}}),bre=ce({__name:"ProxiesHTTP",setup(e){let t=B([]);return(()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhostHTTPPort,i=a.subdomainHost,!(n==null||n==0)&&fetch("../api/proxy/http",{credentials:"include"}).then(o=>o.json()).then(o=>{for(let s of o.proxies)t.value.push(new fre(s,n,i))})})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"http"},null,8,["proxies"]))}}),wre=ce({__name:"ProxiesHTTPS",setup(e){let t=B([]);return(()=>{let n,i;fetch("../api/serverinfo",{credentials:"include"}).then(a=>a.json()).then(a=>{n=a.vhostHTTPSPort,i=a.subdomainHost,!(n==null||n==0)&&fetch("../api/proxy/https",{credentials:"include"}).then(o=>o.json()).then(o=>{for(let s of o.proxies)t.value.push(new dre(s,n,i))})})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"https"},null,8,["proxies"]))}}),Sre=ce({__name:"ProxiesSTCP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/stcp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new hre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"stcp"},null,8,["proxies"]))}}),xre=ce({__name:"ProxiesSUDP",setup(e){let t=B([]);return(()=>{fetch("../api/proxy/sudp",{credentials:"include"}).then(n=>n.json()).then(n=>{for(let i of n.proxies)t.value.push(new vre(i))})})(),(n,i)=>(Y(),_e(js,{proxies:P(t),proxyType:"sudp"},null,8,["proxies"]))}}),Cre=xU({history:$G(),routes:[{path:"/",name:"ServerOverview",component:lre},{path:"/proxies/tcp",name:"ProxiesTCP",component:yre},{path:"/proxies/udp",name:"ProxiesUDP",component:_re},{path:"/proxies/http",name:"ProxiesHTTP",component:bre},{path:"/proxies/https",name:"ProxiesHTTPS",component:wre},{path:"/proxies/stcp",name:"ProxiesSTCP",component:Sre},{path:"/proxies/sudp",name:"ProxiesSUDP",component:xre}]}),oD=YO(bG);oD.use(Cre);oD.mount("#app")});export default Tre();
diff --git a/assets/frps/static/index.html b/assets/frps/static/index.html
index 4f2e0ca4341..5c295d7dc35 100644
--- a/assets/frps/static/index.html
+++ b/assets/frps/static/index.html
@@ -4,7 +4,7 @@
 <head>
     <meta charset="utf-8">
     <title>frps dashboard</title>
-  <script type="module" crossorigin src="./index-9465253b.js"></script>
+  <script type="module" crossorigin src="./index-c322b7dd.js"></script>
   <link rel="stylesheet" href="./index-1e0c7400.css">
 </head>
 
diff --git a/web/frps/src/utils/proxy.ts b/web/frps/src/utils/proxy.ts
index 384680dc81b..08d40174946 100644
--- a/web/frps/src/utils/proxy.ts
+++ b/web/frps/src/utils/proxy.ts
@@ -23,12 +23,8 @@ class BaseProxy {
     this.type = ''
     this.encryption = false
     this.compression = false
-    if (proxyStats.conf != null && proxyStats.conf.useEncryption != null) {
-      this.encryption = proxyStats.conf.useEncryption
-    }
-    if (proxyStats.conf != null && proxyStats.conf.useCompression != null) {
-      this.compression = proxyStats.conf.useCompression
-    } 
+    this.encryption = (proxyStats.conf?.transport?.useEncryption) || this.encryption;
+    this.compression = (proxyStats.conf?.transport?.useCompression) || this.compression;
     this.conns = proxyStats.curConns
     this.trafficIn = proxyStats.todayTrafficIn
     this.trafficOut = proxyStats.todayTrafficOut
@@ -79,14 +75,12 @@ class HTTPProxy extends BaseProxy {
     super(proxyStats)
     this.type = 'http'
     this.port = port
-    if (proxyStats.conf != null) {
-      if (proxyStats.conf.customDomains != null) {
-        this.customDomains = proxyStats.conf.customDomains
-      }
+    if (proxyStats.conf) {
+      this.customDomains = proxyStats.conf.customDomains || this.customDomains;
       this.hostHeaderRewrite = proxyStats.conf.hostHeaderRewrite
       this.locations = proxyStats.conf.locations
-      if (proxyStats.conf.subdomain != null && proxyStats.conf.subdomain != '') {
-        this.subdomain = proxyStats.conf.subdomain + '.' + subdomainHost
+      if (proxyStats.conf.subdomain) {
+        this.subdomain = `${proxyStats.conf.subdomain}.${subdomainHost}`
       } 
     }
   }
@@ -98,11 +92,9 @@ class HTTPSProxy extends BaseProxy {
     this.type = 'https'
     this.port = port
     if (proxyStats.conf != null) {
-      if (proxyStats.conf.customDomains != null) {
-        this.customDomains = proxyStats.conf.customDomains
-      }
-      if (proxyStats.conf.subdomain != null && proxyStats.conf.subdomain != '') {
-        this.subdomain = proxyStats.conf.subdomain + '.' + subdomainHost
+      this.customDomains = proxyStats.conf.customDomains || this.customDomains;
+      if (proxyStats.conf.subdomain) {
+        this.subdomain = `${proxyStats.conf.subdomain}.${subdomainHost}`
       }
     }
   }


Test patch: