FastTunnel.Core
1.0.0
See the version list below for details.
dotnet add package FastTunnel.Core --version 1.0.0
NuGet\Install-Package FastTunnel.Core -Version 1.0.0
<PackageReference Include="FastTunnel.Core" Version="1.0.0" />
paket add FastTunnel.Core --version 1.0.0
#r "nuget: FastTunnel.Core, 1.0.0"
// Install FastTunnel.Core as a Cake Addin #addin nuget:?package=FastTunnel.Core&version=1.0.0 // Install FastTunnel.Core as a Cake Tool #tool nuget:?package=FastTunnel.Core&version=1.0.0
<p align="center"><img src="images/logo.png" width="150" align=center /></p>
FastTunnel -内网穿透利器
What is FastTunnel?
FastTunnel是一款高性能跨平台内网穿透工具,使用它可以实现在公网上访问您的内网服务。
演示地址 https://suidao.io
有帮助的朋友给个:star:支持一下,万分感谢:relaxed::relaxed::relaxed:
What can FastTunel do?
- 远程内网计算机 Windows/Linux/Mac
- 用自定义域名访问内网web服务(常用于微信开发)
- 端口转发/端口映射,访问内网任意端口提供的服务 mysql、redis、ftp等等
- Support any other domain names overlay current binding
- p2p穿透
Quickstart
- 在 releases 页面下载对应的程序
- 根据自己的需求修改配置文件
appsettings.json
- 服务端运行FastTunnel.Server
- 客户端运行FastTunnel.Cient
Run on Linux/Mac os?
Windows
直接双击 FastTunnel.Client.exe
Ready to run
Linux
chmod +x FastTunnel.Client
.\FastTunnel.Client
Mac
直接运行 FastTunnel.Client
配置示例
1. 用自定义域名访问内网web服务
- 例如你拥有一个服务器,公网ip地址为
110.110.110.110
,同时你有一个顶级域名为abc.com
的域名,你希望访问test.abc.com
可以访问内网的一个网站。 - 你需要新增一个域名地址的DNS解析,类型为
A
,名称为*
, ipv4地址为110.110.110.110
,这样*.abc.com
的域名均会指向110.110.110.110
的服务器,由于FastTunnel
默认监听的http端口为1270,所以要访问http://test.abc.com:1270
如果不希望每次访问都带上端口号,可以通过
nginx
转发实现。
http {
# 添加resolver
resolver 8.8.8.8;
# 设置 *.abc.com 转发至1270端口
server {
server_name *.abc.com;
location / {
proxy_pass http://$host:1270;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# 可选
error_log /var/log/nginx/error_ft.log error;
}
}
- 如果服务端配置的域名为
ft.suidao.io
, 则通过子域名test.ft.suidao.io:1270
访问在本地的站点,IIS配置如下:
2. 远程内网计算机 Windows/Linux/Mac
客户端配置如下,内网有两台主机,ip如下: appsettings.json
"ClientSettings": {
"Common": {
"ServerAddr": "xxx.xxx.xxx.xxx",
"ServerPort": 1271
},
"SSH": [
{
"LocalIp": "192.168.0.100", // linux主机
"LocalPort": 22, // ssh远程默认端口号
"RemotePort": 12701
},
{
"LocalIp": "192.168.0.101", // windows主机
"LocalPort": 3389, // windows远程桌面默认端口号
"RemotePort": 12702
}
]
}
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)
被控制端设置
- 打开cmd输入指令
sysdm.cpl
在弹出的对话框中选中允许远程连接此计算机
控制端设置
- 打开cmd输入指令
mstsc
,打开远程对话框,在对话框的计算机输入框,输入x.x.x.x:12701
然后指定用户名密码即可远程内网的windows主机
开发/PR
- 安装
vs2019
- 安装
dotnetcore runtime&sdk 3.1
或以上版本
License
Apache License 2.0
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Configuration (>= 3.1.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 3.1.0)
- Microsoft.Extensions.Configuration.Binder (>= 3.1.0)
- Microsoft.Extensions.Configuration.FileExtensions (>= 3.1.0)
- Microsoft.Extensions.Configuration.Json (>= 3.1.0)
- Microsoft.Extensions.DependencyInjection (>= 3.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.0)
- Newtonsoft.Json (>= 12.0.3)
- NLog (>= 4.6.8)
- NLog.Extensions.Logging (>= 1.6.1)
- System.Private.ServiceModel (>= 4.7.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on FastTunnel.Core:
Package | Downloads |
---|---|
FastTunnel.Api
expose a local server behind a NAT or firewall to the internet like ngrok and frp |
|
FastTunnel.Hosting
expose a local server behind a NAT or firewall to the internet like ngrok and frp |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
3.0.0-Beta.2.22705 | 356 | 7/5/2022 | |
3.0.0-Beta.1.22511 | 494 | 5/11/2022 | |
2.1.2 | 1,501 | 12/3/2022 | |
2.1.1 | 496 | 6/30/2022 | |
2.1.0 | 406 | 4/25/2022 | |
2.0.4 | 310 | 10/30/2021 | |
2.0.3 | 275 | 10/29/2021 | |
2.0.2 | 361 | 9/15/2021 | |
2.0.1 | 334 | 8/18/2021 | |
2.0.0 | 210 | 8/8/2021 | |
1.1.3 | 242 | 7/8/2021 | |
1.1.2 | 226 | 6/24/2021 | |
1.1.1 | 302 | 6/18/2021 | |
1.1.0 | 287 | 6/17/2021 | |
1.0.24 | 566 | 5/19/2021 | |
1.0.23 | 761 | 12/15/2020 | |
1.0.22 | 749 | 11/4/2020 | |
1.0.21 | 672 | 10/26/2020 | |
1.0.2 | 656 | 9/29/2020 | |
1.0.1 | 684 | 8/25/2020 | |
1.0.0 | 709 | 7/1/2020 |
FastTunnel.Core