服务端客户端 nps 操作备忘 搭配 nginx/ 附一键指南

技术文摘

Github地址:https://github.com/cnlh/nps

直接下载安装,装的新版是0.26.5,使用64 位系统 ,其他相应修改,如树莓派等,服务端找 server,客户端找 client。

查看 linux服务器系统相关信息uname -a, windows 右击计算机属性,到控制面板里找就行了

wget https://github.com/cnlh/nps/releases/download/v0.26.3/linux_amd64_server.tar.gz && tar zxvf linux_amd64_server.tar.gz

freebsd_386_client.tar.gz
freebsd_386_server.tar.gz
freebsd_amd64_client.tar.gz
freebsd_amd64_server.tar.gz
freebsd_arm_client.tar.gz
freebsd_arm_server.tar.gz
linux_386_client.tar.gz
linux_386_server.tar.gz
linux_amd64_client.tar.gz
linux_amd64_server.tar.gz
linux_arm64_client.tar.gz
linux_arm64_server.tar.gz
linux_arm_client.tar.gz
linux_arm_server.tar.gz
linux_mips64le_client.tar.gz
linux_mips64le_server.tar.gz
linux_mips64_client.tar.gz
linux_mips64_server.tar.gz
linux_mipsle_client.tar.gz
linux_mipsle_server.tar.gz
linux_mips_client.tar.gz
linux_mips_server.tar.gz
macos_client.tar.gz
macos_server.tar.gz
win_386_client.tar.gz
win_386_server.tar.gz
win_amd64_client.tar.gz
win_amd64_server.tar.gz

所有命令 0.26.5

wget https://github.com/cnlh/nps/releases/download/v0.26.5/freebsd_386_client.tar.gz && tar zxvf freebsd_386_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/freebsd_386_server.tar.gz && tar zxvf freebsd_386_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/freebsd_amd64_client.tar.gz && tar zxvf freebsd_amd64_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/freebsd_amd64_server.tar.gz && tar zxvf  freebsd_amd64_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/freebsd_arm_client.tar.gz && tar zxvf  freebsd_arm_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/freebsd_arm_server.tar.gz && tar zxvf freebsd_arm_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_386_client.tar.gz && tar zxvf linux_386_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_386_server.tar.gz && tar zxvf linux_386_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_amd64_client.tar.gz && tar zxvf linux_amd64_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_amd64_server.tar.gz && tar zxvf linux_amd64_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_arm64_client.tar.gz && tar zxvf linux_arm64_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_arm64_server.tar.gz && tar zxvf linux_arm64_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_arm_client.tar.gz && tar zxvf linux_arm_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_arm_server.tar.gz && tar zxvf linux_arm_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_mips64le_client.tar.gz && tar zxvf  linux_mips64le_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_mips64le_server.tar.gz && tar zxvf linux_mips64le_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_mips64_client.tar.gz && tar zxvf  linux_mips64_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_mips64_server.tar.gz && tar zxvf  linux_mips64_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_mipsle_client.tar.gz && tar zxvf linux_mipsle_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_mipsle_server.tar.gz   linux_mipsle_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_mips_client.tar.gz && tar zxvf linux_mips_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/linux_mips_server.tar.gz && tar zxvf  linux_mips_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/macos_client.tar.gz && tar zxvf macos_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/macos_server.tar.gz && tar zxvf macos_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/win_386_client.tar.gz && tar zxvf win_386_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/win_386_server.tar.gz && tar zxvf win_386_server.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/win_amd64_client.tar.gz && tar zxvf win_amd64_client.tar.gz
wget https://github.com/cnlh/nps/releases/download/v0.26.5/win_amd64_server.tar.gz && tar zxvf win_amd64_server.tar.gz

上面中间因为插件的文件显示为 amp,实际就两个&&符号。

cd nps 

./nps install 

直接安装到系统

会看到日志,复制的一些配置文件和可用的操作命令

copy file ::/root/nps/conf/app.conf to /etc/nps/conf/app.conf
copy file ::/root/nps/conf/clients.csv to /etc/nps/conf/clients.csv
copy file ::/root/nps/conf/hosts.csv to /etc/nps/conf/hosts.csv
copy file ::/root/nps/conf/tasks.csv to /etc/nps/conf/tasks.csv
Executable files have been copied to /usr/bin/nps
install ok!
Static files and configuration files in the current directory will be useless
安装以后的配置文件在 /etc/nps 

/etc/nps/conf 配置文件 /etc/nps/web网页界面

可用的命令 nps test|start|stop|restart|status  

其他使用按 readme帮助文档照着配置就可以了


与 nginx,tenginx,apache 搭配使用,需要配置不同端口


客户端启动

无配置文件

 ./npc -server=ip:port -vkey=web界面中显示的密钥

配置文件模式

此模式使用nps的公钥或者客户端私钥验证,各种配置在客户端完成,同时服务端web也可以进行管理

 ./npc -config=npc配置文件路径


以上是不是太麻烦了。。。

当然用一键配置命令啊

下载地址: https://github.com/cnlh/nps/releases
教程地址: https://github.com/cnlh/nps

nps 图文教程

服务端一键安装脚本:bash <(curl -L -s https://opt.cn2qq.com/opt-script/nps.sh)

nps 的客户端连接有两种,

一种直接./npc 加参数,这个可以直接从服务web 管理页面获取,

如./npc -server=域名:8024 -vkey=密钥 -type=tcp  还可以再加更多

一种./npc -config=配置文件。这里 vkey 用公钥。查看服务器 nps 的public_vkey

注意:这两种里 vkey 的区别。


 

发表评论