1.准备
准备一台服务器,比如:阿里云,腾讯云等等
2.下载NPS
我的服务器是Linux系统,Windows需进入其官网下载
nps官网
wget https://github.com/ehang-io/nps/releases/download/v0.26.10/linux_amd64_server.tar.gz
解压
tar -zxf linux_amd64_server.tar.gz
安装
./nps install
[root@iZ2ze4kh3gm5ijfq7lpr8cZ mydata]# tar -zxf linux_amd64_server.tar.gz
[root@iZ2ze4kh3gm5ijfq7lpr8cZ mydata]# ./nps install
2023/11/30 10:30:40 copy file ::/mydata/conf/clients.json to /etc/nps/conf/clients.json
2023/11/30 10:30:40 copy file ::/mydata/conf/hosts.json to /etc/nps/conf/hosts.json
2023/11/30 10:30:40 copy file ::/mydata/conf/nps.conf to /etc/nps/conf/nps.conf
2023/11/30 10:30:40 copy file ::/mydata/conf/server.key to /etc/nps/conf/server.key
2023/11/30 10:30:40 copy file ::/mydata/conf/server.pem to /etc/nps/conf/server.pem
2023/11/30 10:30:40 copy file ::/mydata/conf/tasks.json to /etc/nps/conf/tasks.json
2023/11/30 10:30:40 copy file ::/mydata/web/views/client/add.html to /etc/nps/web/views/client/add.html
2023/11/30 10:30:40 mkdir:/etc/nps/web/views/client/
2023/11/30 10:30:40 copy file ::/mydata/web/views/client/edit.html to /etc/nps/web/views/client/edit.html
2023/11/30 10:30:40 copy file ::/mydata/web/views/client/list.html to /etc/nps/web/views/client/list.html
2023/11/30 10:30:40 copy file ::/mydata/web/views/index/add.html to /etc/nps/web/views/index/add.html
2023/11/30 10:30:40 mkdir:/etc/nps/web/views/index/
2023/11/30 10:30:40 copy file ::/mydata/web/views/index/edit.html to /etc/nps/web/views/index/edit.html
2023/11/30 10:30:40 copy file ::/mydata/web/views/index/hadd.html to /etc/nps/web/views/index/hadd.html
2023/11/30 10:30:40 copy file ::/mydata/web/views/index/hedit.html to /etc/nps/web/views/index/hedit.html
2023/11/30 10:30:40 copy file ::/mydata/web/views/index/help.html to /etc/nps/web/views/index/help.html
2023/11/30 10:30:40 copy file ::/mydata/web/views/index/hlist.html to /etc/nps/web/views/index/hlist.html
2023/11/30 10:30:40 copy file ::/mydata/web/views/index/index.html to /etc/nps/web/views/index/index.html
2023/11/30 10:30:40 copy file ::/mydata/web/views/index/list.html to /etc/nps/web/views/index/list.html
2023/11/30 10:30:40 copy file ::/mydata/web/views/login/index.html to /etc/nps/web/views/login/index.html
2023/11/30 10:30:40 mkdir:/etc/nps/web/views/login/
2023/11/30 10:30:40 copy file ::/mydata/web/views/login/register.html to /etc/nps/web/views/login/register.html
2023/11/30 10:30:40 copy file ::/mydata/web/views/public/error.html to /etc/nps/web/views/public/error.html
2023/11/30 10:30:40 mkdir:/etc/nps/web/views/public/
2023/11/30 10:30:40 copy file ::/mydata/web/views/public/layout.html to /etc/nps/web/views/public/layout.html
2023/11/30 10:30:40 copy file ::/mydata/web/static/css/bootstrap-table.min.css to /etc/nps/web/static/css/bootstrap-table.min.css
2023/11/30 10:30:40 mkdir:/etc/nps/web/static/css/
2023/11/30 10:30:40 copy file ::/mydata/web/static/css/bootstrap.min.css to /etc/nps/web/static/css/bootstrap.min.css
2023/11/30 10:30:40 copy file ::/mydata/web/static/css/datatables.css to /etc/nps/web/static/css/datatables.css
2023/11/30 10:30:40 copy file ::/mydata/web/static/css/fontawesome.min.css to /etc/nps/web/static/css/fontawesome.min.css
2023/11/30 10:30:40 copy file ::/mydata/web/static/css/regular.min.css to /etc/nps/web/static/css/regular.min.css
2023/11/30 10:30:40 copy file ::/mydata/web/static/css/solid.min.css to /etc/nps/web/static/css/solid.min.css
2023/11/30 10:30:40 copy file ::/mydata/web/static/css/style.css to /etc/nps/web/static/css/style.css
2023/11/30 10:30:40 copy file ::/mydata/web/static/img/flag/en-US.png to /etc/nps/web/static/img/flag/en-US.png
2023/11/30 10:30:40 mkdir:/etc/nps/web/static/img/
2023/11/30 10:30:40 mkdir:/etc/nps/web/static/img/flag/
2023/11/30 10:30:40 copy file ::/mydata/web/static/img/flag/zh-CN.png to /etc/nps/web/static/img/flag/zh-CN.png
2023/11/30 10:30:40 copy file ::/mydata/web/static/js/bootstrap-table-locale-all.min.js to /etc/nps/web/static/js/bootstrap-table-locale-all.min.js
2023/11/30 10:30:40 mkdir:/etc/nps/web/static/js/
2023/11/30 10:30:40 copy file ::/mydata/web/static/js/bootstrap-table.min.js to /etc/nps/web/static/js/bootstrap-table.min.js
2023/11/30 10:30:40 copy file ::/mydata/web/static/js/bootstrap.min.js to /etc/nps/web/static/js/bootstrap.min.js
2023/11/30 10:30:40 copy file ::/mydata/web/static/js/echarts.min.js to /etc/nps/web/static/js/echarts.min.js
2023/11/30 10:30:40 copy file ::/mydata/web/static/js/fontawesome.min.js to /etc/nps/web/static/js/fontawesome.min.js
2023/11/30 10:30:40 copy file ::/mydata/web/static/js/inspinia.js to /etc/nps/web/static/js/inspinia.js
2023/11/30 10:30:40 copy file ::/mydata/web/static/js/jquery-3.4.1.min.js to /etc/nps/web/static/js/jquery-3.4.1.min.js
2023/11/30 10:30:40 copy file ::/mydata/web/static/js/language.js to /etc/nps/web/static/js/language.js
2023/11/30 10:30:40 copy file ::/mydata/web/static/js/popper.min.js to /etc/nps/web/static/js/popper.min.js
2023/11/30 10:30:40 copy file ::/mydata/web/static/page/error.html to /etc/nps/web/static/page/error.html
2023/11/30 10:30:40 mkdir:/etc/nps/web/static/page/
2023/11/30 10:30:40 copy file ::/mydata/web/static/page/languages.xml to /etc/nps/web/static/page/languages.xml
2023/11/30 10:30:40 copy file ::/mydata/web/static/webfonts/fa-solid-900.eot to /etc/nps/web/static/webfonts/fa-solid-900.eot
2023/11/30 10:30:40 mkdir:/etc/nps/web/static/webfonts/
2023/11/30 10:30:40 copy file ::/mydata/web/static/webfonts/fa-solid-900.svg to /etc/nps/web/static/webfonts/fa-solid-900.svg
2023/11/30 10:30:40 copy file ::/mydata/web/static/webfonts/fa-solid-900.ttf to /etc/nps/web/static/webfonts/fa-solid-900.ttf
2023/11/30 10:30:40 copy file ::/mydata/web/static/webfonts/fa-solid-900.woff to /etc/nps/web/static/webfonts/fa-solid-900.woff
2023/11/30 10:30:40 copy file ::/mydata/web/static/webfonts/fa-solid-900.woff2 to /etc/nps/web/static/webfonts/fa-solid-900.woff2
2023/11/30 10:30:40 install ok!
2023/11/30 10:30:40 Static files and configuration files in the current directory will be useless
2023/11/30 10:30:40 The new configuration file is located in /etc/nps you can edit them
2023/11/30 10:30:40 You can start with:
nps start|stop|restart|uninstall|update or nps-update update
anywhere!
启动
nps start
3 访问
4 创建客户端
5 创建隧道
6 进行本地连接
继续下载windows 的windows_amd64_client.tar.gz,我的本地是Windows 的
之后就是访问你的服务器
这样一个内网穿透就配好了