diff --git a/neutrino-proxy-vuepress/docs/.vuepress/config.js b/neutrino-proxy-vuepress/docs/.vuepress/config.js index 1024fd30..975f9118 100644 --- a/neutrino-proxy-vuepress/docs/.vuepress/config.js +++ b/neutrino-proxy-vuepress/docs/.vuepress/config.js @@ -133,8 +133,8 @@ module.exports = { // archive: false, // 是否打开归档功能,默认true。 如打开,会做的事情有:1.自动生成归档页面(在@pages文件夹)。如关闭,则反之。 author: { // 文章默认的作者信息,可在md文件中单独配置此信息 String | {name: String, href: String} - name: 'Evan Xu', // 必需 - href: 'https://github.com/xugaoyi' // 可选的 + name: '傲世孤尘', // 必需 + href: 'https://gitee.com/dromara/neutrino-proxy' // 可选的 }, social: { // 社交图标,显示于博主信息栏和页脚栏 // iconfontCssFile: '//at.alicdn.com/t/font_1678482_u4nrnp8xp6g.css', // 可选,阿里图标库在线css文件地址,对于主题没有的图标可自由添加 diff --git a/neutrino-proxy-vuepress/docs/.vuepress/config/htmlModules.js b/neutrino-proxy-vuepress/docs/.vuepress/config/htmlModules.js index ae94d045..5fbff7f4 100644 --- a/neutrino-proxy-vuepress/docs/.vuepress/config/htmlModules.js +++ b/neutrino-proxy-vuepress/docs/.vuepress/config/htmlModules.js @@ -46,7 +46,7 @@ module.exports = { `, // 赞助商广告 - sidebarT: `npm`, + // sidebarT: `npm`, // windowRB: ` diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/client-run1.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/client-run1.png new file mode 100644 index 00000000..70617015 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/client-run1.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/license1.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/license1.png new file mode 100644 index 00000000..1ce7e56a Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/license1.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/neutrino-proxy-process.jpg b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/neutrino-proxy-process.jpg new file mode 100644 index 00000000..83550a6a Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/neutrino-proxy-process.jpg differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/port-mapping1.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/port-mapping1.png new file mode 100644 index 00000000..99a86b96 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/port-mapping1.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/port-pool1.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/port-pool1.png new file mode 100644 index 00000000..26a6322b Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/port-pool1.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/user-manager1.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/user-manager1.png new file mode 100644 index 00000000..92818d83 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/run-example/user-manager1.png differ diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/03.快速上手.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/03.快速上手.md index e624a223..2f4c2c12 100644 --- a/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/03.快速上手.md +++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.快速上手/03.快速上手.md @@ -7,7 +7,7 @@ article: false ## 1. 打包 可直接前往Gitee仓库发行版页面下载所需版本已打好的包。若需手动打包,则可参照下面的执行命令: -``` +```text # 服务端打包 mvn clean install -U -pl neutrino-proxy-server -am -Dmaven.test.skip=true @@ -23,7 +23,7 @@ npm run build:local - 使用常规的jar包部署方式即可,如:java -jar xxxx ### 2.4 管理后台部署 - Nginx方式部署(推荐): -```` +```conf server { listen 9527; server_name localhost; @@ -50,26 +50,77 @@ server { ```` - 无nginx时 在没有Nginx时,为了快速体验代理效果,可直接使用服务端项目提供的静态资源服务。直接将neutrino-proxy-admin打包后的文件解压放在neutrino-proxy-server.jar同级别目录下即可。例如:服务端配置的web端口为8080,则访问http://服务端IP:8080, 则会直接解析渲染neutrino-proxy-server.jar同级别目录下neutrino-proxy-admin/dist/index.html。 - - ::: warning 需要注意的是,使用服务端自带的静态资源服务时,由于框架目前未支持缓存、gzip压缩,所以访问速度没有使用nginx快,正式使用推荐用nginx。 ::: -## 使用Vdoing主题 +## 3.配置 -1. 安装最新的Vdoing主题包: -```sh -npm install vuepress-theme-vdoing -D -``` +### 3.1 配置端口池 +端口池的作用是将代理服务需要对外暴露的端口进行集中管理,方便安全组设置时统一操作。 -2. 在`.vuepress/config.js`中配置使用主题: -```js -// config.js -module.exports = { - theme: 'vdoing' +本项目为了简化首次配置,默认初始化数据会将9101~9120的所有端口加入端口池。可以在服务端项目sql配置(port_pool.data.sql文件)中自行修改初始化数据,也可以运行后在端口池管理页面手动维护。 + +首次使用如果为了快速体验,建议直接使用默认端口池,则无需任何配置。 + +### 3.2 配置License +License是客户端连接代理服务端时所需要的唯一合法凭证,一个License同时只能被一个客户端使用。 + +本项目为了简化首次配置,默认为每个用户初始化了一些license。可以在服务端项目sql配置(license.data.sql文件)中自行修改初始化数据,也可以运行后在License管理页面手动维护。 + +首次使用如果为了快速体验,建议直接使用默认License,则无需任何配置。 + +### 3.3 配置端口映射 +端口映射是代理的基本单元,一个外网端口在同一时刻被唯一的映射到一个内网IP+端口。所有流出该外网端口的流量都转发自对应的内网端口,同理所有流入该外网端口的流量都会转发到对应的内网端口。 + +本项目为了简化首次配置,默认为每个用户初始化了一些端口映射。可以在服务端项目sql配置(port_mapping.data.sql文件)中自行修改初始化数据,也可以运行后在端口映射管理页面手动维护。 + +首次使用如果为了快速体验,建议直接使用默认端口映射,则无需任何配置。 + +### 3.4 开启代理 +上述步骤完成后,就可以开始代理自己的局域网设备了。 + +比如现在有一个license:a123456,该license配置了一个或多个端口映射,其中包含9010到localhost:8080的映射(localhost表示代理客户端所在主机的端口,可以换成客户端所在局域网的任何IP)。此时修改客户端配置的服务端ip、license等启动客户端,就可以开启代理了,端口映射管理对应的记录在线状态为"在线"则证明代理成功建立。 + +该license配置也可以通过客户端启动参数、启动后引导式输入、外置配置提供,为了简化首次体验门槛,这里直接提供一个外置配置模版: +```json +{ + "jksPath":"classpath:/test.jks", + "licenseKey":"b0a907332b474b25897c4dcb31fc7eb6", + "serverIp":"localhost", + "serverPort":9002, + "sslEnable":true } ``` +修改上述json中的licenseKey,serverIp、serverPort、sslEnabled后,保存文件命名为.neutrino-proxy-client.json,放在客户端当前目录下(jar包启动时,放在jar包同级别目录下。idea启动时,放在项目根目录下),然后直接启动客户端。 + +此时通过访问外网ip+端口,可以成功访问内网服务。通过此方式,可以代理任何基于TCP之上的协议,如:socket、websocket、http、ftp、ssh等。 + +## 4.开发&调试 +篇幅所限,此处不便赘述管理后台相关的开发,有vue基础的童鞋基本都可以自行开发。服务端的初始化数据足够调试工作,开发过程无需单独在管理页面操作。 + +与SpringBoot项目类似,客户端、服务端项目均由一个入口类完成整个项目的启动,分别为ProxyClient、ProxyServer。 + +内置配置采用yml风格,主要涉及Http端口、静态资源路径、协议参数、代理服务端端口、jks证书、数据源、license等。整个项目基于neutrino-core,风格类似于SpringBoot。笔者不喜欢因过分炫技而引入过多花式操作,因为项目的定位是个人开发者,且满足使用的同时兼顾学习其原理的需求。基本使用方式与SpringBoot类似,尽可能降低首次学习成本。 + +neutrino-core项目test目录下包含众多核心封装的测试代码,通过调试这些代码,能尽可能减少大家学习的障碍。 + + +## 5.运行截图 +### 用户管理 + +### 端口池管理 + +### License管理 + +### 端口映射管理 + +### 客户端启动示例 + + + \ No newline at end of file diff --git a/neutrino-proxy-vuepress/docs/03.演示/01.演示环境 .md b/neutrino-proxy-vuepress/docs/03.演示/01.演示环境 .md new file mode 100644 index 00000000..4f1de6a3 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/03.演示/01.演示环境 .md @@ -0,0 +1,13 @@ +--- +title: 演示环境 +date: 2020-05-12 15:10:15 +permalink: /pages/db78e2 +article: false +--- + +### 演示环境 +可使用分配好的游客license试用。服务器带宽较低,仅供学习使用! + +管理后台地址:http://103.163.47.16:9527 + +游客账号:visitor/123456 \ No newline at end of file diff --git a/neutrino-proxy-vuepress/docs/03.演示/01.资源.md b/neutrino-proxy-vuepress/docs/03.演示/01.资源.md deleted file mode 100644 index 084a3215..00000000 --- a/neutrino-proxy-vuepress/docs/03.演示/01.资源.md +++ /dev/null @@ -1,208 +0,0 @@ ---- -title: 资源 -date: 2020-05-12 15:10:15 -permalink: /pages/db78e2 -article: false ---- - -## 插件推荐 - -* [vuepress-plugin-fulltext-search](https://github.com/leo-buneev/vuepress-plugin-fulltext-search) 全文搜索 - -* [vuepress-plugin-thirdparty-search](https://github.com/xugaoyi/vuepress-plugin-thirdparty-search) 可以添加第三方搜索链接的搜索框 - -* [vuepress-plugin-one-click-copy](https://www.npmjs.com/package/vuepress-plugin-one-click-copy) 代码块一键复制 - -* [vuepress-plugin-comment](https://github.com/dongyuanxin/vuepress-plugin-comment) 评论区 - -* [vuepress-plugin-vssue](https://vssue.js.org/) 评论区(单页) - -* [vuepress-plugin-vssue-global](https://github.com/u2sb/vuepress-plugin-vssue-global) 评论区(全局) - -* [vuepress-plugin-smplayer](https://github.com/u2sb/vuepress-plugin-smplayer) 播放器 - -* [vuepress-plugin-flowchart](https://www.npmjs.com/package/vuepress-plugin-flowchart) 流程图 - -* [vuepress-plugin-mathjax](https://www.npmjs.com/package/vuepress-plugin-mathjax) 数学公式 - -* [vuepress-plugin-tabs](https://www.npmjs.com/package/vuepress-plugin-tabs/) 选项卡 - -* [vuepress-plugin-element-ui](https://www.npmjs.com/package/vuepress-plugin-element-ui/) Element UI - -* [花里胡哨的插件](https://moefyit.github.io/moefy-vuepress/) 鼠标点击特效、背景彩带、音乐播放器等花里胡哨的插件 - -**更多插件...** - - - [Awesome VuePress](https://github.com/vuepressjs/awesome-vuepress) - - - [在npm中搜索"vuepress–plugin"](https://www.npmjs.com/search?q=vuepress%E2%80%93plugin) - - -## 社区优秀解决方案 - -### [1. 站点信息模块](https://notes.youngkbt.cn/about/website/info/) -在首页添加`站点信息模块`,效果: - -![](https://fastly.jsdelivr.net/gh/Kele-Bingtang/static/img/%E5%85%B3%E4%BA%8E/%E5%85%B3%E4%BA%8E%E6%9C%AC%E7%AB%99/20220102230720.png) - -在文章页添加`文章字数`、`阅读时间`、`浏览量`,效果: - -![](https://fastly.jsdelivr.net/gh/Kele-Bingtang/static/img/%E5%85%B3%E4%BA%8E/%E5%85%B3%E4%BA%8E%E6%9C%AC%E7%AB%99/20220103180059.png) - -### [2. 私密文章功能](https://notes.youngkbt.cn/about/website/private/) - -当大家想要「云端备份」文章到博客时,又不希望别人看到,该功能能满足你。 - -### [3. 首页大图模块](https://notes.youngkbt.cn/about/website/index-big-img/) - -喜欢首页大图模式的朋友可以参考此教程。 - -### [4. 优雅的全文搜索方案](https://wiki.eryajf.net/pages/dfc792/#%E5%89%8D%E8%A8%80) - - - -## 文章管理和发布 - -使用 [此插件 src-sy-post-publisher](https://github.com/terwer/src-sy-post-publisher) 发布[思源笔记](https://b3log.org/siyuan/)的文章到Vuepress等平台。 - -## 图标&配图 - -说明:以下图标**非主题内置**,你可以选择喜欢的图标右键保存或到图标库下载。更多图标:[阿里图标库](https://www.iconfont.cn/home/index) - -### 静态图标 - - - - - - - - - - - - - - - - - - - - - -
- -

编程

-
- -

服务器

-
- -

机器学习

-
- -

计算机网络

-
- -

面向对象

-
- -

软件开发

-
- -

数据结构

-
- -

数据库

-
- -

思维导图

-
- -

算法

-
- -

网络技术

-
- -

系统

-
- -

系统分析

-
- -

项目管理

-
- - -### 萌系图标 - -- [猫咪系列](https://www.iconfont.cn/collections/detail?spm=a313x.7781069.1998910419.dc64b3430&cid=37776) -![](https://fastly.jsdelivr.net/gh/xugaoyi/image_store@master/maomi.51n7h2qwlv00.webp)
-- [数码宝贝](https://www.iconfont.cn/collections/detail?spm=a313x.7781069.1998910419.dc64b3430&cid=38124) -![](https://fastly.jsdelivr.net/gh/xugaoyi/image_store@master/smbb.3h83bez4dka0.webp) -- [水果系列](https://www.iconfont.cn/collections/detail?spm=a313x.7781069.1998910419.dc64b3430&cid=38124) -![](https://fastly.jsdelivr.net/gh/xugaoyi/image_store@master/QQ20220122-122349@2x.4oqggy71iso0.webp) - - -### 动态图标 - - - - - - - - - -
- -

猫1

-
- -

猫2

-
- -

猫3

-
- -

猫4

-
- -### 插画 -[免费插画](https://undraw.co/illustrations)
-[2D/3D/手绘插画](https://storytale.io/)
-[阿里插画库](https://www.iconfont.cn/illustrations/index)
- -### 配图 -[可画-文章配图](https://www.canva.cn/) - -### Logo -[logo生成1](https://www.designevo.com/logo-maker/)
-[logo生成2](https://instantlogodesign.com/) - -### Emoji表情 -[Emoji百科](https://emojipedia.org/) - -::: tip 小技巧 -在任意输入框快速打开emoji表情方法:
-Windows系统下按Win + .
-Mac系统下按Control + Command + 空格 -::: - -## 共享资源 -如果您有不错的资源,欢迎在 [资源分享区](https://github.com/xugaoyi/vuepress-theme-vdoing/discussions/categories/%E8%B5%84%E6%BA%90%E5%88%86%E4%BA%AB) 留言。 - - -
-
-npm