All Projects → tmoonlight → Nsmartproxy

tmoonlight / Nsmartproxy

Licence: mit
NSmartProxy是一款开源免费的内网穿透工具。采用.NET CORE的全异步模式打造。(NSmartProxy is an open source reverse proxy tool that creates a secure tunnel from a public endpoint to a locally service.)

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Nsmartproxy

Gsnova
Private proxy solution & network troubleshooting tool.
Stars: ✭ 509 (-6.95%)
Mutual labels:  proxy, p2p, tcp, nat
Gnb
GNB is open source de-centralized VPN to achieve layer3 network via p2p with the ultimate capability of NAT Traversal.GNB是一个开源的去中心化的具有极致内网穿透能力的通过P2P进行三层网络交换的VPN。
Stars: ✭ 225 (-58.87%)
Mutual labels:  p2p, tcp, nat
opengnb
GNB is open source de-centralized VPN to achieve layer3 network via p2p with the ultimate capability of NAT Traversal.GNB是一个开源的去中心化的具有极致内网穿透能力的通过P2P进行三层网络交换的VPN。
Stars: ✭ 440 (-19.56%)
Mutual labels:  tcp, nat, p2p
Mr2
Mr.2 can help you expose local server to external network. Support both TCP/UDP, of course support HTTP. Zero-Configuration.
Stars: ✭ 1,102 (+101.46%)
Mutual labels:  proxy, tcp, nat
Smargate
内网穿透,c++实现,无需公网IP,小巧,易用,快速,安全,最好的多链路聚合(p2p+proxy)模式,不做之一...这才是你真正想要的内网穿透工具!
Stars: ✭ 1,378 (+151.92%)
Mutual labels:  proxy, p2p, nat
Frpc Android
Android,安卓版frpc,一个快速反向代理,可帮助您将NAT或防火墙后面的本地服务器暴露给Internet。
Stars: ✭ 205 (-62.52%)
Mutual labels:  proxy, tcp, nat
Inlets Pro
Secure TCP and HTTP tunnels that work anywhere
Stars: ✭ 179 (-67.28%)
Mutual labels:  proxy, tcp, nat
Proxy admin free
Proxy是高性能全功能的http代理、https代理、socks5代理、内网穿透、内网穿透p2p、内网穿透代理、内网穿透反向代理、内网穿透服务器、Websocket代理、TCP代理、UDP代理、DNS代理、DNS加密代理,代理API认证,全能跨平台代理服务器。
Stars: ✭ 487 (-10.97%)
Mutual labels:  proxy, tcp, nat
ipvpn
[WIP] Easy-to-use decentralized secure overlay private network (for any device)
Stars: ✭ 24 (-95.61%)
Mutual labels:  nat, p2p
monte
The bare minimum for high performance, fully-encrypted bidirectional RPC over TCP in Go with zero memory allocations.
Stars: ✭ 103 (-81.17%)
Mutual labels:  tcp, p2p
Layr
A decentralized (p2p) file storage system built atop Kademlia DHT that enforces data integrity, privacy, and availability through sharding, proofs of retrievability, redundancy, and encryption, with smart-contract powered incentive scheme
Stars: ✭ 90 (-83.55%)
Mutual labels:  tcp, p2p
pheromones
实现长/短链接方式的p2p网络
Stars: ✭ 18 (-96.71%)
Mutual labels:  tcp, p2p
Ipcserviceframework
.NET Core Inter-process communication framework
Stars: ✭ 268 (-51.01%)
Mutual labels:  tcp, dotnetcore
XRPC
dotnet high performance remote interface and delegate invoke(RPC) communication components,support millions RPS remote interface method invokes
Stars: ✭ 77 (-85.92%)
Mutual labels:  tcp, dotnetcore
Fasttunnel
NAT 内网穿透 远程内网计算机 域名访问内网站点 反向代理内网服务 花生壳 端口转发 http代理 微信 小程序 expose a local server behind a NAT or firewall to the internet like ngrok and frp. NAT ssh proxy tunnel reverse-proxy
Stars: ✭ 248 (-54.66%)
Mutual labels:  proxy, nat
http-connection-lifecycle
Complete and detailed explanation of HTTP connection lifecycle
Stars: ✭ 43 (-92.14%)
Mutual labels:  tcp, nat
Leaf
A lightweight and fast proxy utility tries to include any useful features.
Stars: ✭ 530 (-3.11%)
Mutual labels:  proxy, tcp
anytunnel
内网穿透,内网穿透代理服务器,商用内网穿透代理系统,内网穿透平台,内网穿透多用户会员系统。
Stars: ✭ 115 (-78.98%)
Mutual labels:  tcp, nat
Decentralized Internet
A SDK/library for decentralized web and distributing computing projects
Stars: ✭ 406 (-25.78%)
Mutual labels:  p2p, protocols
P2p Over Middleboxes Demo
A simple demo of P2P communication over middle boxes such as NAT
Stars: ✭ 289 (-47.17%)
Mutual labels:  p2p, nat

