From 79a3170234773c1777802ef0f77b01d3fd8f9a19 Mon Sep 17 00:00:00 2001 From: aoshiguchen <1052045476@qq.com> Date: Thu, 30 Mar 2023 00:06:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=98=E7=BD=91=E6=96=87=E6=A1=A3=E8=B0=83?= =?UTF-8?q?=E6=95=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/ApplicationLifeCycleListener.java | 55 --- .../client/core/LicenseObtainService.java | 166 -------- .../docs/.vuepress/config.js | 77 +--- .../01.快速上手.md} | 2 +- .../02.管理后台.md} | 4 +- .../01.使用教程/01.快速上手/05.目录结构.md | 68 ---- .../01.快速上手/07.Markdown 容器.md | 373 ------------------ .../01.快速上手/08.Markdown 中使用组件.md | 70 ---- .../01.使用教程/02.开发指南/01.项目结构.md | 39 ++ .../02.实现原理.md} | 2 +- .../docs/01.使用教程/02.相关文章/03.AOP.md | 49 --- .../{ => 01.使用教程}/03.演示/01.演示环境 .md | 0 .../01.使用教程/04.支持我们/01.如何贡献.md | 43 ++ neutrino-proxy-vuepress/docs/index.md | 225 +++++++---- 14 files changed, 241 insertions(+), 932 deletions(-) delete mode 100644 neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/ApplicationLifeCycleListener.java delete mode 100644 neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/LicenseObtainService.java rename neutrino-proxy-vuepress/docs/01.使用教程/{01.快速上手/03.快速上手.md => 01.开始使用/01.快速上手.md} (99%) rename neutrino-proxy-vuepress/docs/01.使用教程/{01.快速上手/04.管理后台使用指南.md => 01.开始使用/02.管理后台.md} (97%) delete mode 100644 neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/05.目录结构.md delete mode 100644 neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/07.Markdown 容器.md delete mode 100644 neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/08.Markdown 中使用组件.md create mode 100644 neutrino-proxy-vuepress/docs/01.使用教程/02.开发指南/01.项目结构.md rename neutrino-proxy-vuepress/docs/01.使用教程/{02.相关文章/06.代理实现中涉及的几类Channel.md => 02.开发指南/02.实现原理.md} (99%) delete mode 100644 neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/03.AOP.md rename neutrino-proxy-vuepress/docs/{ => 01.使用教程}/03.演示/01.演示环境 .md (100%) create mode 100644 neutrino-proxy-vuepress/docs/01.使用教程/04.支持我们/01.如何贡献.md diff --git a/neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/ApplicationLifeCycleListener.java b/neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/ApplicationLifeCycleListener.java deleted file mode 100644 index 3efba966..00000000 --- a/neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/ApplicationLifeCycleListener.java +++ /dev/null @@ -1,55 +0,0 @@ -///** -// * Copyright (c) 2022 aoshiguchen -// * -// * Permission is hereby granted, free of charge, to any person obtaining a copy -// * of this software and associated documentation files (the "Software"), to deal -// * in the Software without restriction, including without limitation the rights -// * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// * copies of the Software, and to permit persons to whom the Software is -// * furnished to do so, subject to the following conditions: -// * -// * The above copyright notice and this permission notice shall be included in all -// * copies or substantial portions of the Software. -// * -// * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// * SOFTWARE. -// */ -//package fun.asgc.neutrino.proxy.client.core; -// -//import fun.asgc.neutrino.core.annotation.Autowired; -//import fun.asgc.neutrino.core.annotation.Component; -//import fun.asgc.neutrino.core.annotation.NonIntercept; -//import fun.asgc.neutrino.core.annotation.Subscribe; -//import fun.asgc.neutrino.core.base.event.ApplicationEvent; -//import fun.asgc.neutrino.core.base.event.ApplicationEventReceiver; -//import fun.asgc.neutrino.core.constant.AppLifeCycleStatusEnum; -//import fun.asgc.neutrino.core.constant.MetaDataConstant; -//import lombok.extern.slf4j.Slf4j; -// -///** -// * 应用生命周期事件监听器 -// * @author: aoshiguchen -// * @date: 2022/10/10 -// */ -//@Slf4j -//@NonIntercept -//@Component -//@Subscribe(topic = MetaDataConstant.TOPIC_APP_LIFE_CYCLE) -//public class ApplicationLifeCycleListener extends ApplicationEventReceiver { -// @Autowired -// private LicenseObtainService licenseObtainService; -// -// @Override -// public void receive(ApplicationEvent msg) { -// log.debug("ApplicationLifeCycleListener:{}", msg.data().getDesc()); -// if (msg.data() == AppLifeCycleStatusEnum.APP_STARTUP) { -// licenseObtainService.start(); -// } -// } -// -//} diff --git a/neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/LicenseObtainService.java b/neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/LicenseObtainService.java deleted file mode 100644 index a1f8b404..00000000 --- a/neutrino-proxy-client/src/main/java/fun/asgc/neutrino/proxy/client/core/LicenseObtainService.java +++ /dev/null @@ -1,166 +0,0 @@ -///** -// * Copyright (c) 2022 aoshiguchen -// * -// * Permission is hereby granted, free of charge, to any person obtaining a copy -// * of this software and associated documentation files (the "Software"), to deal -// * in the Software without restriction, including without limitation the rights -// * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// * copies of the Software, and to permit persons to whom the Software is -// * furnished to do so, subject to the following conditions: -// * -// * The above copyright notice and this permission notice shall be included in all -// * copies or substantial portions of the Software. -// * -// * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// * SOFTWARE. -// */ -//package fun.asgc.neutrino.proxy.client.core; -// -//import com.alibaba.fastjson.JSONObject; -//import fun.asgc.neutrino.core.base.CustomThreadFactory; -//import fun.asgc.neutrino.core.util.ArrayUtil; -//import fun.asgc.neutrino.core.util.FileUtil; -//import fun.asgc.neutrino.core.util.StringUtil; -//import fun.asgc.neutrino.proxy.client.config.CustomConfig; -//import fun.asgc.neutrino.proxy.client.config.ProxyConfig; -//import lombok.extern.slf4j.Slf4j; -//import org.noear.solon.annotation.Component; -//import org.noear.solon.annotation.Inject; -// -//import java.util.HashMap; -//import java.util.Map; -//import java.util.Scanner; -//import java.util.concurrent.Executors; -//import java.util.concurrent.ScheduledExecutorService; -//import java.util.concurrent.TimeUnit; -//import java.util.concurrent.locks.ReentrantLock; -// -///** -// * license获取服务 -// * @author: aoshiguchen -// * @date: 2022/9/4 -// */ -//@Slf4j -//@Component -//public class LicenseObtainService { -// /** -// * 调度器 -// */ -// private static final ScheduledExecutorService scheduledExecutor = Executors.newSingleThreadScheduledExecutor(new CustomThreadFactory("LicenseObtain")); -// private ReentrantLock runLock = new ReentrantLock(); -// private Scanner scanner = new Scanner(System.in); -// @Inject -// private ProxyConfig proxyConfig; -// @Inject -// private ProxyClientService proxyClientService; -// -// public void start() { -// scheduledExecutor.scheduleWithFixedDelay(() -> { -// boolean lock = runLock.tryLock(); -// try { -// if (lock) { -// this.process(); -// } -// } finally { -// if (runLock.isHeldByCurrentThread()){ -// runLock.unlock(); -// } -// } -// }, 0, proxyConfig.getClient().getObtainLicenseInterval(), TimeUnit.SECONDS); -// } -// -// public void stop() { -// scheduledExecutor.shutdown(); -// log.info("licenseKey获取任务停止"); -// } -// -// public void process() { -// -// -// proxyClientService.start(); -// } -// -// private String -// -// private CustomConfig getCustomConfigByCliParams() { -// CustomConfig customConfig = new CustomConfig(); -// // 默认无需输入 -// customConfig.setJksPath(environment.getMainArgsForString("jksPath", proxyConfig.getClient().getJksPath())); -// customConfig.setServerIp(environment.getMainArgsForString("serverIp", proxyConfig.getClient().getServerIp())); -// customConfig.setServerPort(environment.getMainArgsForInteger("serverPort", proxyConfig.getClient().getServerPort())); -// customConfig.setSslEnable(environment.getMainArgsForBoolean("sslEnable", proxyConfig.getClient().getSslEnable())); -// customConfig.setLicenseKey(environment.getMainArgsForString("licenseKey")); -// // 启动参数指定了license,则无需后续处理 -// if (StringUtil.notEmpty(customConfig.getLicenseKey())) { -//// FileUtil.write("./.neutrino-proxy-client.json", JSONObject.toJSONString(customConfig, SerializerFeature.PrettyFormat)); -// return customConfig; -// } -// -// // 启动参数未指定license,则优先读取外部配置 -// String config = FileUtil.readContentAsString("./.neutrino-proxy-client.json"); -// if (StringUtil.notEmpty(config)) { -// try { -// CustomConfig tmp = JSONObject.parseObject(config, CustomConfig.class); -// if (!StringUtil.isEmpty(tmp.getJksPath())) { -// customConfig.setJksPath(tmp.getJksPath()); -// } -// if (!StringUtil.isEmpty(tmp.getServerIp())) { -// customConfig.setServerIp(tmp.getServerIp()); -// } -// if (null != tmp.getServerPort()) { -// customConfig.setServerPort(tmp.getServerPort()); -// } -// if (null != tmp.getSslEnable()) { -// customConfig.setSslEnable(tmp.getSslEnable()); -// } -// if (!StringUtil.isEmpty(tmp.getLicenseKey())) { -// customConfig.setLicenseKey(tmp.getLicenseKey()); -// } -// } catch (Exception e) { -// log.error("file '.neutrino-proxy-client.json' config exception!", e); -// } -// if (StringUtil.notEmpty(customConfig.getLicenseKey())) { -//// FileUtil.write("./.neutrino-proxy-client.json", JSONObject.toJSONString(customConfig, SerializerFeature.PrettyFormat)); -// return customConfig; -// } -// } -// -// String license = ""; -// while (StringUtil.isEmpty(license)) { -// System.out.print("Please input license:"); -// license = scanner.next(); -// } -// customConfig.setLicenseKey(license); -//// FileUtil.write("./.neutrino-proxy-client.json", JSONObject.toJSONString(customConfig, SerializerFeature.PrettyFormat)); -// -// return customConfig; -// } -// -// /** -// * 获取命令行参数 -// * @param args -// * @return -// */ -// private Map getCliParams(String[] args) { -// Map res = new HashMap<>(); -// if (ArrayUtil.notEmpty(args)) { -// for (String item : args) { -// if (StringUtil.isEmpty(item) || !item.contains("=")) { -// continue; -// } -// int index = item.indexOf("="); -// if (index <= 0 || index == item.length() - 1) { -// continue; -// } -// res.put(item.substring(0, index), item.substring(index + 1)); -// } -// } -// -// return res; -// } -//} diff --git a/neutrino-proxy-vuepress/docs/.vuepress/config.js b/neutrino-proxy-vuepress/docs/.vuepress/config.js index 30b4a8d2..819974a8 100644 --- a/neutrino-proxy-vuepress/docs/.vuepress/config.js +++ b/neutrino-proxy-vuepress/docs/.vuepress/config.js @@ -21,88 +21,21 @@ module.exports = { // 主题配置 themeConfig: { - // nav: [ - // { text: '首页', link: '/' }, - // { - // text: '指南', link: '/pages/a2f161/', items: [ - // { text: '主题初衷与诞生', link: '/pages/52d5c3/' }, - // { text: '介绍', link: '/pages/a2f161/' }, - // { text: '快速上手', link: '/pages/793dcb/' }, - // { text: '目录结构', link: '/pages/2f674a/' }, - // { text: '核心配置和约定', link: '/pages/33d574/' }, - // { text: '自动生成front matter', link: '/pages/088c16/' }, - // { text: 'Markdown 容器', link: '/pages/d0d7eb/' }, - // { text: 'Markdown 中使用组件', link: '/pages/197691/' }, - // { - // text: '相关文章', items: [ - // { text: '使目录栏支持h2~h6标题', link: '/pages/8dfab5/' }, - // { text: '如何让你的笔记更有表现力', link: '/pages/dd027d/' }, - // { text: '批量操作front matter工具', link: '/pages/2b8e22/' }, - // { text: '部署', link: '/pages/0fc1d2/' }, - // { text: '关于写文章和H1标题', link: '/pages/9ae0bd/' }, - // { text: '关于博客搭建与管理', link: '/pages/26997d/' }, - // { text: '在线编辑和新增文章的方法', link: '/pages/c5a54d/' }, - // ] - // } - // ] - // }, - // { - // text: '配置', link: '/pages/a20ce8/', items: [ - // { text: '主题配置', link: '/pages/a20ce8/' }, - // { text: '首页配置', link: '/pages/f14bdb/' }, - // { text: 'front matter配置', link: '/pages/3216b0/' }, - // { text: '目录页配置', link: '/pages/54651a/' }, - // { text: '添加摘要', link: '/pages/1cc523/' }, - // { text: '修改主题颜色和样式', link: '/pages/f51918/' }, - // { text: '评论栏', link: '/pages/ce175c/' }, - // ] - // }, - // { text: '资源', link: '/pages/db78e2/' }, - // { text: '案例', link: '/pages/5d571c/' }, - // { text: '问答', link: '/pages/9cc27d/' }, - // { text: '赞助', link: '/pages/1b12ed/' }, - // ], nav: [ {text: '首页', link: '/'}, { - text: '快速使用', link: '/pages/793dcb/', items: [ + text: '文档', link: '/pages/793dcb/', items: [ {text: '快速上手', link: '/pages/793dcb/'}, - {text: '管理后台使用指南', link: '/pages/793dcc/'}, - {text: '目录结构', link: '/pages/2f674a/'}, - { - text: '相关文章', items: [ - {text: 'AOP', link: '/pages/8dfab5/'}, - {text: '代理实现中涉及的几类Channel', link: '/pages/dd027d/'}, - ] - } + {text: '后台操作指南', link: '/pages/793dcc/'}, ] }, - // { - // text: '常见问题', link: '/pages/a20ce8/', items: [ - // {text: '主题配置', link: '/pages/a20ce8/'}, - // {text: '首页配置', link: '/pages/f14bdb/'}, - // {text: 'front matter配置', link: '/pages/3216b0/'}, - // {text: '目录页配置', link: '/pages/54651a/'}, - // {text: '添加摘要', link: '/pages/1cc523/'}, - // {text: '修改主题颜色和样式', link: '/pages/f51918/'}, - // {text: '评论栏', link: '/pages/ce175c/'}, - // ] - // }, {text: '演示', link: '/pages/db78e2/'}, - // {text: '案例', link: '/pages/5d571c/'}, - { - text: '最近更新', link: '/pages/9cc27d/', items: [ - { text: '最近更新', link: '/pages/9cc27d/' }, - { text: '如何贡献', link: '/pages/69a632/' }, - ] - }, - {text: '关于我们', link: '/pages/1b12ed/'}, + {text: 'Gitee', link: 'https://gitee.com/dromara/neutrino-proxy'}, ], sidebarDepth: 2, // 侧边栏显示深度,默认1,最大2(显示到h3标题) logo: '/img/logo.png', // 导航栏logo - // repo: 'aoshiguchen/neutrino-proxy', // 导航栏右侧生成Github链接 - repo: 'https://gitee.com/dromara/neutrino-proxy', // 导航栏右侧生成Github链接 - repoLabel: 'Gitee地址', + repo: 'https://github.com/dromara/neutrino-proxy', // 导航栏右侧生成Github链接 + repoLabel: 'Github', searchMaxSuggestions: 10, // 搜索结果显示最大数 lastUpdated: '上次更新', // 更新的时间,及前缀文字 string | boolean (取值为git提交时间) diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/03.快速上手.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.开始使用/01.快速上手.md similarity index 99% rename from neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/03.快速上手.md rename to neutrino-proxy-vuepress/docs/01.使用教程/01.开始使用/01.快速上手.md index 773be9e4..c3488b50 100644 --- a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/03.快速上手.md +++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.开始使用/01.快速上手.md @@ -1,6 +1,6 @@ --- title: 快速上手 -date: 2020-05-11 13:54:40 +date: 2023-03-28 20:30:00 permalink: /pages/793dcb article: false --- diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/04.管理后台使用指南.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.开始使用/02.管理后台.md similarity index 97% rename from neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/04.管理后台使用指南.md rename to neutrino-proxy-vuepress/docs/01.使用教程/01.开始使用/02.管理后台.md index 574602b4..b5ddf3a4 100644 --- a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/04.管理后台使用指南.md +++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.开始使用/02.管理后台.md @@ -1,6 +1,6 @@ --- -title: 管理后台使用指南 -date: 2020-05-11 13:54:40 +title: 后台操作指南 +date: 2023-03-28 20:30:00 permalink: /pages/793dcc article: false --- diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/05.目录结构.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/05.目录结构.md deleted file mode 100644 index 4fc4c24d..00000000 --- a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/05.目录结构.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: 目录结构 -date: 2020-05-11 13:54:56 -permalink: /pages/2f674a -article: false ---- - -``` -├── data.db (sqlite数据库文件。若未配置mysql,默认使用sqlite,项目首次启动会自动初始化sqlite数据库。) -├── docs (项目相关的一些文档) -├── ├── Aop.MD (框架层Aop机制、使用说明) -├── └── Channel.MD (内网穿透实现原理、代理实现流程说明) -├── lib (项目开启了将自动生成的类保存到本地后,运行过程中动态生成的类自动保存到此处,方便学习、调试) -├── neutrino-core (一套手写的基于netty的框架,相当于简易版的SpringBoot + Mybatis + xxljob,计划后期分离为单独开源项目维护) -├── neutrino-proxy-admin (基于vue-element-admin开发的一个管理系统,用于可视化操作端口映射、代理数据实时监控) -├── neutrino-proxy-client (基于netty的代理客户端,用于和服务端交互、转发内网数据) -├── neutrino-proxy-core (代理相关的公共代码(协议、常量)) -├── neutrino-proxy-server (基于netty的代理服务端,用于和客户段交互,将客户端转发的内网数据转发至外网端口) -└── todolist.MD (近期的开发计划) -``` - - - -::: tip 提示 -为了方便您更快的学习和使用本主题,我在代码当中添加了比较多的注释说明。 -::: diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/07.Markdown 容器.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/07.Markdown 容器.md deleted file mode 100644 index c01500d9..00000000 --- a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/07.Markdown 容器.md +++ /dev/null @@ -1,373 +0,0 @@ ---- -title: Markdown 容器 -date: 2020-05-29 11:16:18 -permalink: /pages/d0d7eb/ -article: false ---- - -Markdown 容器是对 Markdown 语法的一个扩展,使用简单的语法就可以在页面中呈现丰富的效果。 - -除了原默认主题自带的容器外,本主题还新增了一些好用的自定义容器。 - -## 信息框容器 -**输入** -```` md -::: tip -这是一条提示 -::: - -::: warning -这是一条注意 -::: - -::: danger -这是一条警告 -::: - -::: note -这是笔记容器,在 版本才支持哦~ -::: -```` - -**输出** -::: tip -这是一条提示 -::: - -::: warning -这是一条注意 -::: - -::: danger -这是一条警告 -::: - -::: note -这是笔记容器,在 以上版本才支持哦~ -::: - -以上容器均可自定义标题,如: -```` -::: tip 我的提示 -自定义标题的提示框 -::: -```` -::: tip 我的提示 -自定义标题的提示框 -::: - -## 布局容器 -**输入** -```` md -::: center - ### 我是居中的内容 - (可用于标题、图片等的居中) -::: - -::: right - [我是右浮动的内容](https://zh.wikipedia.org/wiki/%E7%89%9B%E9%A1%BF%E8%BF%90%E5%8A%A8%E5%AE%9A%E5%BE%8B) -::: - -::: details -这是一个详情块,在 IE / Edge 中不生效 -```js -console.log('这是一个详情块') -``` -::: - -::: theorem 牛顿第一定律 -假若施加于某物体的外力为零,则该物体的运动速度不变。 -::: right -来自 [维基百科](https://zh.wikipedia.org/wiki/%E7%89%9B%E9%A1%BF%E8%BF%90%E5%8A%A8%E5%AE%9A%E5%BE%8B) -::: -```` - -**输出** -::: center - ### 我是居中的内容 - (可用于标题、图片等的居中) -::: - -::: right - [我是右浮动的内容](https://zh.wikipedia.org/wiki/%E7%89%9B%E9%A1%BF%E8%BF%90%E5%8A%A8%E5%AE%9A%E5%BE%8B) -::: - -::: details -这是一个详情块,在 IE / Edge 中不生效 -```js -console.log('这是一个详情块') -``` -::: - -::: theorem 牛顿第一定律 -假若施加于某物体的外力为零,则该物体的运动速度不变。 - -::: right -来自 [维基百科](https://zh.wikipedia.org/wiki/%E7%89%9B%E9%A1%BF%E8%BF%90%E5%8A%A8%E5%AE%9A%E5%BE%8B) -::: - -> 注意:`right`、`details`、`theorem`这三个容器在`v1.3.0 +`版本才支持。`center`容器在`v1.3.3 +`版本才支持。 - - -## 普通卡片列表 - -普通卡片列表容器,可用于`友情链接`、`项目推荐`、`诗词展示`等。 - -先来看看效果: - -**输出** -::: cardList -```yaml -- name: 麋鹿鲁哟 - desc: 大道至简,知易行难 - avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200122153807.jpg # 可选 - link: https://www.cnblogs.com/miluluyo/ # 可选 - bgColor: '#CBEAFA' # 可选,默认var(--bodyBg)。颜色值有#号时请添加单引号 - textColor: '#6854A1' # 可选,默认var(--textColor) -- name: XAOXUU - desc: '#IOS #Volantis主题作者' - avatar: https://fastly.jsdelivr.net/gh/xaoxuu/assets@master/avatar/avatar.png - link: https://xaoxuu.com - bgColor: '#718971' - textColor: '#fff' -- name: 平凡的你我 - desc: 理想成为大牛的小陈同学 - avatar: https://reinness.com/avatar.png - link: https://reinness.com - bgColor: '#FCDBA0' - textColor: '#A05F2C' -``` -::: - -上面效果在Markdown中的代码是这样的: - -**输入** -```` md -::: cardList -```yaml -- name: 麋鹿鲁哟 - desc: 大道至简,知易行难 - avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200122153807.jpg # 可选 - link: https://www.cnblogs.com/miluluyo/ # 可选 - bgColor: '#CBEAFA' # 可选,默认var(--bodyBg)。颜色值有#号时请添加单引号 - textColor: '#6854A1' # 可选,默认var(--textColor) -- name: XAOXUU - desc: '#IOS #Volantis主题作者' - avatar: https://fastly.jsdelivr.net/gh/xaoxuu/assets@master/avatar/avatar.png - link: https://xaoxuu.com - bgColor: '#718971' - textColor: '#fff' -- name: 平凡的你我 - desc: 理想成为大牛的小陈同学 - avatar: https://reinness.com/avatar.png - link: https://reinness.com - bgColor: '#FCDBA0' - textColor: '#A05F2C' -``` -::: -```` - - -### 语法 -````md -::: cardList <每行显示数量> -``` yaml -- name: 名称 - desc: 描述 - avatar: https://xxx.jpg # 头像,可选 - link: https://xxx/ # 链接,可选 - bgColor: '#CBEAFA' # 背景色,可选,默认var(--bodyBg)。颜色值有#号时请添加引号 - textColor: '#6854A1' # 文本色,可选,默认var(--textColor) -``` -::: -```` - -* `<每行显示数量>` 数字,表示每行最多显示多少个,选值范围1~4,默认3。在小屏时会根据屏幕宽度减少每行显示数量。 -* 代码块需指定语言为`yaml` -* 代码块内是一个`yaml`格式的数组列表 -* 数组成员的属性有: - * `name`名称 - * `desc`描述 - * `avatar`头像,可选 - * `link`链接,可选 - * `bgColor`背景色,可选,默认`var(--bodyBg)`。颜色值有`#`号时请添加引号 - * `textColor`文本色,可选,默认`var(--textColor)` - -下面再来看另外一个示例: - -**输入** -```` md -::: cardList 2 -```yaml -- name: 《静夜思》 - desc: 床前明月光,疑是地上霜。举头望明月,低头思故乡。 - bgColor: '#F0DFB1' - textColor: '#242A38' -- name: Vdoing - desc: 🚀一款简洁高效的VuePress 知识管理&博客(blog) 主题 - link: https://github.com/xugaoyi/vuepress-theme-vdoing - bgColor: '#DFEEE7' - textColor: '#2A3344' -``` -::: -```` - - -**输出** -::: cardList 2 -```yaml -- name: 《静夜思》 - desc: 床前明月光,疑是地上霜。举头望明月,低头思故乡。 - bgColor: '#F0DFB1' - textColor: '#242A38' -- name: Vdoing - desc: 🚀一款简洁高效的VuePress 知识管理&博客(blog) 主题 - link: https://github.com/xugaoyi/vuepress-theme-vdoing - bgColor: '#DFEEE7' - textColor: '#2A3344' -``` -::: - - - - -## 图文卡片列表 - -图文卡片列表容器,可用于`项目展示`、`产品展示`等。 - -先看效果: - -**输出** -::: cardImgList -```yaml -- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200529162253.jpg - link: https://xugaoyi.com/ - name: 标题 - desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 # 描述,可选 - author: Evan Xu # 作者,可选 - avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg # 头像,可选 -- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200530100256.jpg - link: https://xugaoyi.com/ - name: 标题 - desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 - author: Evan Xu - avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg -- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200530100257.jpg - link: https://xugaoyi.com/ - name: 标题 - desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 - author: Evan Xu - avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg -``` -::: - -**输入** -````md -::: cardImgList -```yaml -- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200529162253.jpg - link: https://xugaoyi.com/ - name: 标题 - desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 # 描述,可选 - author: Evan Xu # 作者,可选 - avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg # 头像,可选 -- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200530100256.jpg - link: https://xugaoyi.com/ - name: 标题 - desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 - author: Evan Xu - avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg -- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200530100257.jpg - link: https://xugaoyi.com/ - name: 标题 - desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 - author: Evan Xu - avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg -``` -::: -```` - - -### 语法 -````md -::: cardImgList <每行显示数量> -``` yaml -- img: https://xxx.jpg # 图片地址 - link: https://xxx.com # 链接地址 - name: 标题 - desc: 描述 # 可选 - author: 作者名称 # 可选 - avatar: https://xxx.jpg # 作者头像,可选 -``` -::: -```` -* `<每行显示数量>` 数字,表示每行最多显示多少个,选值范围1~4,默认3。在小屏时会根据屏幕宽度减少每行显示数量。 -* 代码块需指定语言为`yaml` -* 代码块内是一个`yaml`格式的数组列表 -* 数组成员的属性有: - * `img`图片地址 - * `link`链接地址 - * `name`标题 - * `desc`描述,可选 - * `author`作者名称,可选 - * `avatar`作者头像,可选 - - -## 增强配置 -为了适应更多需求场景,`v1.9.0+`版本的普通卡片和图文卡片容器添加了一些新的配置: - -### 1. 普通卡片和图文卡片容器 - -#### target -- 链接的打开方式,默认`_blank` - - - `_self` 当前页面 - - - `_blank` 新窗口打开 - - - -### 2. 图文卡片容器 - -#### imgHeight -- 设置图片高度,默认 `auto` - - - 带单位 - - -#### objectFit -- 设置图片的填充方式(object-fit),默认 `cover` - - - `fill` 拉伸 (会改变宽高比) - - `contain` 缩放 (保持宽高比,会留空) - - `cover` 填充 (会裁剪) - - `none` 保持原有尺寸 (会留空或裁剪) - - `scale-down` 保证显示完整图片 (保持宽高比,会留空) - - -#### lineClamp -- 描述文本超出多少行显示省略号,默认`1` - -​ - -### 3. 配置示例: - -````yaml -::: cardImgList -``` yaml -config: - target: _blank - imgHeight: auto - objectFit: cover - lineClamp: 1 - -data: - - img: https://xxx.jpg - link: https://xugaoyi.com/ - name: 标题 - desc: 描述内容 - author: Evan Xu - avatar: https://xxx.jpg -``` -::: -```` diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/08.Markdown 中使用组件.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/08.Markdown 中使用组件.md deleted file mode 100644 index 87b1c398..00000000 --- a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/08.Markdown 中使用组件.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: Markdown 中使用组件 -date: 2020-11-10 18:56:22 -permalink: /pages/197691/ -article: false ---- - -主题的内置组件可以直接在`Markdown`文件中以类似html标签的方式使用。 - -## 标记 -- **Props:** - - `text`- string - - `type` - string, 可选值: `tip | warning | error`,默认: `tip` - - `vertical` - string, 可选值: `top | middle`,默认: `top` - -- **Usage:** - -你可以在标题或其他内容中使用标记: -```md -#### 《沁园春·雪》 -北国风光,千里冰封,万里雪飘。 - -> : 北方的风光。 -``` -**效果:** -#### 《沁园春·雪》 -北国风光,千里冰封,万里雪飘。 - -> : 北方的风光。 - -## 代码块选项卡 - -在``中嵌套``来配合使用。在``标签添加`title`来指定tab标题,`active`指定当前tab: - -````md - - - ```bash - yarn add vuepress-theme-vdoing -D - ``` - - - - ```bash - npm install vuepress-theme-vdoing -D - ``` - - -```` - -**效果:** - - - - ```bash - yarn add vuepress-theme-vdoing -D - ``` - - - - ```bash - npm install vuepress-theme-vdoing -D - ``` - - - -::: warning -- 请在``标签与markdown内容之间使用空行隔开,否则可能会解析不出来。 -- 该组件只适用于放置代码块,放其他内容在体验上并不友好。如您确实需要放置其他内容的选项卡,推荐使用[vuepress-plugin-tabs](https://superbiger.github.io/vuepress-plugin-tabs)插件。 -::: diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/02.开发指南/01.项目结构.md b/neutrino-proxy-vuepress/docs/01.使用教程/02.开发指南/01.项目结构.md new file mode 100644 index 00000000..fb0a4f95 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/02.开发指南/01.项目结构.md @@ -0,0 +1,39 @@ +--- +title: 项目结构 +date: 2020-05-11 13:54:56 +permalink: /pages/2f674a +article: false +--- + +# 主要目录、文件 + +``` +├── data.db (为配置mysql时,项目启动默认初始化生成的本地sqlite数据库文件) +├── docs (项目相关的一些文档) +├── neutrino-proxy-admin (管理后台前端项目,基于vue-element-admin) +├── neutrino-proxy-client (基于netty的代理客户端,用于和服务端交互、转发内网数据) +├── neutrino-proxy-core (代理相关的公共代码(协议、常量)) +├── neutrino-proxy-server (基于netty的代理服务端,用于和客户段交互,将客户端转发的内网数据转发至外网端口) +└── todolist.MD (近期的开发计划) +``` + +# 代理服务端 `neutrino-proxy-server` +- base:基础的配置、初始化代码 +- constant:服务端常量、枚举定义 +- dal:持久层mapper、实体 +- job:定时任务执行入口 +- proxy:代理核心实现 +- service:基础业务 +- util:基础工具封装 +- resource/mapper:mybatis SQL文件 +- resource/sql:维护mysql/sqlite的初始化SQL、SQL变更记录 +- resource/app.yml:项目默认配置 +- resource/test.jks:默认的SSL证书 + +# 代理客户端 `neutrino-proxy-client` +- config:基础配置 +- core:客户端代理核心入口 +- handler:客户端代理数据处理逻辑 +- util:基础工具封装 +- resource/app.yml:项目默认配置 +- resource/test.jks:默认的SSL证书 \ No newline at end of file diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/06.代理实现中涉及的几类Channel.md b/neutrino-proxy-vuepress/docs/01.使用教程/02.开发指南/02.实现原理.md similarity index 99% rename from neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/06.代理实现中涉及的几类Channel.md rename to neutrino-proxy-vuepress/docs/01.使用教程/02.开发指南/02.实现原理.md index f3e5d5a3..8ff45b05 100644 --- a/neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/06.代理实现中涉及的几类Channel.md +++ b/neutrino-proxy-vuepress/docs/01.使用教程/02.开发指南/02.实现原理.md @@ -1,5 +1,5 @@ --- -title: 代理实现中涉及的几类Channel +title: 实现原理 date: 2020-09-26 21:13:59 permalink: /pages/dd027d/ article: false diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/03.AOP.md b/neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/03.AOP.md deleted file mode 100644 index 3bfc2f17..00000000 --- a/neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/03.AOP.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: AOP -date: 2022-03-18 15:02:52 -permalink: /pages/8dfab5/ -article: false ---- - -# 动态代理策略 -- `AUTO` 框架按照一定策略动态选择代理方式 -- `JDK_DYNAMIC_PROXY` JDK动态代理 -- `ASGC_PROXY` 子类继承代理(傲世孤尘代理) - -# 自动代理策略 -> 当被代理类是一个接口时,采用JDK动态代理,否则采用子类代理 - -# JDK动态代理 -> 目前仅支持代理接口,不支持为普通类生成代理。 -> 原因是:JDK动态代理生成的代理类,不能用被代理类的类型接收,而必须用被代理类的接口类型接收,这与目前的设计结构有冲突,后续需要思考优化解决 - -# 子类继承代理 -> 顾名思义,通过生成一个被代理类的子类来创建一个代理类实例,因此可以用被代理类类型接收代理实例。 -> 可代理接口、普通类。不能代理静态类、内部类、final修饰的类、final修饰的方法,暂不支持代理抽象类。 - -# 拦截器 -> 所有拦截器实例都是单例的,与bean容器打通(这块后期着重优化) - -- `全局拦截器` 全局维护,由所有代理类共享的拦截器,根据需要可以过滤。 -- `普通拦截器` 代理实例维护,不同的代理实例可共享,需要在被代理类或者方法上加`@Intercept`注解标注 -- `过滤器` 阉割版的拦截器,用于在目标方法执行前进行过滤操作 -- `结果处理器` 阉割版的拦截器,用于在目标方法执行完毕正常返回后,对返回数据进行处理 -- `异常处理器` 阉割版的拦截器,用于在目标方法执行抛异常后,对异常进行捕获处理 - -# 拦截器的继承 -> 不是父类子类的继承,类似于财产的继承。按照继承关系依次是:全局拦截器 -> 类拦截器 -> 方法拦截器 -- 所有的代理类都继承全局拦截器,前提是代理类没有排除全局拦截器 -- 所有的可代理方法都继承类上的拦截器(`@Intercept`在类上标注的拦截器),前提是方法上没有标注排除类上的拦截器。 -- 特别的,如果被代理类是一个接口。则这个接口会继承所有父接口的拦截器。 - -# 拦截器的执行顺序 -- 对于普通类来说,拦截器按照继承顺序执行,也就是会首先执行全局拦截器 -- 对于接口来说,先按照拦截器继承顺序,再按照接口继承层级向上传递。如:全局拦截器 -> 类拦截器 -> 方法拦截器 -> 父接口拦截器 -> 爷接口拦截器 -> ... - -# 拦截器的异常处理流程 -> 异常处理与拦截器执行顺序相反,类似于冒泡的过程。 -- 末端拦截器处理,若未能捕获,则继续流转 -- 全局拦截器处理,若未能捕获、则继续流转 -- 若被代理方法声明了对外抛出,则抛给应用层,否则继续流转 -- 代理方法处理,直接打印堆栈信息 - diff --git a/neutrino-proxy-vuepress/docs/03.演示/01.演示环境 .md b/neutrino-proxy-vuepress/docs/01.使用教程/03.演示/01.演示环境 .md similarity index 100% rename from neutrino-proxy-vuepress/docs/03.演示/01.演示环境 .md rename to neutrino-proxy-vuepress/docs/01.使用教程/03.演示/01.演示环境 .md diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/04.支持我们/01.如何贡献.md b/neutrino-proxy-vuepress/docs/01.使用教程/04.支持我们/01.如何贡献.md new file mode 100644 index 00000000..35aa95d8 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/04.支持我们/01.如何贡献.md @@ -0,0 +1,43 @@ +--- +title: 如何贡献 +date: 2023-03-29 23:34:07 +permalink: /pages/a3f096/ +--- + +# 🎋代码分支说明 +- dev:常规开发分支,日常的开发、Bug修复、提交PR都在此分支 +- feature/xxx:特征分支,一些试验性开发、提交PR都在此分支,xxx可自行取一个有意义的名称 +- release/xxx:发行版分支,作为阶段性成果、重大更新的版本固化分支。受保护,不允许任何提交。 +- master:主分支,定期同步最新代码,目前仅支持本人(傲世孤尘/雨韵诗泽)提交。 + +# ✊贡献的方式 +包括,但不限于以下形式: +- 提交[issues](https://gitee.com/dromara/neutrino-proxy/issues) +- 参与[issues](https://gitee.com/dromara/neutrino-proxy/issues)解决的必要性、解决方案的讨论、给出建设性的意见 +- 领取[issues](https://gitee.com/dromara/neutrino-proxy/issues) 并完成开发、提交PR +- 为[本项目](https://gitee.com/dromara/neutrino-proxy)完善代码注释 +- 为[本项目](https://gitee.com/dromara/neutrino-proxy)增加测试代码 +- 为[本项目](https://gitee.com/dromara/neutrino-proxy)优化现有代码 +- 为[本项目](https://gitee.com/dromara/neutrino-proxy)优化操作体验 +- 通过公众号、博客、贴吧、论坛等形式分享/宣传中微子代理 +- 丰富项目文档,包括使用过程中踩过的坑、需要优化的点、具体问题的解决方法等 + +# 🧬贡献代码的步骤 +- 在Gitee上fork项目到自己的仓库 +- 将fork后的自己仓库的项目clone到本地 +- 拉取dev分支最新代码,并修改 +- commit并push到自己的仓库 +- 登录Gitee在的仓库上可以看到一个 pull request 按钮,点击它,填写一些说明信息,然后提交即可。 +- 等待合并 + +# 📐PR的规范 +> 你可能发现有的代码并不符合这个规范,但我们后续都会朝着这个方向迈进。后续我们会逐步全面规范化,请先保证新提交的代码满足以下要求: + +- 注释完备,尤其每个新增的方法应按照Java文档规范标明方法说明、参数说明、返回值说明等信息,必要时请添加单元测试,如果愿意,也可以加上你的大名。 +- 原则上,不允许自行添加第三方依赖库。若确有必要,请先和项目负责人沟通达成一致。 +- 对现有代码的优化,请在注释中说明原因。 +- 如果涉及到数据库的变更,则至少需要做到以下绩点: + - sqlite、mysql下均测试通过 + - 在`./neutrino-proxy-server/src/main/resource/sql`下维护更新对应的表结构sql文件 + - 对于新增的表,维护必要的初始化数据 + - 在对应的mysql、sqlite的update目录下,维护SQL变更记录,确保SQL执行测试通过 \ No newline at end of file diff --git a/neutrino-proxy-vuepress/docs/index.md b/neutrino-proxy-vuepress/docs/index.md index 5e6b5945..bb4871c2 100644 --- a/neutrino-proxy-vuepress/docs/index.md +++ b/neutrino-proxy-vuepress/docs/index.md @@ -83,7 +83,7 @@ postList: none ::: -->
- + -## 📚 Dromara 成员项目 -

