From 58fceaf0ebe2762277d2aee2a4704b65ab7b55e0 Mon Sep 17 00:00:00 2001 From: "Gui.H" <740360381@qq.com> Date: Thu, 9 Apr 2020 14:10:34 +0800 Subject: [PATCH 1/2] Update README.md --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 357f26a..4f1b68c 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,18 @@ https://suidao.io ## 快速开始 1. 在 [releases](https://github.com/SpringHgui/FastTunnel/releases) 页面下载对应的程序 -2. 分别修改配置文件`appsettings.json` -3. 服务端运行FastTunnel.Server.exe(windows),其他平台安装dotnetcore运行时,执行 dotnet FastTunnel.Server.dll -4. 客户端运行FastTunnel.Cient.exe(windows),其他平台同安装dotnetcore运行时,执行 dotnet FastTunnel.Client.dll +2. 根据自己的需求修改配置文件`appsettings.json` +3. 服务端运行FastTunnel.Server +4. 客户端运行FastTunnel.Cient + +#### 各平台运行客户端的方式如下,以`FastTunnel.Client`为例 +#### Windows +直接双击 `FastTunnel.Client.exe` 即可运行 +#### Linux +`chmod +x FastTunnel.Client` 添加执行权限 +`.\FastTunnel.Client` 执行文件 +#### Mac +直接运行 `FastTunnel.Client` ## 1. 用自定义域名访问内网web服务 - 例如你拥有一个服务器,公网ip地址为 `110.110.110.110` ,同时你有一个顶级域名为 `test.cc` 的域名,你希望访问 `test.test.cc`可以访问内网的一个网站。 From 41ea1902eba62ea5aa2e2c9faa7c2a9829abe5be Mon Sep 17 00:00:00 2001 From: "Gui.H" <740360381@qq.com> Date: Thu, 9 Apr 2020 14:17:17 +0800 Subject: [PATCH 2/2] Update README.md --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4f1b68c..1e9baef 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ https://suidao.io 3. 服务端运行FastTunnel.Server 4. 客户端运行FastTunnel.Cient -#### 各平台运行客户端的方式如下,以`FastTunnel.Client`为例 +### 各种操作系统运行程序的方式,以`FastTunnel.Client`为例 #### Windows 直接双击 `FastTunnel.Client.exe` 即可运行 #### Linux @@ -33,14 +33,15 @@ https://suidao.io #### Mac 直接运行 `FastTunnel.Client` -## 1. 用自定义域名访问内网web服务 +## 配置示例 +### 1. 用自定义域名访问内网web服务 - 例如你拥有一个服务器,公网ip地址为 `110.110.110.110` ,同时你有一个顶级域名为 `test.cc` 的域名,你希望访问 `test.test.cc`可以访问内网的一个网站。 - 你需要新增一个域名地址的DNS解析,类型为`A`,名称为 `*` , ipv4地址为 `110.110.110.110` ,这样 `*.test.cc`的域名均会指向`110.110.110.110`的服务器,由于`FastTunnel`默认监听的http端口为1270,所以要访问`http://test.test.cc:1270` - 如果不希望每次访问都带上端口号,可以通过`nginx`转发实现。 - 如果服务端配置的域名为`ft.suidao.io`, 则通过子域名`test.ft.suidao.io`访问在本地的站点,IIS配置如下: ![img1](images/iis-web.png) -## 2. 远程内网计算机 Windows/Linux/Mac +### 2. 远程内网计算机 Windows/Linux/Mac 客户端配置如下,内网有两台主机,ip如下: appsettings.json @@ -64,20 +65,22 @@ appsettings.json ] } ``` -## ssh远程内网linux主机 (ip:192.168.0.100) +#### ssh远程内网linux主机 (ip:192.168.0.100) 假设内网主机的用户名为 root,服务器ip为x.x.x.x,访问内网的两个主机分别如下 ``` ssh -oPort=12701 root@x.x.x.x ``` -## mstsc远程桌面Windows主机(ip:192.168.0.101) -### 被控制端设置 +#### mstsc远程桌面Windows主机(ip:192.168.0.101) +#### 被控制端设置 - 打开cmd输入指令 `sysdm.cpl` 在弹出的对话框中选中允许远程连接此计算机 ![img1](images/setallow.png) -### 控制端设置 +#### 控制端设置 - 打开cmd输入指令 `mstsc`,打开远程对话框,在对话框的计算机输入框,输入 `x.x.x.x:12701` 然后指定用户名密码即可远程内网的windows主机 ![img1](images/remote.png) + + # 参与开发/PR - 安装 `vs2019` - 安装 `dotnetcore runtime&sdk 3.1` 或以上版本