GitHub release GitHub Build Status
Docker Pulls Docker Pulls
中文版 | English

NSmartProxy

什么是NSmartProxy?

NSmartProxy是一款免费的内网穿透工具。
使用中如果有任何问题和建议,可以点击这里加入Gitter群组或者点击这里加入QQ群 (群号:813170640)我们一起讨论。

目录

特点

  1. 跨平台,客户端和服务端均可运行在MacOS,Linux,Windows系统上;
  2. 使用方便,配置简单;
  3. 多端映射,只需安装一个NSmartProxy客户端可映射整个局域网内的多种服务;
  4. 支持TCP协议栈下的所有协议(已经经过测试的有FTP、Telnet、SMTP、HTTP/HTTPS、POP3、SMB、VNC、RDP。),以及相当一部分基于UDP的协议(已经经过测试的有DNS查询、mosh服务)。

运行原理

NSmartProxy包含两个服务程序:

  • 服务端(NSmartProxy.ServerHost):部署在外网,用来接收来自最终使用者和客户端的反向连接,并将它们进行相互转发。
  • 客户端(NSmartProxyClient):部署在内网,用来转发访问内网各种服务的请求以及响应。

客户端安装

NSmartProxy支持各种基于TCP和UDP服务的端口映射,下面以mstsc,iis,ftp以及mosh服务为例:

启动准备

NSmartProxy的客户端被打包成三种发布方式:第一种是跨平台包,需要预先安装.NET Core环境。 第二种是SCD包(包名带"scd"),无需安装.net环境,用户需要根据自己的平台和架构选择相应的压缩包。第三种是Windows窗体版本(包名带"winform"):

Windows

  1. 确保客户端的环境在.NET Framework 4.6.1 以上。
  2. 下载最新的窗体版本https://github.com/tmoonlight/NSmartProxy/releases/download/v1.2_final/nspclient_winform_v1.2.zip

Linux

  • 下载最新版本的NSmartProxyClient,以SCD发布下的linux x64系统为例:
wget https://github.com/tmoonlight/NSmartProxy/releases/download/v1.2_final/nspclient_scd_linux_v1.2.zip

MacOS

  • 下载最新版本的NSmartProxyClient:
wget https://github.com/tmoonlight/NSmartProxy/releases/download/v1.2_final/nspclient_scd_osx_v1.2.zip

Docker

  • 如果当前机器上已经有了docker运行环境,则无需安装运行时,直接拉取镜像即可运行,如下脚本在Docker CE 17.09下测试通过:
sudo docker pull tmoonlight/nspclient
sudo docker run --name mynspclient -dit tmoonlight/nspclient

使用方法

  1. 打开安装目录下的appsettings.json文件,配置服务地址,映射地址和端口(winform版本也兼容这种配置方式,也可直接进入界面配置):
{
  "ProviderWebPort": 12309,         //服务器端口
  "ProviderAddress": "2017studio.imwork.net",   //服务器地址

  //反向代理客户端列表
  "Clients": [
    {//mstsc远程控制服务
      "IP": "127.0.0.1",           //反向代理机器的ip
      "TargetServicePort": "3389"  //反向代理服务的端口
      "ConsumerPort":"3389"          //外网访问端口,如被占用,则会从20000开始按顺序分配端口
    },
    {//网站服务
      "IP": "127.0.0.1",
      "TargetServicePort": "80"
    },
    {//ftp服务
      "IP": "127.0.0.1",
      "TargetServicePort": "21",
      "IsCompress" : true,      //表示启动传输压缩
      "Description": "这是一个ftp协议。" //描述字段,方便用户在服务端界面识别
    },
    {//mosh服务 
      "IP": "192.168.0.168",    //安装mosh服务的受控端地址
      "TargetServicePort": "60002",
      "ConsumerPort": "30002",  
      "Protocol": "UDP"     //表示是一个UDP协议,如果不加以配置,则以TCP协议来转发
    }
  ]
}