- -一个轻量级的分布式日志标记追踪神器,10分钟即可接入,自动对日志打标签完成微服务的链路追踪 +

# 🤝 dromara 组织项目

+

为往圣继绝学,一个人或许能走的更快,但一群人会走的更远。

+

+ + - -轻量,快速,稳定,可编排的组件式流程引擎 + + - -小而全的Java工具类库,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。 + + - -一个轻量级 java 权限认证框架,让鉴权变得简单、优雅! + + - -高性能一站式分布式事务解决方案。 + + - -强一致性分布式事务解决方案。 - -

-

- -可靠消息分布式事务解决方案。 - - -一站式问题定位平台,以agent的方式无侵入接入应用,完整集成arthas功能模块,致力于应用级监控,帮助开发人员快速定位问题 - - -业界领先的身份管理和认证产品 - - -Forest能够帮助您使用更简单的方式编写Java的HTTP客户端 - - -一款简而轻的低侵入式在线构建、自动部署、日常运维、项目监控软件 - - -面向 REST API 的高性能认证鉴权框架 - -

-

- -傻瓜级ElasticSearch搜索引擎ORM框架 - - -Northstar盈富量化交易平台 - - -易用友好的云监控系统 - - -Idea 版 Postman,为简化调试API而生 - - -开源分布式云原生架构一站式解决方案 - - -企业生产级百亿日PV高可用可拓展的RPC框架。 - -

-

- -配置极简功能强大的异步任务动态编排框架 - - -基于配置中心的轻量级动态可监控线程池 - - -一个用搭积木的方式构建pdf的框架(基于pdfbox) - - -一个专门用于图片合成的工具,没有很复杂的功能,简单实用,却不失强大 - - -Dante-Cloud 是一款企业级微服务架构和服务能力开发平台。 - - -让每一位开源爱好者,体会到开源的快乐。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+