日常更新

This commit is contained in:
snltty
2025-05-21 10:45:48 +08:00
parent fdb8b23dce
commit 2a23945f1c
22 changed files with 106 additions and 55 deletions

View File

@@ -253,6 +253,8 @@ namespace linker.messenger.store.file
{
client.CApi.ApiPassword = configExportInfo.ApiPassword;
}
client.CApi.WebPort = configExportInfo.WebPort;
client.CApi.ApiPort = configExportInfo.ApiPort;
client.Access = (AccessValue)((ulong)config.Data.Client.Access & configExportInfo.Access);
@@ -363,6 +365,8 @@ namespace linker.messenger.store.file
{
public string Name { get; set; }
public string ApiPassword { get; set; }
public int WebPort { get; set; }
public int ApiPort { get; set; }
public bool Single { get; set; }
public ulong Access { get; set; }

View File

@@ -4,17 +4,18 @@ using System.Buffers;
using linker.libs.extends;
using linker.libs;
using System.Text;
using linker.libs.timer;
namespace linker.messenger.tunnel
{
/// <summary>
/// 外网端口处理器
/// </summary>
public class TunnelServerExternalResolver: IResolver
public class TunnelServerExternalResolver : IResolver
{
public byte Type => (byte)ResolverType.External;
public byte Type => (byte)ResolverType.External;
public virtual void AddReceive( long bytes) { }
public virtual void AddReceive(long bytes) { }
public virtual void AddSendt(long bytes) { }
/// <summary>
@@ -29,21 +30,32 @@ namespace linker.messenger.tunnel
if (LoggerHelper.Instance.LoggerLevel <= LoggerTypes.DEBUG) LoggerHelper.Instance.Debug($"{ep} get udp external port");
AddReceive(memory.Length);
byte[] sendData = ArrayPool<byte>.Shared.Rent(1024);
try
TimerHelper.Async(async () =>
{
var send = BuildSendData(sendData, ep);
AddSendt(send.Length);
await socket.SendToAsync(send, SocketFlags.None, ep).ConfigureAwait(false);
}
catch (Exception ex)
{
if (LoggerHelper.Instance.LoggerLevel <= LoggerTypes.DEBUG) LoggerHelper.Instance.Error(ex);
}
finally
{
ArrayPool<byte>.Shared.Return(sendData);
}
byte[] sendData = ArrayPool<byte>.Shared.Rent(1024);
try
{
Memory<byte> send = BuildSendData(sendData, ep);
for (int i = 0; i < 5; i++)
{
await Task.Delay(15).ConfigureAwait(false);
await socket.SendToAsync(send, SocketFlags.None, ep).ConfigureAwait(false);
AddSendt(send.Length);
}
}
catch (Exception ex)
{
if (LoggerHelper.Instance.LoggerLevel <= LoggerTypes.DEBUG) LoggerHelper.Instance.Error(ex);
}
finally
{
ArrayPool<byte>.Shared.Return(sendData);
}
});
await Task.CompletedTask;
}
/// <summary>
/// TCP

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<project ver="10" name="linker.tray.win" libEmbed="true" icon="..\linker\favicon.ico" ui="win" output="linker.tray.win.exe" CompanyName="snltty" FileDescription="linker.tray.win" LegalCopyright="Copyright (C) snltty 2024" ProductName="linker.tray.win" InternalName="linker.install.win" FileVersion="0.0.0.273" ProductVersion="0.0.0.273" publishDir="/dist/" dstrip="false" local="false" ignored="false">
<project ver="10" name="linker.tray.win" libEmbed="true" icon="..\linker\favicon.ico" ui="win" output="linker.tray.win.exe" CompanyName="snltty" FileDescription="linker.tray.win" LegalCopyright="Copyright (C) snltty 2024" ProductName="linker.tray.win" InternalName="linker.install.win" FileVersion="0.0.0.274" ProductVersion="0.0.0.274" publishDir="/dist/" dstrip="false" local="false" ignored="false">
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
<folder name="资源文件" path="res" embed="true" local="false" ignored="false">
<file name="favicon.ico" path="res\favicon.ico" comment="res\favicon.ico"/>

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>linker.web</title><link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/><script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script><script defer="defer" src="js/chunk-vendors.59893432.js"></script><script defer="defer" src="js/app.51805d8f.js"></script><link href="css/chunk-vendors.d8267b33.css" rel="stylesheet"><link href="css/app.5b1ae1f9.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but linker.web doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>linker.web</title><link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/><script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script><script defer="defer" src="js/chunk-vendors.59893432.js"></script><script defer="defer" src="js/app.d3d665bd.js"></script><link href="css/chunk-vendors.d8267b33.css" rel="stylesheet"><link href="css/app.5b1ae1f9.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but linker.web doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

View File

@@ -1 +1 @@
"use strict";(self["webpackChunklinker_web"]=self["webpackChunklinker_web"]||[]).push([[127],{7332:function(e,n,a){a.r(n),a.d(n,{default:function(){return O}});var t=a(6768);const s={class:"net-wrap app-wrap"},l={class:"inner absolute flex flex-column flex-nowrap"},i={class:"head"},o={class:"body flex-1 relative"},c={class:"status"};function r(e,n,a,r,u,d){const g=(0,t.g2)("Head"),p=(0,t.g2)("List"),v=(0,t.g2)("Status");return(0,t.uX)(),(0,t.CE)("div",s,[(0,t.Lk)("div",l,[(0,t.Lk)("div",i,[(0,t.bF)(g)]),(0,t.Lk)("div",o,[(0,t.bF)(p)]),(0,t.Lk)("div",c,[(0,t.bF)(v,{config:!1})])])])}a(4114);var u=a(4232);const d=e=>((0,t.Qi)("data-v-6bfe19a3"),e=e(),(0,t.jt)(),e),g={class:"head-wrap"},p={class:"tools flex"},v={class:"label"},h=d((()=>(0,t.Lk)("span",{class:"flex-1"},null,-1))),f={style:{"margin-left":"1rem"}};function k(e,n,a,s,l,i){const o=(0,t.g2)("Refresh"),c=(0,t.g2)("el-icon"),r=(0,t.g2)("el-button"),d=(0,t.g2)("Background");return(0,t.uX)(),(0,t.CE)("div",g,[(0,t.Lk)("div",p,[(0,t.Lk)("span",v,"分组 : "+(0,u.v_)(s.state.group),1),h,(0,t.bF)(r,{size:"small",onClick:s.handleRefresh},{default:(0,t.k6)((()=>[(0,t.eW)(" 刷新(F5)"),(0,t.bF)(c,null,{default:(0,t.k6)((()=>[(0,t.bF)(o)])),_:1})])),_:1},8,["onClick"]),(0,t.Lk)("div",f,[(0,t.bF)(d,{name:"net"})])])])}var C=a(3830),m=a(144),b=a(7477),L=a(5096),_={components:{Edit:b.ffu,Refresh:b.C42,Background:L.A},setup(){const e=(0,C.B)(),n=(0,m.Kh)({server:(0,t.EW)((()=>e.value.config.Client.Server.Host)),group:(0,t.EW)((()=>e.value.config.Client.Group.Name))}),a=()=>{window.location.reload()};return{state:n,handleRefresh:a}}},w=a(1241);const S=(0,w.A)(_,[["render",k],["__scopeId","data-v-6bfe19a3"]]);var F=S;const x=e=>((0,t.Qi)("data-v-68d1c30a"),e=e(),(0,t.jt)(),e),T={class:"net-list-wrap flex flex-column absolute"},z={class:"flex-1 scrollbar"},E={class:"flex"},A=x((()=>(0,t.Lk)("div",{class:"flex-1"},null,-1))),I={class:"tuntap"},P={class:"page t-c"},B={class:"page-wrap t-c"};function R(e,n,a,s,l,i){const o=(0,t.g2)("DeviceName"),c=(0,t.g2)("UpdaterBtn"),r=(0,t.g2)("TuntapShow"),u=(0,t.g2)("el-pagination");return(0,t.uX)(),(0,t.CE)("div",T,[(0,t.Lk)("div",z,[(0,t.Lk)("ul",null,[((0,t.uX)(!0),(0,t.CE)(t.FK,null,(0,t.pI)(s.devices.page.List,((e,n)=>((0,t.uX)(),(0,t.CE)("li",{key:n},[(0,t.Lk)("dl",null,[(0,t.Lk)("dt",E,[(0,t.Lk)("div",null,[(0,t.bF)(o,{item:e},null,8,["item"])]),A,(0,t.Lk)("div",null,[(0,t.bF)(c,{config:!1,item:e},null,8,["item"])])]),(0,t.Lk)("dd",I,[s.tuntap.list[e.MachineId]?((0,t.uX)(),(0,t.Wv)(r,{key:0,item:e},null,8,["item"])):(0,t.Q3)("",!0)])])])))),128))])]),(0,t.Lk)("div",P,[(0,t.Lk)("div",B,[(0,t.bF)(u,{size:"small",background:"",layout:"prev,pager, next","pager-count":5,total:s.devices.page.Count,"page-size":s.devices.page.Request.Size,"current-page":s.devices.page.Request.Page,onCurrentChange:s.handlePageChange,onSizeChange:s.handlePageSizeChange,"page-sizes":[10,20,50,100,255]},null,8,["total","page-size","current-page","onCurrentChange","onSizeChange"])])])])}var D=a(8104),X=a(7985),y=a(9383),N=a(7115),U=a(263),Q=a(4877),W=a(9983),H={components:{StarFilled:b.BQ2,UpdaterBtn:N.A,DeviceName:U.A,TuntapShow:Q.A},setup(e){(0,C.B)();const n=(0,m.Kh)({}),{devices:a,machineId:s,_getSignList:l,_getSignList1:i,handleDeviceEdit:o,handlePageChange:c,handlePageSizeChange:r,handleDel:u,clearDevicesTimeout:d}=(0,X.r)(),{tuntap:g,_getTuntapInfo:p,handleTuntapRefresh:v,clearTuntapTimeout:h,handleTuntapEdit:f,sortTuntapIP:k}=(0,D.O)(),{_getUpdater:b,_subscribeUpdater:L,clearUpdaterTimeout:_}=(0,y.d)(),{connections:w,forwardConnections:S,_getForwardConnections:F,tuntapConnections:x,_getTuntapConnections:T,socks5Connections:z,_getSocks5Connections:E,handleTunnelConnections:A,clearConnectionsTimeout:I}=(0,W.L2)();return(0,t.sV)((()=>{c(),v(),l(),i(),p(),b(),L()})),(0,t.hi)((()=>{d(),h(),_()})),{state:n,devices:a,machineId:s,handlePageChange:c,handlePageSizeChange:r,tuntap:g}}};const K=(0,w.A)(H,[["render",R],["__scopeId","data-v-68d1c30a"]]);var j=K,q=a(1337),M=a(1387),V={components:{Head:F,List:j,Status:q.A},setup(){document.addEventListener("contextmenu",(function(e){e.preventDefault()}));const e=(0,C.B)(),n=(0,M.rd)();return(0,t.sV)((()=>{0==e.value.hasAccess("NetManager")&&n.push({name:"NoPermission"})})),{}}};const G=(0,w.A)(V,[["render",r],["__scopeId","data-v-6a3f3b43"]]);var O=G}}]);
"use strict";(self["webpackChunklinker_web"]=self["webpackChunklinker_web"]||[]).push([[465],{7332:function(e,n,a){a.r(n),a.d(n,{default:function(){return O}});var t=a(6768);const s={class:"net-wrap app-wrap"},l={class:"inner absolute flex flex-column flex-nowrap"},i={class:"head"},o={class:"body flex-1 relative"},c={class:"status"};function r(e,n,a,r,u,d){const g=(0,t.g2)("Head"),p=(0,t.g2)("List"),v=(0,t.g2)("Status");return(0,t.uX)(),(0,t.CE)("div",s,[(0,t.Lk)("div",l,[(0,t.Lk)("div",i,[(0,t.bF)(g)]),(0,t.Lk)("div",o,[(0,t.bF)(p)]),(0,t.Lk)("div",c,[(0,t.bF)(v,{config:!1})])])])}a(4114);var u=a(4232);const d=e=>((0,t.Qi)("data-v-6bfe19a3"),e=e(),(0,t.jt)(),e),g={class:"head-wrap"},p={class:"tools flex"},v={class:"label"},h=d((()=>(0,t.Lk)("span",{class:"flex-1"},null,-1))),f={style:{"margin-left":"1rem"}};function k(e,n,a,s,l,i){const o=(0,t.g2)("Refresh"),c=(0,t.g2)("el-icon"),r=(0,t.g2)("el-button"),d=(0,t.g2)("Background");return(0,t.uX)(),(0,t.CE)("div",g,[(0,t.Lk)("div",p,[(0,t.Lk)("span",v,"分组 : "+(0,u.v_)(s.state.group),1),h,(0,t.bF)(r,{size:"small",onClick:s.handleRefresh},{default:(0,t.k6)((()=>[(0,t.eW)(" 刷新(F5)"),(0,t.bF)(c,null,{default:(0,t.k6)((()=>[(0,t.bF)(o)])),_:1})])),_:1},8,["onClick"]),(0,t.Lk)("div",f,[(0,t.bF)(d,{name:"net"})])])])}var C=a(3830),m=a(144),b=a(7477),L=a(5096),_={components:{Edit:b.ffu,Refresh:b.C42,Background:L.A},setup(){const e=(0,C.B)(),n=(0,m.Kh)({server:(0,t.EW)((()=>e.value.config.Client.Server.Host)),group:(0,t.EW)((()=>e.value.config.Client.Group.Name))}),a=()=>{window.location.reload()};return{state:n,handleRefresh:a}}},w=a(1241);const S=(0,w.A)(_,[["render",k],["__scopeId","data-v-6bfe19a3"]]);var F=S;const x=e=>((0,t.Qi)("data-v-68d1c30a"),e=e(),(0,t.jt)(),e),T={class:"net-list-wrap flex flex-column absolute"},z={class:"flex-1 scrollbar"},E={class:"flex"},A=x((()=>(0,t.Lk)("div",{class:"flex-1"},null,-1))),I={class:"tuntap"},P={class:"page t-c"},B={class:"page-wrap t-c"};function R(e,n,a,s,l,i){const o=(0,t.g2)("DeviceName"),c=(0,t.g2)("UpdaterBtn"),r=(0,t.g2)("TuntapShow"),u=(0,t.g2)("el-pagination");return(0,t.uX)(),(0,t.CE)("div",T,[(0,t.Lk)("div",z,[(0,t.Lk)("ul",null,[((0,t.uX)(!0),(0,t.CE)(t.FK,null,(0,t.pI)(s.devices.page.List,((e,n)=>((0,t.uX)(),(0,t.CE)("li",{key:n},[(0,t.Lk)("dl",null,[(0,t.Lk)("dt",E,[(0,t.Lk)("div",null,[(0,t.bF)(o,{item:e},null,8,["item"])]),A,(0,t.Lk)("div",null,[(0,t.bF)(c,{config:!1,item:e},null,8,["item"])])]),(0,t.Lk)("dd",I,[s.tuntap.list[e.MachineId]?((0,t.uX)(),(0,t.Wv)(r,{key:0,item:e},null,8,["item"])):(0,t.Q3)("",!0)])])])))),128))])]),(0,t.Lk)("div",P,[(0,t.Lk)("div",B,[(0,t.bF)(u,{size:"small",background:"",layout:"prev,pager, next","pager-count":5,total:s.devices.page.Count,"page-size":s.devices.page.Request.Size,"current-page":s.devices.page.Request.Page,onCurrentChange:s.handlePageChange,onSizeChange:s.handlePageSizeChange,"page-sizes":[10,20,50,100,255]},null,8,["total","page-size","current-page","onCurrentChange","onSizeChange"])])])])}var D=a(8104),X=a(7985),y=a(9383),N=a(7115),U=a(263),Q=a(4877),W=a(9983),H={components:{StarFilled:b.BQ2,UpdaterBtn:N.A,DeviceName:U.A,TuntapShow:Q.A},setup(e){(0,C.B)();const n=(0,m.Kh)({}),{devices:a,machineId:s,_getSignList:l,_getSignList1:i,handleDeviceEdit:o,handlePageChange:c,handlePageSizeChange:r,handleDel:u,clearDevicesTimeout:d}=(0,X.r)(),{tuntap:g,_getTuntapInfo:p,handleTuntapRefresh:v,clearTuntapTimeout:h,handleTuntapEdit:f,sortTuntapIP:k}=(0,D.O)(),{_getUpdater:b,_subscribeUpdater:L,clearUpdaterTimeout:_}=(0,y.d)(),{connections:w,forwardConnections:S,_getForwardConnections:F,tuntapConnections:x,_getTuntapConnections:T,socks5Connections:z,_getSocks5Connections:E,handleTunnelConnections:A,clearConnectionsTimeout:I}=(0,W.L2)();return(0,t.sV)((()=>{c(),v(),l(),i(),p(),b(),L()})),(0,t.hi)((()=>{d(),h(),_()})),{state:n,devices:a,machineId:s,handlePageChange:c,handlePageSizeChange:r,tuntap:g}}};const K=(0,w.A)(H,[["render",R],["__scopeId","data-v-68d1c30a"]]);var j=K,q=a(9575),M=a(1387),V={components:{Head:F,List:j,Status:q.A},setup(){document.addEventListener("contextmenu",(function(e){e.preventDefault()}));const e=(0,C.B)(),n=(0,M.rd)();return(0,t.sV)((()=>{0==e.value.hasAccess("NetManager")&&n.push({name:"NoPermission"})})),{}}};const G=(0,w.A)(V,[["render",r],["__scopeId","data-v-6a3f3b43"]]);var O=G}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -67,6 +67,10 @@ export default {
'status.exportNamePlease': 'Please input device name',
'status.exportApiPassword': 'Api Pwd',
'status.exportApiPasswordPlease': 'Please input api password',
'status.exportWebport': 'Web Port',
'status.exportWebportPlease': 'Please input web port',
'status.exportApiport': 'Api port',
'status.exportApiportPlease': 'Please input api port',
'status.exportDownload': 'Download',
'status.exportCopy': 'Copy',
'status.exportSave': 'Save',

View File

@@ -67,6 +67,10 @@ export default {
'status.exportNamePlease': '请输入设备名',
'status.exportApiPassword': '接口密码',
'status.exportApiPasswordPlease': '请输入接口密码',
'status.exportWebport': '网页端口',
'status.exportWebportPlease': '请输入网页端口',
'status.exportApiport': '接口端口',
'status.exportApiportPlease': '请输入接口端口',
'status.exportDownload': '下载',
'status.exportCopy': '复制',
'status.exportSave': '保存',

View File

@@ -7,11 +7,11 @@
<el-checkbox v-model="state.full" ><span class="red">满权限(顶级管理权)</span></el-checkbox>
</el-col>
</el-row>
<div class="access-wrap scrollbar">
<div class="access-wrap scrollbar" :style="{height:`${state.height}rem`}">
<el-checkbox-group v-model="state.checkList" @change="handleCheckedChange">
<el-row>
<template v-for="(item,index) in access" :key="index">
<el-col :span="8">
<el-col :xs="12" :sm="8">
<el-checkbox :value="item.Value" :label="item.Text" />
</el-col>
</template>
@@ -24,7 +24,7 @@ import { computed, onMounted, reactive } from 'vue';
import { injectGlobalData } from '@/provide';
import { useAccess } from './access';
export default {
props:['machineid'],
props:['machineid','height'],
setup(props) {
const globalData = injectGlobalData();
@@ -41,6 +41,7 @@ export default {
},[]);
});
const state = reactive({
height:props.height || 50,
checkList: [
globalData.value.config.Client.Accesss.Api.Value,
globalData.value.config.Client.Accesss.Web.Value,
@@ -91,5 +92,4 @@ export default {
</script>
<style lang="stylus" scoped>
.el-col {text-align:left;}
.access-wrap{height:40rem}
</style>

View File

@@ -2,7 +2,7 @@
<div v-if="config && hasExport" class="status-export-wrap">
<a href="javascript:;" :title="$t('status.export')" @click="state.show = true">
<el-icon size="16"><Share /></el-icon>
<span>{{$t('status.export')}}</span>
<span v-if="globalData.isPc">{{$t('status.export')}}</span>
</a>
<el-dialog class="options-center" :title="$t('status.export')" destroy-on-close v-model="state.show" center width="580" top="1vh">
<div class="port-wrap">
@@ -13,34 +13,48 @@
<el-card shadow="never">
<template #header>
<div class="card-header">
<div class="flex">
<div>
<el-checkbox :disabled="onlyNode" v-model="state.single" :label="$t('status.exportSingle')" />
</div>
<div style="margin-left: 2rem;">
<span>{{$t('status.exportName')}} : </span><el-input :disabled="!state.single" v-model="state.name" maxlength="32" show-word-limit style="width:15rem"></el-input>
</div>
<div>
<span>{{$t('status.exportApiPassword')}} : </span><el-input type="password" show-password :disabled="onlyNode" v-model="state.apipassword" maxlength="36" show-word-limit style="width:15rem"></el-input>
</div>
</div>
<div>
<el-row>
<el-col :span="8"><el-checkbox v-model="state.relay" :label="$t('status.exportRelay')" /></el-col>
<el-col :span="8"><el-checkbox v-model="state.sforward" :label="$t('status.exportSForward')" /></el-col>
<el-col :span="8"><el-checkbox v-model="state.updater" :label="$t('status.exportUpdater')" /></el-col>
<el-col :span="24"><el-checkbox :disabled="onlyNode" v-model="state.single" :label="$t('status.exportSingle')" /></el-col>
</el-row>
</div>
<div>
<el-row>
<el-col :span="8"><el-checkbox v-model="state.server" :label="$t('status.exportServer')" /></el-col>
<el-col :span="8"><el-checkbox v-model="state.group" :label="$t('status.exportGroup')" /></el-col>
<el-col :span="8"><el-checkbox v-model="state.tunnel" :label="$t('status.exportTunnel')" /></el-col>
<el-col :span="12">
<div class="flex flex-nowrap">
<span style="width: 11rem;">{{$t('status.exportName')}} : </span><el-input :disabled="!state.single" v-model="state.name" maxlength="32" show-word-limit></el-input>
</div>
</el-col>
<el-col :span="12">
<div class="flex flex-nowrap">
<span style="width: 11rem;">{{$t('status.exportApiPassword')}} : </span><el-input type="password" show-password :disabled="onlyNode" v-model="state.apipassword" maxlength="36" show-word-limit></el-input>
</div>
</el-col>
<el-col :span="12">
<div class="flex flex-nowrap mgt-1">
<span style="width: 11rem;">{{$t('status.exportWebport')}} : </span><el-input :disabled="onlyNode" v-model="state.webport"></el-input>
</div>
</el-col>
<el-col :span="12">
<div class="flex flex-nowrap mgt-1">
<span style="width: 11rem;">{{$t('status.exportApiport')}} : </span><el-input :disabled="onlyNode" v-model="state.apiport"></el-input>
</div>
</el-col>
</el-row>
</div>
<div>
<el-row>
<el-col :xs="12" :sm="8"><el-checkbox v-model="state.relay" :label="$t('status.exportRelay')" /></el-col>
<el-col :xs="12" :sm="8"><el-checkbox v-model="state.sforward" :label="$t('status.exportSForward')" /></el-col>
<el-col :xs="12" :sm="8"><el-checkbox v-model="state.updater" :label="$t('status.exportUpdater')" /></el-col>
<el-col :xs="12" :sm="8"><el-checkbox v-model="state.server" :label="$t('status.exportServer')" /></el-col>
<el-col :xs="12" :sm="8"><el-checkbox v-model="state.group" :label="$t('status.exportGroup')" /></el-col>
<el-col :xs="12" :sm="8"><el-checkbox v-model="state.tunnel" :label="$t('status.exportTunnel')" /></el-col>
</el-row>
</div>
</div>
</template>
<Access ref="accessDom" :machineid="machineId"></Access>
<Access ref="accessDom" :machineid="machineId" :height="30"></Access>
</el-card>
</div>
</div>
@@ -97,7 +111,9 @@ export default {
loading:false,
single:true,
name:'',
apipassword:onlyNode.value? globalData.value.config.Client.CApi.ApiPassword :'',
apipassword:onlyNode.value? globalData.value.config.Client.CApi.ApiPassword :'',
apiport: globalData.value.config.Client.CApi.ApiPort,
webport: globalData.value.config.Client.CApi.WebPort,
relay:true,
sforward:true,
@@ -125,6 +141,8 @@ export default {
single:state.single,
name:state.name,
apipassword:state.apipassword,
webport:+state.webport,
apiport:+state.apiport,
relay:state.relay,
sforward:state.sforward,
updater:state.updater,
@@ -141,10 +159,18 @@ export default {
}else{
json.name = "";
}
if(!state.apipassword){
if(!json.apipassword){
ElMessage.error(t('status.exportApiPasswordPlease'));
return;
}
if(!json.webport || isNaN(json.webport) || json.webport<=0 || json.webport>65535){
ElMessage.error(t('status.exportWebportPlease'));
return;
}
if(!json.apiport || isNaN(json.apiport) || json.apiport<=0 || json.apiport>65535){
ElMessage.error(t('status.exportApiportPlease'));
return;
}
return json;
}
const download = ()=>{
@@ -241,7 +267,8 @@ export default {
}
}
return {config:props.config,onlyNode,hasExport,machineId, state,accessDom,handleSave,handleExport,handleCopy,copyToClipboard,copySaveToClipboard};
return {globalData,config:props.config,onlyNode,hasExport,machineId, state,accessDom,
handleSave,handleExport,handleCopy,copyToClipboard,copySaveToClipboard};
}
}
</script>

View File

@@ -1,5 +1,5 @@
v1.8.0
2025-05-20 19:40:20
2025-05-21 10:45:48
1. 一些累计更新
2. 增加NAT类型检测
3. 优化内网穿透SNAT转换防火墙