diff --git a/ClientPermeateClient.md b/ClientPermeateClient.md index aed6b58..b54f174 100644 --- a/ClientPermeateClient.md +++ b/ClientPermeateClient.md @@ -6,5 +6,20 @@ #### 实现原理:![NetworkPermeateClientPermeateClient.png](NetworkPermeateClientPermeateClient.png) #### 操作步骤:拥有公网ip的服务器开发6001(web)、7001端口(tcp),然后执行命令启动服务端 +```shell +docker run -d -it -p 6001:6001 -p 7001:7001 -e spring.profiles.active=prod -e MAIN_DB_HOST=localhost:3306 -e MAIN_DB_PASSWORD=root -e MAIN_DB_PASSWORD=root --name wu-lazy-cloud-heartbeat-server-start registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-server-start:1.2.9-JDK17-SNAPSHOT +``` -#### 操作步骤: \ No newline at end of file +#### 操作步骤:杭州本地机房所在网络服务器启动客户端、你老家所在网络中启动客户端,命令如下 +```shell +docker run -d -it --privileged --name hangzhou-client --restart=always -e spring.lazy.netty.client.inet-host=公网IP -e spring.lazy.netty.client.inet-port=7001 -e spring.lazy.netty.client.client-id="hangzhou-jifang" registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-client-start:1.2.9-JDK17-SNAPSHOT +``` +```shell +docker run -d -it --privileged --name my-home-client --restart=always -e spring.lazy.netty.client.inet-host=公网IP -e spring.lazy.netty.client.inet-port=7001 -e spring.lazy.netty.client.client-id="my-home" registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-lazy-cloud-heartbeat-client-start:1.2.9-JDK17-SNAPSHOT +``` +#### 操作步骤:配置端口 +![client_permeate_port_pool.png](client_permeate_port_pool.png) +#### 操作步骤:打开页面配置菜单看到如下界面(from客户端ID:你老家网络中的电脑,to客户端ID) +![client_permeate_client_mapping.png](client_permeate_client_mapping.png) + +#### 连接使用:在你老家使用my-home这个客户端所在机器上的ip+13306 即可访问杭州机房内的数据库的服务3306 \ No newline at end of file diff --git a/client_permeate_client_mapping.png b/client_permeate_client_mapping.png index 663f221..075fb62 100644 Binary files a/client_permeate_client_mapping.png and b/client_permeate_client_mapping.png differ diff --git a/client_permeate_port_pool.png b/client_permeate_port_pool.png index 5b9f675..df728bd 100644 Binary files a/client_permeate_port_pool.png and b/client_permeate_port_pool.png differ diff --git a/wu-lazy-cloud-heartbeat-start/wu-lazy-cloud-heartbeat-client-start/src/main/resources/application-dev.yml b/wu-lazy-cloud-heartbeat-start/wu-lazy-cloud-heartbeat-client-start/src/main/resources/application-dev.yml index 55c0d39..a948f64 100644 --- a/wu-lazy-cloud-heartbeat-start/wu-lazy-cloud-heartbeat-client-start/src/main/resources/application-dev.yml +++ b/wu-lazy-cloud-heartbeat-start/wu-lazy-cloud-heartbeat-client-start/src/main/resources/application-dev.yml @@ -7,7 +7,7 @@ spring: inet-host: 127.0.0.1 inet-port: 7001 inet-path: wu-lazy-cloud-heartbeat-server - client-id: wujiawei # 客户端ID + client-id: my-home # 客户端ID # inet-host: 124.222.48.62 # 服务端地址 # inet-port: 30676 #服务端端口 # # inet-path: wu-lazy-cloud-heartbeat-server