-
-
Notifications
You must be signed in to change notification settings - Fork 357
How To: 使用树莓派作为客户端搭建内网穿透环境
TMOONLIGHT edited this page Jul 10, 2019
·
7 revisions
- 执行以下指令以安装.NET core 环境:
sudo wget https://download.visualstudio.microsoft.com/download/pr/87521bd8-1522-4141-9532-91d580292c42/59116d9f6ebced4fdc8b76b9e3bbabbf/dotnet-runtime-2.2.5-linux-arm.tar.gz
sudo mkdir -p /usr/share/dotnet && sudo tar zxf dotnet-runtime-2.2.5-linux-arm.tar.gz -C /usr/share/dotnet
sudo ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
- 安装过程无报错,运行以下指令查看dotnet版本号,大于2.2即可:
sudo dotnet -version
mkdir nspclient
cd nspclient
sudo wget https://github.com/tmoonlight/NSmartProxy/files/3342627/nspclient_v0.9.zip
sudo unzip nspclient_v0.9.zip
- 使用文本编辑器打开配置文件:
sudo nano appsettings.json
- 文件打开后按照如下示例来配置我们的nspclient:
{
"ProviderAddress": "2017studio.imwork.net", //配置服务的地址,可以是域名(eg.:domain.com)也可以是ip(eg.:211.5.5.4)
"ProviderWebPort": 12309,
//反向代理客户端,可以配置多个
"Clients": [
{
"IP": "127.0.0.1", //反向代理机器的ip
"TargetServicePort": "3389" //反向代理服务的端口
"ConsumerPort":"3389" //外网访问端口,如被占用,则会从20000开始按顺序分配端口
},
{
"IP": "127.0.0.1",
"TargetServicePort": "80"
},
{
"IP": "127.0.0.1",
"TargetServicePort": "21"
}
]
}
- 运行,看到映射信息即告成功:
sudo dotnet NSmartProxyClient.dll
- P.S:新的版本对配置文件进行了简化,已经去除反向连接端口和配置端口的配置,只需要配置web端口即可。