服务端部署
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
The new configuration file is located in /etc/nps you can edit them
2022/07/22 20:27:23 You can start with:
nps start|stop|restart|uninstall|update or nps-update update
修改配置 /etc/nps/conf/nps.conf
#p2p
p2p_ip=服务端ip
p2p_port=6000
客户端设置
mac 开机自启
创建文件 /Library/LaunchDaemons/com.funnyang.nps.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.funnyang.nps</string>
<key>ProgramArguments</key>
<array>
<string>/Users/funnyang/bin/nps/npc</string>
<string>-server=ip:port</string>
<string>-vkey=xxxx</string>
<string>-type=tcp</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
修改权限,启动
sudo chown root:wheel /Library/LaunchDaemons/com.funnyang.nps.plist
sudo launchctl load /Library/LaunchDaemons/com.funnyang.nps.plist
访问端设置
p2p 连接
访问端:
npc -server=ip:port -vkey=xxx -type=tcp -password=xxx -target=127.0.0.1:5900 --local_port=5900
本文链接:https://blog.xiaoyuyu.cn/post/nps-install.html,参与评论 »
--EOF--
发表于 2022-07-22 20:29:00。
本站使用「署名 4.0 国际」创作共享协议,转载请注明作者及原网址。更多说明 »
提醒:本文最后更新于 966 天前,文中所描述的信息可能已发生改变,请谨慎使用。
Comments