diff --git a/neutrino-proxy-admin/src/views/proxy/domainMapping.vue b/neutrino-proxy-admin/src/views/proxy/domainMapping.vue index c427f7ac..c4776aa4 100644 --- a/neutrino-proxy-admin/src/views/proxy/domainMapping.vue +++ b/neutrino-proxy-admin/src/views/proxy/domainMapping.vue @@ -89,7 +89,7 @@ {{ $t('table.edit') }} {{ $t('table.disable') }} {{ $t('table.enable') }} - + {{ $t('table.delete') }} @@ -103,8 +103,7 @@ - + @@ -228,8 +227,8 @@ export default { rules: { licenseId: [{ required: true, message: '请选择License', trigger: 'blur,change' }], domain: [{ required: true, message: '请输入域名', trigger: 'blur' }, - {pattern: '^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$', message: '域名格式不正确,请检查后重试', trigger: 'blur' }, - { validator: this.isDomainAvailable, trigger: 'blur' } + { pattern: '^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$', message: '域名格式不正确,请检查后重试', trigger: 'blur' }, + { validator: this.isDomainAvailable, trigger: 'blur' } ], targetPath: [{ required: true, message: '请输入目标地址', trigger: 'blur' }], }, diff --git a/neutrino-proxy-admin/src/views/proxy/license.vue b/neutrino-proxy-admin/src/views/proxy/license.vue index 8fc21995..401b0af1 100644 --- a/neutrino-proxy-admin/src/views/proxy/license.vue +++ b/neutrino-proxy-admin/src/views/proxy/license.vue @@ -63,12 +63,11 @@ @@ -122,20 +121,6 @@ import { userList } from '@/api/user' import waves from '@/directive/waves' // 水波纹指令 import { parseTime } from '@/utils' - import ButtonPopover from '../../components/Button/buttonPopover' - - const calendarTypeOptions = [ - { key: 'CN', display_name: 'China' }, - { key: 'US', display_name: 'USA' }, - { key: 'JP', display_name: 'Japan' }, - { key: 'EU', display_name: 'Eurozone' } - ] - - // arr to obj ,such as { CN : "China", US : "USA" } - const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => { - acc[cur.key] = cur.display_name - return acc - }, {}) export default { name: 'complexTable', @@ -143,7 +128,6 @@ waves }, components: { - ButtonPopover }, data() { return { @@ -159,7 +143,6 @@ userId: null }, importanceOptions: [1, 2, 3], - calendarTypeOptions, userList: [], sortOptions: [{ label: 'ID Ascending', key: '+id' }, { label: 'ID Descending', key: '-id' }], statusOptions: ['published', 'draft', 'deleted'], @@ -214,9 +197,6 @@ } return statusMap[status] }, - typeFilter(type) { - return calendarTypeKeyValue[type] - } }, created() { this.getDataList() @@ -368,19 +348,6 @@ }) }).catch(() => {}) }, - handleDelete2(row) { - deleteLicense(row.id).then(response => { - if (response.data.code === 0) { - this.$notify({ - title: '成功', - message: '删除成功', - type: 'success', - duration: 2000 - }) - this.getList() - } - }) - }, handleDownload() { this.downloadLoading = true import('@/vendor/Export2Excel').then(excel => { diff --git a/neutrino-proxy-admin/src/views/proxy/portMapping.vue b/neutrino-proxy-admin/src/views/proxy/portMapping.vue index 4b5acb9a..fcc4f362 100644 --- a/neutrino-proxy-admin/src/views/proxy/portMapping.vue +++ b/neutrino-proxy-admin/src/views/proxy/portMapping.vue @@ -49,6 +49,11 @@ {{ scope.row.protocal }} + @@ -143,6 +148,11 @@ + @@ -449,6 +459,9 @@ export default { }, handleOpenWebPage(row) { let url = location.protocol + '//' + location.hostname + ':' + row.serverPort + if (row.domain) { + url = location.protocol + '//' + row.domain + } open(url) }, handleUpdate(row) { diff --git a/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/CmdChannelHandler.java b/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/CmdChannelHandler.java index 68db2a0e..4032265c 100644 --- a/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/CmdChannelHandler.java +++ b/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/CmdChannelHandler.java @@ -43,7 +43,6 @@ public class CmdChannelHandler extends SimpleChannelInboundHandler if (realServerChannel != null) { realServerChannel.config().setOption(ChannelOption.AUTO_READ, ctx.channel().isWritable()); } - super.channelWritabilityChanged(ctx); } diff --git a/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/RealServerChannelHandler.java b/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/RealServerChannelHandler.java index aafec97a..43e3c7c7 100644 --- a/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/RealServerChannelHandler.java +++ b/neutrino-proxy-client/src/main/java/org/dromara/neutrinoproxy/client/core/RealServerChannelHandler.java @@ -67,11 +67,18 @@ public class RealServerChannelHandler extends SimpleChannelInboundHandler { default void updateOnlineStatus(Integer id, Integer isOnline, Date updateTime) { this.update(null, new LambdaUpdateWrapper() - .eq(LicenseDO::getId, id) - .set(LicenseDO::getIsOnline, isOnline) - .set(LicenseDO::getUpdateTime, updateTime) + .eq(LicenseDO::getId, id) + .set(LicenseDO::getIsOnline, isOnline) + .set(LicenseDO::getUpdateTime, updateTime) ); } default void updateOnlineStatus(Integer isOnline, Date updateTime) { this.update(null, new LambdaUpdateWrapper() - .set(LicenseDO::getIsOnline, isOnline) - .set(LicenseDO::getUpdateTime, updateTime) + .ne(LicenseDO::getId, 1) + .set(LicenseDO::getIsOnline, isOnline) + .set(LicenseDO::getUpdateTime, updateTime) ); } diff --git a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/dal/entity/LicenseDO.java b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/dal/entity/LicenseDO.java index c170c381..505f724f 100644 --- a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/dal/entity/LicenseDO.java +++ b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/dal/entity/LicenseDO.java @@ -87,6 +87,23 @@ public class LicenseDO { */ private Date updateTime; + + public LicenseDO() { + } + + public LicenseDO(Integer id, String name, String key, Integer userId, String upLimitRate, String downLimitRate, Integer isOnline, Integer enable, Date createTime, Date updateTime) { + this.id = id; + this.name = name; + this.key = key; + this.userId = userId; + this.upLimitRate = upLimitRate; + this.downLimitRate = downLimitRate; + this.isOnline = isOnline; + this.enable = enable; + this.createTime = createTime; + this.updateTime = updateTime; + } + public LicenseListRes toRes() { LicenseListRes res = new LicenseListRes(); BeanUtil.copyProperties(this, res); diff --git a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpProxy.java b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpProxy.java index c3eebd4c..7d165a0f 100644 --- a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpProxy.java +++ b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpProxy.java @@ -43,19 +43,19 @@ public class HttpProxy implements EventListener { try { ServerBootstrap bootstrap = new ServerBootstrap(); bootstrap.group(new NioEventLoopGroup(1), new NioEventLoopGroup()) - .channel(NioServerSocketChannel.class).childHandler(new ChannelInitializer() { - @Override - public void initChannel(SocketChannel ch) throws Exception { - if (null != proxyConfig.getServer().getTcp().getTransferLogEnable() && - proxyConfig.getServer().getTcp().getTransferLogEnable()) { - ch.pipeline().addFirst(new LoggingHandler(HttpProxy.class)); - } - ch.pipeline().addFirst(new BytesMetricsHandler()); - ch.pipeline().addLast(new HttpVisitorSecurityChannelHandler()); - ch.pipeline().addLast("flowLimiter",new VisitorFlowLimiterChannelHandler()); - ch.pipeline().addLast(new HttpVisitorChannelHandler()); - } - }); + .channel(NioServerSocketChannel.class).childHandler(new ChannelInitializer() { + @Override + public void initChannel(SocketChannel ch) throws Exception { + if (null != proxyConfig.getServer().getTcp().getTransferLogEnable() && + proxyConfig.getServer().getTcp().getTransferLogEnable()) { + ch.pipeline().addFirst(new LoggingHandler(HttpProxy.class)); + } + ch.pipeline().addFirst(new BytesMetricsHandler()) + .addLast(new HttpVisitorSecurityChannelHandler()) + .addLast("flowLimiter",new VisitorFlowLimiterChannelHandler()) + .addLast(new HttpVisitorChannelHandler()); + } + }); bootstrap.bind("0.0.0.0", proxyConfig.getServer().getTcp().getHttpProxyPort()).sync(); log.info("Http proxy server start success!port:{}", proxyConfig.getServer().getTcp().getHttpProxyPort()); } catch (Exception e) { diff --git a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpVisitorChannelHandler.java b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpVisitorChannelHandler.java index 3ec2f8d0..fe0c0bfb 100644 --- a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpVisitorChannelHandler.java +++ b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/enhance/HttpVisitorChannelHandler.java @@ -1,19 +1,24 @@ package org.dromara.neutrinoproxy.server.proxy.enhance; +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; import io.netty.buffer.ByteBuf; -import io.netty.channel.Channel; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelOption; -import io.netty.channel.SimpleChannelInboundHandler; +import io.netty.channel.*; +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.proxy.ProxyHandler; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.dromara.neutrinoproxy.core.Constants; import org.dromara.neutrinoproxy.core.ProxyMessage; +import org.dromara.neutrinoproxy.core.util.HttpUtil; import org.dromara.neutrinoproxy.server.constant.NetworkProtocolEnum; +import org.dromara.neutrinoproxy.server.proxy.domain.DomainMapping; import org.dromara.neutrinoproxy.server.proxy.domain.ProxyAttachment; +import org.dromara.neutrinoproxy.server.proxy.domain.ProxyMapping; import org.dromara.neutrinoproxy.server.proxy.domain.VisitorChannelAttachInfo; import org.dromara.neutrinoproxy.server.service.FlowReportService; import org.dromara.neutrinoproxy.server.util.ProxyUtil; +import org.h2.store.DataHandler; import org.noear.solon.Solon; import java.net.InetSocketAddress; @@ -31,6 +36,7 @@ public class HttpVisitorChannelHandler extends SimpleChannelInboundHandler { Channel proxyChannel = channel.attr(Constants.NEXT_CHANNEL).get(); if (null == proxyChannel) { @@ -38,14 +44,11 @@ public class HttpVisitorChannelHandler extends SimpleChannelInboundHandler { try { ServerBootstrap bootstrap = new ServerBootstrap(); bootstrap.group(new NioEventLoopGroup(1), new NioEventLoopGroup()) - .channel(NioServerSocketChannel.class).childHandler(new ChannelInitializer() { - @Override - public void initChannel(SocketChannel ch) throws Exception { - if (null != proxyConfig.getServer().getTcp().getTransferLogEnable() && proxyConfig.getServer().getTcp().getTransferLogEnable()) { - ch.pipeline().addFirst(new LoggingHandler(HttpsProxy.class)); - } - ch.pipeline().addLast(createSslHandler()); - ch.pipeline().addFirst(new BytesMetricsHandler()); - ch.pipeline().addLast(new HttpVisitorSecurityChannelHandler()); - ch.pipeline().addLast("flowLimiter",new VisitorFlowLimiterChannelHandler()); - ch.pipeline().addLast(new HttpVisitorChannelHandler()); - } - }); + .channel(NioServerSocketChannel.class).childHandler(new ChannelInitializer() { + @Override + public void initChannel(SocketChannel ch) throws Exception { + if (null != proxyConfig.getServer().getTcp().getTransferLogEnable() && proxyConfig.getServer().getTcp().getTransferLogEnable()) { + ch.pipeline().addFirst(new LoggingHandler(HttpsProxy.class)); + } + ch.pipeline().addLast(createSslHandler()); + ch.pipeline().addFirst(new BytesMetricsHandler()); + ch.pipeline().addLast(new HttpVisitorSecurityChannelHandler()); + ch.pipeline().addLast("flowLimiter",new VisitorFlowLimiterChannelHandler()); + ch.pipeline().addLast(new HttpVisitorChannelHandler()); + } + }); bootstrap.bind("0.0.0.0", proxyConfig.getServer().getTcp().getHttpsProxyPort()).sync(); log.info("Https proxy server started!port:{}", proxyConfig.getServer().getTcp().getHttpsProxyPort()); } catch (Exception e) { diff --git a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/security/HttpVisitorSecurityChannelHandler.java b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/security/HttpVisitorSecurityChannelHandler.java index 7aff77ee..909323ed 100644 --- a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/security/HttpVisitorSecurityChannelHandler.java +++ b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/proxy/security/HttpVisitorSecurityChannelHandler.java @@ -1,9 +1,11 @@ package org.dromara.neutrinoproxy.server.proxy.security; import cn.hutool.core.util.StrUtil; +import io.netty.bootstrap.Bootstrap; import io.netty.buffer.ByteBuf; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.channel.*; +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.proxy.ProxyHandler; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.dromara.neutrinoproxy.core.Constants; @@ -25,6 +27,38 @@ public class HttpVisitorSecurityChannelHandler extends ChannelInboundHandlerAdap private final SecurityGroupService securityGroupService = Solon.context().getBean(SecurityGroupService.class); private final PortMappingService portMappingService = Solon.context().getBean(PortMappingService.class); + private Bootstrap bootstrap; + /** + * 内部转发处理器 + */ + class ProxyInnerHandler extends ChannelInboundHandlerAdapter { + private Channel channel; + public ProxyInnerHandler(Channel channel) { + bootstrap = new Bootstrap(); + this.channel = channel; + } + @Override + public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { + ByteBuf readBuffer = (ByteBuf) msg; + readBuffer.retain(); + channel.writeAndFlush(readBuffer); + } + } + + private Channel getClientChannel(SocketChannel ch) throws InterruptedException { + bootstrap.handler(new ChannelInitializer() { + @Override + protected void initChannel(SocketChannel socketChannel) throws Exception { + socketChannel.pipeline().addLast("clientHandler", new ProxyInnerHandler(ch)); + } + }); + // 转发地址 + ChannelFuture sync = bootstrap.connect("127.0.0.1", 9527); + return sync.channel(); + } + + + @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { ByteBuf buf = (ByteBuf) msg; @@ -61,6 +95,7 @@ public class HttpVisitorSecurityChannelHandler extends ChannelInboundHandlerAdap } ctx.channel().attr(Constants.REAL_REMOTE_IP).set(ip); ctx.channel().attr(Constants.SERVER_PORT).set(dm.getId()); + ctx.channel().attr(Constants.LICENSE_ID).set(dm.getLicenseId()); } // 继续传播 diff --git a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/service/LicenseService.java b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/service/LicenseService.java index 4d649029..88cf9c77 100644 --- a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/service/LicenseService.java +++ b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/service/LicenseService.java @@ -40,6 +40,7 @@ import org.noear.solon.annotation.Init; import org.noear.solon.annotation.Inject; import org.noear.solon.core.bean.LifecycleBean; import org.noear.solon.core.runtime.NativeDetector; +import org.noear.solon.data.annotation.Tran; import java.util.Arrays; import java.util.Date; @@ -107,17 +108,16 @@ public class LicenseService implements LifecycleBean { private List assembleConvertLicenses(List list) { List licenseList = list.stream().map(LicenseDO::toRes).collect(Collectors.toList()); - if (!CollectionUtil.isEmpty(licenseList)) { - Set userIds = licenseList.stream().map(LicenseListRes::getUserId).collect(Collectors.toSet()); - List userList = userMapper.findByIds(userIds); - Map userMap = userList.stream().collect(Collectors.toMap(UserDO::getId, Function.identity())); - for (LicenseListRes item : licenseList) { - UserDO userDO = userMap.get(item.getUserId()); - if (null != userDO) { - item.setUserName(userDO.getName()); - } - item.setKey(desensitization(item.getUserId(), item.getKey())); + // 插入用户名 + Set userIds = licenseList.stream().map(LicenseListRes::getUserId).collect(Collectors.toSet()); + List userList = userMapper.findByIds(userIds); + Map userMap = userList.stream().collect(Collectors.toMap(UserDO::getId, Function.identity())); + for (LicenseListRes item : licenseList) { + UserDO userDO = userMap.get(item.getUserId()); + if (null != userDO) { + item.setUserName(userDO.getName()); } + item.setKey(desensitization(item.getUserId(), item.getKey())); } return licenseList; } @@ -203,10 +203,20 @@ public class LicenseService implements LifecycleBean { * @param req * @return */ + @Tran public LicenseUpdateEnableStatusRes updateEnableStatus(LicenseUpdateEnableStatusReq req) { - licenseMapper.updateEnableStatus(req.getId(), req.getEnable(), new Date()); - // 更新VisitorChannel - visitorChannelService.updateVisitorChannelByLicenseId(req.getId(), req.getEnable()); + // 服务端免通道 直接转发,所以无需建立客户端通道。启用即在线,禁用即离线 + if (req.getId() == 1) { + licenseMapper.update(null, new LambdaUpdateWrapper() + .eq(LicenseDO::getId, req.getId()) + .set(LicenseDO::getEnable, req.getEnable()) + .set(LicenseDO::getIsOnline, req.getEnable()) + .set(LicenseDO::getUpdateTime, new Date())); + } else { + licenseMapper.updateEnableStatus(req.getId(), req.getEnable(), new Date()); + // 更新VisitorChannel + visitorChannelService.updateVisitorChannelByLicenseId(req.getId(), req.getEnable()); + } return new LicenseUpdateEnableStatusRes(); } @@ -338,6 +348,7 @@ public class LicenseService implements LifecycleBean { .eq(LicenseDO::getEnable, EnableStatusEnum.ENABLE.getStatus()) .eq(LicenseDO::getUserId, SystemContextHolder.getUserId()) ); + if (CollectionUtil.isEmpty(list)) return null; List licenseList = assembleConvertLicenses(list); return licenseList; } diff --git a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/service/VisitorChannelService.java b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/service/VisitorChannelService.java index 27cd3cd1..00c67498 100644 --- a/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/service/VisitorChannelService.java +++ b/neutrino-proxy-server/src/main/java/org/dromara/neutrinoproxy/server/service/VisitorChannelService.java @@ -234,9 +234,9 @@ public class VisitorChannelService { if (networkProtocolEnum == NetworkProtocolEnum.UDP) { udpServerBootstrap.bind(proxyMapping.getServerPort()).get(); log.info("bind UDP user port: {}", proxyMapping.getServerPort()); - } else if (proxyMapping.getServerPort() <= 65535){ + } else if (proxyMapping.getServerPort() <= 65535){// 大于65535 的端口号是域名解析无需绑定服务端端口号 tcpServerBootstrap.bind(proxyMapping.getServerPort()).get(); - log.info("bind TCP user port: {}", proxyMapping.getServerPort()); + log.info("bind TCP ServerPort: {}", proxyMapping.getServerPort()); } } catch (Exception ex) { // BindException表示该端口已经绑定过 diff --git a/neutrino-proxy-server/src/main/resources/mapper/LicenseMapper.xml b/neutrino-proxy-server/src/main/resources/mapper/LicenseMapper.xml index f7915951..19d5b3eb 100644 --- a/neutrino-proxy-server/src/main/resources/mapper/LicenseMapper.xml +++ b/neutrino-proxy-server/src/main/resources/mapper/LicenseMapper.xml @@ -3,24 +3,26 @@ diff --git a/neutrino-proxy-server/src/main/resources/sql/h2/license.data.sql b/neutrino-proxy-server/src/main/resources/sql/h2/license.data.sql index f7e239a2..990d6806 100644 --- a/neutrino-proxy-server/src/main/resources/sql/h2/license.data.sql +++ b/neutrino-proxy-server/src/main/resources/sql/h2/license.data.sql @@ -1,3 +1,3 @@ #license INSERT INTO license(`id`, `name`, `key`, `user_id`, `is_online`, `enable`, `create_time`, `update_time`) VALUES -(1, '我的mac', 'b0a907332b474b25897c4dcb31fc7eb6', 1, 2, 1, now(), now()); +(1, '服务端(不可编辑删除,可禁用)', 'b0a907332b474b25897c4dcb31fc7eb6', 1, 1, 1, now(), now()); diff --git a/neutrino-proxy-server/src/main/resources/sql/mariadb/license.data.sql b/neutrino-proxy-server/src/main/resources/sql/mariadb/license.data.sql index f7e239a2..990d6806 100644 --- a/neutrino-proxy-server/src/main/resources/sql/mariadb/license.data.sql +++ b/neutrino-proxy-server/src/main/resources/sql/mariadb/license.data.sql @@ -1,3 +1,3 @@ #license INSERT INTO license(`id`, `name`, `key`, `user_id`, `is_online`, `enable`, `create_time`, `update_time`) VALUES -(1, '我的mac', 'b0a907332b474b25897c4dcb31fc7eb6', 1, 2, 1, now(), now()); +(1, '服务端(不可编辑删除,可禁用)', 'b0a907332b474b25897c4dcb31fc7eb6', 1, 1, 1, now(), now()); diff --git a/neutrino-proxy-server/src/main/resources/sql/mysql/license.data.sql b/neutrino-proxy-server/src/main/resources/sql/mysql/license.data.sql index f7e239a2..990d6806 100644 --- a/neutrino-proxy-server/src/main/resources/sql/mysql/license.data.sql +++ b/neutrino-proxy-server/src/main/resources/sql/mysql/license.data.sql @@ -1,3 +1,3 @@ #license INSERT INTO license(`id`, `name`, `key`, `user_id`, `is_online`, `enable`, `create_time`, `update_time`) VALUES -(1, '我的mac', 'b0a907332b474b25897c4dcb31fc7eb6', 1, 2, 1, now(), now()); +(1, '服务端(不可编辑删除,可禁用)', 'b0a907332b474b25897c4dcb31fc7eb6', 1, 1, 1, now(), now());