安装
下载nps:
Mac系统:darwin_amd64_server.tar.gz
下载后解压,在解压文件夹,执行:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| chenyulong01deMacBook-Pro:Downloads chenyulong01$ cd darwin_amd64_server
chenyulong01deMacBook-Pro:darwin_amd64_server chenyulong01$ sudo ./nps install 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/conf/clients.json to /etc/nps/conf/clients.json 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/conf/hosts.json to /etc/nps/conf/hosts.json 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/conf/nps.conf to /etc/nps/conf/nps.conf 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/conf/server.key to /etc/nps/conf/server.key 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/conf/server.pem to /etc/nps/conf/server.pem 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/conf/tasks.json to /etc/nps/conf/tasks.json 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/client/add.html to /etc/nps/web/views/client/add.html 2021/01/06 14:21:18 mkdir:/etc/nps/web/views/client/ 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/client/edit.html to /etc/nps/web/views/client/edit.html 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/client/list.html to /etc/nps/web/views/client/list.html 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/index/add.html to /etc/nps/web/views/index/add.html 2021/01/06 14:21:18 mkdir:/etc/nps/web/views/index/ 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/index/edit.html to /etc/nps/web/views/index/edit.html 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/index/hadd.html to /etc/nps/web/views/index/hadd.html 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/index/hedit.html to /etc/nps/web/views/index/hedit.html 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/index/help.html to /etc/nps/web/views/index/help.html 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/index/hlist.html to /etc/nps/web/views/index/hlist.html 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/index/index.html to /etc/nps/web/views/index/index.html 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/index/list.html to /etc/nps/web/views/index/list.html 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/login/index.html to /etc/nps/web/views/login/index.html 2021/01/06 14:21:18 mkdir:/etc/nps/web/views/login/ 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/login/register.html to /etc/nps/web/views/login/register.html 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/public/error.html to /etc/nps/web/views/public/error.html 2021/01/06 14:21:18 mkdir:/etc/nps/web/views/public/ 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/views/public/layout.html to /etc/nps/web/views/public/layout.html 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/css/bootstrap-table.min.css to /etc/nps/web/static/css/bootstrap-table.min.css 2021/01/06 14:21:18 mkdir:/etc/nps/web/static/css/ 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/css/bootstrap.min.css to /etc/nps/web/static/css/bootstrap.min.css 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/css/datatables.css to /etc/nps/web/static/css/datatables.css 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/css/fontawesome.min.css to /etc/nps/web/static/css/fontawesome.min.css 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/css/regular.min.css to /etc/nps/web/static/css/regular.min.css 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/css/solid.min.css to /etc/nps/web/static/css/solid.min.css 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/css/style.css to /etc/nps/web/static/css/style.css 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/img/flag/en-US.png to /etc/nps/web/static/img/flag/en-US.png 2021/01/06 14:21:18 mkdir:/etc/nps/web/static/img/ 2021/01/06 14:21:18 mkdir:/etc/nps/web/static/img/flag/ 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/img/flag/zh-CN.png to /etc/nps/web/static/img/flag/zh-CN.png 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/js/bootstrap-table-locale-all.min.js to /etc/nps/web/static/js/bootstrap-table-locale-all.min.js 2021/01/06 14:21:18 mkdir:/etc/nps/web/static/js/ 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/js/bootstrap-table.min.js to /etc/nps/web/static/js/bootstrap-table.min.js 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/js/bootstrap.min.js to /etc/nps/web/static/js/bootstrap.min.js 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/js/echarts.min.js to /etc/nps/web/static/js/echarts.min.js 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/js/fontawesome.min.js to /etc/nps/web/static/js/fontawesome.min.js 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/js/inspinia.js to /etc/nps/web/static/js/inspinia.js 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/js/jquery-3.4.1.min.js to /etc/nps/web/static/js/jquery-3.4.1.min.js 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/js/language.js to /etc/nps/web/static/js/language.js 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/js/popper.min.js to /etc/nps/web/static/js/popper.min.js 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/page/error.html to /etc/nps/web/static/page/error.html 2021/01/06 14:21:18 mkdir:/etc/nps/web/static/page/ 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/page/languages.xml to /etc/nps/web/static/page/languages.xml 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/webfonts/fa-solid-900.eot to /etc/nps/web/static/webfonts/fa-solid-900.eot 2021/01/06 14:21:18 mkdir:/etc/nps/web/static/webfonts/ 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/webfonts/fa-solid-900.svg to /etc/nps/web/static/webfonts/fa-solid-900.svg 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/webfonts/fa-solid-900.ttf to /etc/nps/web/static/webfonts/fa-solid-900.ttf 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/webfonts/fa-solid-900.woff to /etc/nps/web/static/webfonts/fa-solid-900.woff 2021/01/06 14:21:18 copy file ::/Users/chenyulong01/Downloads/darwin_amd64_server/web/static/webfonts/fa-solid-900.woff2 to /etc/nps/web/static/webfonts/fa-solid-900.woff2 2021/01/06 14:21:18 install ok! 2021/01/06 14:21:18 Static files and configuration files in the current directory will be useless 2021/01/06 14:21:18 The new configuration file is located in /etc/nps you can edit them 2021/01/06 14:21:18 You can start with: nps start|stop|restart|uninstall|update or nps-update update anywhere!
|
启动:
1 2 3 4 5 6 7 8 9
| chenyulong01deMacBook-Pro:~ chenyulong01$ cd /etc/nps/ chenyulong01deMacBook-Pro:nps chenyulong01$ ls conf web chenyulong01deMacBook-Pro:nps chenyulong01$ sudo nps start 2021/01/06 14:27:47.789 [E] [nps.go:132] Valid actions: ["start" "stop" "restart" "install" "uninstall"] Failed to start nps内网穿透代理服务器: "launchctl" failed with stderr: /Library/LaunchDaemons/Nps.plist: service already loaded
chenyulong01deMacBook-Pro:nps chenyulong01$ sudo nps stop chenyulong01deMacBook-Pro:nps chenyulong01$ sudo nps start
|
web管理
网址:http://localhost:8080/login/index
账号:admin
密码:123
参考资料
内网穿透工具比较(ngrok,frp,lanproxy,goproxy,nps)
ehang-io-nps
Api
NPS内网穿透工具
Ursprünglicher Link: http://nunu03.github.io/2021/01/06/nps-内网穿透/
Copyright-Erklärung: 转载请注明出处.