内网穿透NPS及NPC搭建(使用docker实现)

客户端及服务端下载

NPS

1.启动NPS服务器容器(端口映射需要注意):
docker run -td --rm -p 10180:8080 -p 10124:8024 -p 10150-10179:10150-10179 --name nps q012315/nps_custom:1.1.2
2. 进入容器目录/home,修改配置文件中web登录的密码并且启动进程:
vim conf/nps.conf
./nps
3. 已启动:

2020/01/14 10:26:33.848 [I] [nps.go:151]  the version of server is 0.26.0 ,allow client core version to be 0.26.0
2020/01/14 10:26:33.849 [I] [connection.go:36]  server start, the bridge type is tcp, the bridge port is 8024
2020/01/14 10:26:33.850 [I] [server.go:193]  tunnel task  start mode:httpHostServer port 0
2020/01/14 10:26:33.851 [I] [connection.go:71]  web management start, access port is 8080
2020/01/14 10:26:33.851 [I] [connection.go:62]  start https listener, port is 443
2020/01/14 10:26:33.851 [I] [connection.go:53]  start http listener, port is 80

NPC

  1. 启动npc客户端容器,网卡设置为HOST
    docker run -td --restart always --name npc --network host q012315/npc_custom:1.1.2

  2. 进入容器目录/home,使用服务端界面的命令直接配置(需要将命令中的端口号替换为docker映射的端口号),Windows上需要在cmd中配置,将原命令略修改./npc 修改为 npc.exe

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-DqS0oIdq-1579056824376)(en-resource://database/3455:1)]

  • 2
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值