2. 运行NSmartProxy客户端

  • Linux:
    sudo unzip nspclient_scd_linux_v1.2.zip
    cd nspclient_scd_linux_v1.2
    chmod +x ./NSmartProxyClient
    ./NSmartProxyClient
  • MacOS:
    sudo unzip nspclient_osx_linux_v1.2.zip
    cd nspclient_scd_osx_v1.2
    chmod +x ./NSmartProxyClient
    ./NSmartProxyClient
  • Windows: 解压后运行NSmartProxyWinform.exe即可:


  1. 后台运行:
    您还可以将NSmartProxy客户端注册为一个后台服务,方法如下:
  • Windows:
    • 方法一

    • 方法二

    rem 注册客户端windows服务
    .\NSmartProxyClient action:install
    rem 卸载客户端windows服务
    .\NSmartProxyClient action:uninstall
  • MacOS/Linux 暂略

  • P.S: 以上是客户端的配置方法,一般情况下,只要用我的免费服务(2017studio.imwork.net)即可进行内网映射了,如果你还想自己搭建服务端,请接着往下看。

服务端安装

这里介绍NSmartProxy服务端的安装方法(linux,windows,MacOS均适用)

启动准备

  • 首先你需要一台具备独立IP的服务器,以下安装过程均在此机器上执行:

Linux/Windows/MacOS

  1. NSmartProxy的服务端程序被打包成两种发布方式。第一种是跨平台包,需要预先安装.NET Core环境。 第二种是SCD包(包名带"scd"),无需安装.net环境,用户需要根据自己的平台和架构选择相应的压缩包。
  2. 下载最新版的NSmartProxy服务端:
  • Linux:
wget https://github.com/tmoonlight/NSmartProxy/releases/download/v1.2_final4/nspserver_scd_linux_v1.2_final4.zip
wget https://github.com/tmoonlight/NSmartProxy/releases/download/v1.2_final4/nspserver_scd_osx_v1.2_final4.zip

Docker

  • 无需安装运行时,直接拉取镜像即可运行,运行镜像时需要4组端口:配置端口,反向连接端口,API服务端口,以及使用端口,如下脚本在Docker CE 17.09下测试通过:
sudo docker pull tmoonlight/nspserver
sudo docker run --name mynspserver -dit -p 7842:7842 -p 7841:7841 -p 12309:12309 -p 20000-20050 tmoonlight/nspserver

使用方法

  1. 解压缩NSmartProxy服务端的压缩包,以下以SCD发布下的linux系统为例
unzip nspserver_scd_linux_v1.2_final4.zip
  1. 打开安装目录下的appsettings.json文件,设置反向连接端口和配置服务端口,如果没有特殊需求,默认就好:
{
  "ReversePort": 7842, //反向连接端口
  "ConfigPort": 7841, //配置服务端口
  "WebAPIPort": 12309         //API服务端口
}
  1. 运行NSmartProxy

第一步 cd到安装目录
第二步 执行以下命令

  • Linux/MacOS:

    chmod +x ./NSmartProxy.ServerHost ./NSmartProxy.ServerHost

  • Windows: 点击 Win+R 打开运行窗口. 输入 "cmd" 按下Ctrl+Shift+Enter打开管理员身份运行的命令行窗口。cd到安装目录,运行如下指令:

    NSmartProxy.ServerHost

第三步 登陆http://ip:12309 进入web端,出厂用户密码为admin/admin

第四步 进入服务端对用户进行各种管理操作

注册为后台服务

NSmartProxy客户端和服务端均可以注册为一个后台服务,方法如下:
  • Windows 以管理员身份打开命令行后,cd到程序运行目录,运行以下指令进行服务的注册和卸载:
rem 注册服务端windows服务
.\NSmartProxy.ServerHost action:install

rem 卸载服务端windows服务
.\NSmartProxy.ServerHost action:uninstall

使用案例

以上已经讲述了将内网的服务映射到外网的方法,还有更多有趣的用法等着你发掘:

  1. 远程开机
  2. 使用windows远程控制操作办公室电脑
  3. 告别昂贵的vps,以极低的成本制作一个更强大的服务集群
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].