Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求助个事 假如有两台nps服务端 本地npc 客户端可以同时和 两个nps链接使用吗 #9

Closed
digua-cn opened this issue Nov 20, 2024 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@digua-cn
Copy link

如果可以 怎么实现呀

@goodfortuneqi
Copy link

我感觉可以,哈哈

@djylb
Copy link
Owner

djylb commented Nov 20, 2024

目前没这个功能,想要实现的话只能开多个进程。
Linux直接复制/etc/systemd/system/Npc.service文件修改启动信息之后使用systemctl来管理启动。
Windows需要手动使用sc命令安装服务,命令示例如下(看懂再用),之后只能手动管理开启关闭。

cmd /c "sc create Npc1 binPath= "D:\tools\npc.exe -server=xxx:123 -vkey=xxx -type=tcp -tls_enable=true -log=off -debug=false" DisplayName= "nps内网穿透客户端1" start= auto"

Docker最简单,开多个容器完事了。

如果用了上面操作npc的控制指令没法对手动安装的服务进行管理,更新前要手动停止服务才能正常更新。

@djylb djylb added the help wanted Extra attention is needed label Nov 20, 2024
@djylb
Copy link
Owner

djylb commented Nov 20, 2024

参考README多开教程 NPC

@djylb djylb closed this as completed Nov 20, 2024
@digua-cn
Copy link
Author

digua-cn commented Nov 20, 2024

目前没这个功能,想要实现的话只能开多个进程。Linux 直接复制/etc/systemd/system/Npc.service文件修改启动信息之后使用systemctl来管理启动。Windows 需要手动使用sc命令安装服务,命令示例如下(看懂再用),之后只能手动管理开关关闭。

cmd /c "sc create Npc1 binPath= "D:\tools\npc.exe -server=xxx:123 -vkey=xxx -type=tcp -tls_enable=true -log=off -debug=false" DisplayName= "nps内网穿透客户端1" start= auto"

Docker最简单,开多个容器就完成了。

如果用了上面操作npc的控制指令无法对手动安装的服务进行管理,更新前要手动停止服务才能正常更新。

感觉是不是 Npc.service 复制一份在同目录下 要修改一下名字和连接信息 假如修改成 npc1.service 启动就是sudo npc1 start 理解的对不对

@djylb
Copy link
Owner

djylb commented Nov 20, 2024

@digua-cn
Copy link
Author

不对,要用systemctl start npc1 先开启自启:systemctl enable npc1 再启动:systemctl start npc1 参考下面教程 https://docs.redhat.com/zh-cn/documentation/red_hat_enterprise_linux/9/html/configuring_basic_system_settings/managing-system-services-with-systemctl_managing-systemd#starting-a-system-service_managing-system-services-with-systemctl

Thanks 成功了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants