1、NPS服务端下载

wget https://github.com/ehang-io/nps/releases/download/v0.26.10/linux_amd64_server.tar.gz -P /usr/local/src

2、NPS服务端安装

# 解压
mkdir -p /data/nps
tar xf /usr/local/src/linux_amd64_server.tar.gz -C /data/nps/

# 安装并启动
cd /data/nps
./nps install
nps start

# 配置服务自启动
# vim /etc/rc.local 
...
nps start    #最后一行添加

# chmod +x /etc/rc.d/rc.local

3、NPS服务端访问

访问地址:http://部署主机IP:8080/
默认账号:admin
默认密码:123

4、新增客户端

5、客户端下载和安装

# 下载
wget https://github.com/ehang-io/nps/releases/download/v0.26.10/linux_amd64_client.tar.gz -P /usr/local/src

# 解压
mkdir /data/npc
tar xf /usr/local/src/linux_amd64_client.tar.gz -C /data/npc/

# 配置启动脚本
# vim /etc/systemd/system/nps_client.service
# nps client systemd service script
[Unit]
Description=nps client
After=network.target

[Service]
Type=simple
ExecStart=/data/npc/npc -server=10.10.10.129:8024 -vkey=07a32094oxrmun70 -type=tcp
Restart=always
RestartSec=5
PrivateTmp=true

[Install]
WantedBy=multi-user.target

# 启动服务
systemctl enable --now nps_client

6、配置端口隧道

7、通过NPS服务端IP+端口访问测试

测试地址:http://nps服务器IP地址:9900/

参考:

https://github.com/ehang-io/nps

  

posted on 2024-02-20 15:41  a120608yby  阅读(21)  评论(0编辑  收藏  举报