Skip to content

Commit

Permalink
客户端更新
Browse files Browse the repository at this point in the history
  • Loading branch information
yisier committed Jan 7, 2025
1 parent 65528fb commit 36182e4
Show file tree
Hide file tree
Showing 17 changed files with 379 additions and 17 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ https://natnps.com/


## 更新日志
- 2025-01-07 v0.26.21
新增:
- 客户端列表页面新增【快捷启动命令】,此命令为连接地址+链接秘钥的base64编码,方便一键启动、一键安装客户端。

优化:
- 修改vkey生成方式,由16位缩短至10位,截取uuid前10位,避免重复。
- 优化客户端启动方式,当npc文件目录下无配置文件时,可直接双击运行客户端,输入命令完成启动、安装、卸载客户端,直接启动和安装服务时需要输入【快捷启动命令】,卸载服务、启动服务、停止服务时,只需输入隧道秘钥【vkey】即可。
![image](image/new/cmd.png)


**注意**
强烈推荐使用无配置文件模式启动客户端,所有数据应该在服务端保存和配置,而客户端只做连接转发。客户端配置文件对小白极不友好,配置繁琐,容易出错。

- 2024-11-07 v0.26.20
新增:
- 客户端增加创建时间
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#/bash/sh
export VERSION=0.26.20
export VERSION=0.26.21
export GOPROXY=direct

sudo apt-get update
Expand Down
265 changes: 264 additions & 1 deletion cmd/npc/npc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package main

import (
"bufio"
"ehang.io/nps/lib/crypt"
"flag"
"fmt"
"os"
Expand All @@ -18,6 +20,7 @@ import (
"ehang.io/nps/lib/version"
"github.com/astaxie/beego/logs"
"github.com/ccding/go-stun/stun"
"github.com/fatih/color"
"github.com/kardianos/service"
)

Expand Down Expand Up @@ -252,6 +255,266 @@ func run() {
if *configPath == "" {
*configPath = common.GetConfigPath()
}
go client.StartFromFile(*configPath)

// 判断路径下是否有配置文件
if common.FileExists(*configPath) {
logs.Info("配置文件模式启动")
go client.StartFromFile(*configPath)
} else {
// 无配置文件模式双击运行
printSlogan()
inputCmd()
}
}
}

func printSlogan() {
green := color.New(color.FgGreen).SprintFunc()
// 第一次输入,如果输入 1,2,3,4 则需要输入秘钥,否则

fmt.Printf("%s", green(""))

fmt.Printf("\033[32;0m###########################################################\n")
fmt.Printf("\033[32;0m# \033[31mNPS内网穿透客户端\033[0m #\n")
fmt.Printf("\033[32;0m# #\n")
fmt.Printf("\033[32;0m#\033[32m 地址:\033[31;0mhttps://github.com/yisier/nps\033[0m #\n")
fmt.Printf("\033[32;0m#\033[32m 提示:\033[32;0m1、涉及到系统服务的需要以管理员身份运行\033[0m\033[32;0m #\n")
fmt.Printf("\033[32;0m#\033[32m \033[32;0m2、直接启动或[注册系统服务]需要使用[快捷启动命令]\033[0m\033[32;0m #\n")
fmt.Printf("\033[32;0m#\033[32m \033[32;0m3、其他命令如卸载/启动/停止只需要输入[vkey]\033[0m\033[32;0m #\n")
fmt.Printf("\033[32;0m###########################################################\n")
fmt.Printf("\033[0m") // 重置颜色

fmt.Printf("\n")

fmt.Printf("\u001B[32m输入[1]\u001B[0m - 注册系统服务\n")
fmt.Printf("\u001B[32m输入[2]\u001B[0m - 卸载系统服务\n")
fmt.Printf("---------------------\n")
fmt.Printf("\u001B[32m输入[3]\u001B[0m - 启动系统服务\n")
fmt.Printf("\u001B[32m输入[4]\u001B[0m - 停止系统服务\n")
fmt.Printf("---------------------\n")
fmt.Printf("\u001B[32m输入[0]\u001B[0m - 退出\n")
fmt.Printf("---------------------\n")
fmt.Printf("直接输入[快捷启动命令]则是启动隧道,多个[快捷启动命令]用英文逗号拼接\n")
fmt.Printf("\n")
}

func inputCmd() {

var flag string
fmt.Printf("请输入:")

stdin := bufio.NewReader(os.Stdin)
_, err := fmt.Fscanln(stdin, &flag)
if err != nil {
fmt.Println("输入有误")
} else {
if flag == "0" {
os.Exit(0)
}

flag := strings.Replace(flag, " ", "", -1)

// 如果输入不等于 1,2,3,4,则启动隧道
if flag != "1" && flag != "2" && flag != "3" && flag != "4" {

vkeys := strings.Split(flag, `,`)
var cmdArray []string

for _, key := range vkeys {
startCmd, err := crypt.Base64Decoding(key)
if err != nil {
fmt.Println("快捷启动命令解析失败")
inputCmd()
return
}

cmdArray = append(cmdArray, startCmd)
}

for _, item := range cmdArray {
startNpcServer(item)
}

} else {
systemService(flag)
}
}
}

func startNpcServer(startCmd string) {
var serAddr string
var vkey string
array := strings.Fields(startCmd)
serAddr = array[0]
vkey = array[1]

go func() {
for {
logs.Info("start cmd:-server=" + serAddr + " -vkey=" + vkey)
logs.Info("the version of client is %s, the core version of client is %s", version.VERSION, version.GetVersion())
client.NewRPClient(serAddr, vkey, *connType, *proxyUrl, nil, *disconnectTime).Start()
logs.Info("Client closed! It will be reconnected in five seconds")
time.Sleep(time.Second * 5)
}
}()
}

func systemService(flag string) {

if flag == "1" {
fmt.Printf("请输入[快捷启动命令],多个[快捷启动命令]用英文逗号拼接:")
} else {
fmt.Printf("请输入[VKEY],多个[VKEY]用英文逗号拼接:")
}

var vkey string
stdin := bufio.NewReader(os.Stdin)
_, err := fmt.Fscanln(stdin, &vkey)

if err != nil {
fmt.Println("输入错误,请重试")
systemService(flag)
return
} else {
if vkey == "0" {
os.Exit(0)
}
}

vkey = strings.Replace(vkey, " ", "", -1)

vkeys := strings.Split(vkey, `,`)

if flag == "1" {
var cmdArray []string
for _, key := range vkeys {
startCmd, err := crypt.Base64Decoding(key)
if err != nil {
fmt.Println("快捷启动命令解析失败")
systemService(flag)
return
}
cmdArray = append(cmdArray, startCmd)
}

for _, item := range cmdArray {
array := strings.Fields(item)
systemPro(flag, array[0], array[1])
}
} else {
for _, key := range vkeys {
systemPro(flag, "", key)
}

}

inputCmd()
return
}

func systemPro(flag string, serAddr string, vkey string) {
// init service
prg := &npc{
exit: make(chan struct{}),
}
options := make(service.KeyValue)
svcConfig := &service.Config{
Name: "nps-client-" + vkey,
DisplayName: "nps-client-" + vkey,
Description: "NPS内网穿透客户端,支持tcp、udp流量转发,支持内网http代理,地址:https://github.com/yisier/nps",
Option: options,
}
s, _ := service.New(prg, svcConfig)

switch flag {
case "1":
svcConfig.Arguments = append(svcConfig.Arguments, "-server="+serAddr)
svcConfig.Arguments = append(svcConfig.Arguments, "-vkey="+vkey)
svcConfig.Arguments = append(svcConfig.Arguments, "-debug=false")
install.InstallNpc()
err := service.Control(s, "install")
if err != nil {
fmt.Println("隧道["+vkey+"]安装到系统服务失败", err)
return
} else {
fmt.Println("隧道[" + vkey + "]已经安装到系统")
}
if service.Platform() == "unix-systemv" {
logs.Info("unix-systemv service")
confPath := "/etc/init.d/" + svcConfig.Name
os.Symlink(confPath, "/etc/rc.d/S90"+svcConfig.Name)
os.Symlink(confPath, "/etc/rc.d/K02"+svcConfig.Name)
}

err2 := service.Control(s, "start")
if err2 != nil {
fmt.Println("隧道["+vkey+"]启动服务失败", err2)
} else {
fmt.Println("隧道[" + vkey + "]服务已启动")
}

return
case "2":
// 卸载系统服务
err := service.Control(s, "stop")
if err != nil {
fmt.Println("隧道["+vkey+"]服务停止失败", err)
} else {
fmt.Println("隧道[" + vkey + "]服务已停止")
}

err = service.Control(s, "uninstall")
if err != nil {
fmt.Println("隧道["+vkey+"]服务卸载失败", err)
}
if service.Platform() == "unix-systemv" {
fmt.Println("unix-systemv service")
os.Remove("/etc/rc.d/S90" + svcConfig.Name)
os.Remove("/etc/rc.d/K02" + svcConfig.Name)
}

if err == nil {
fmt.Println("隧道[" + vkey + "]服务已卸载成功")
}

return

case "3":
//启动系统服务
if service.Platform() == "unix-systemv" {
logs.Info("unix-systemv service")
cmd := exec.Command("/etc/init.d/"+svcConfig.Name, "start")
err := cmd.Run()
if err != nil {
logs.Error(err)
}
return
}
err := service.Control(s, "start")
if err != nil {
fmt.Println("隧道["+vkey+"]服务启动失败", err)
} else {
fmt.Println("隧道[" + vkey + "]服务启动成功")
}

return
case "4":
if service.Platform() == "unix-systemv" {
logs.Info("unix-systemv service")
cmd := exec.Command("/etc/init.d/"+svcConfig.Name, "stop")
err := cmd.Run()
if err != nil {
logs.Error(err)
}
return
}
err := service.Control(s, "stop")
if err != nil {
fmt.Println("隧道["+vkey+"]服务停止失败", err)
} else {
fmt.Println("隧道[" + vkey + "]服务停止成功")
}

return
}
}
2 changes: 1 addition & 1 deletion conf/clients.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"Cnf":{"U":"","P":"","Compress":false,"Crypt":false},"Id":2,"VerifyKey":"a82kjhdyllqnlruk","Addr":"127.0.0.1","Remark":"","Status":true,"IsConnect":false,"RateLimit":0,"Flow":{"ExportFlow":551,"InletFlow":551,"FlowLimit":0},"Rate":{"NowRate":0},"NoStore":false,"NoDisplay":false,"MaxConn":0,"NowConn":0,"WebUserName":"","WebPassword":"","ConfigConnAllow":true,"MaxTunnelNum":0,"Version":"0.26.19","BlackIpList":[""],"LastOnlineTime":"2024-05-28 15:08:39"}
{"Cnf":{"U":"","P":"","Compress":false,"Crypt":false},"Id":34,"VerifyKey":"a1efa114df","Addr":"127.0.0.1","Remark":"","Status":true,"IsConnect":false,"RateLimit":0,"Flow":{"ExportFlow":0,"InletFlow":0,"FlowLimit":0},"Rate":{"NowRate":0},"NoStore":false,"NoDisplay":false,"MaxConn":0,"NowConn":0,"WebUserName":"","WebPassword":"","ConfigConnAllow":true,"MaxTunnelNum":0,"Version":"0.26.20","BlackIpList":[""],"CreateTime":"2025-01-03 17:07:37","LastOnlineTime":"2025-01-07 11:12:00"}
*#*
2 changes: 0 additions & 2 deletions conf/hosts.json
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
{"Id":1,"Host":"test.test.pp2pdf.com","HeaderChange":"","HostChange":"","Location":"/","Remark":"","Scheme":"all","CertFilePath":"-----BEGIN CERTIFICATE-----\r\nMIIGADCCBOigAwIBAgIQC0shW9rSx8iw/8ZZiE2w3TANBgkqhkiG9w0BAQsFADBu\r\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\r\nd3cuZGlnaWNlcnQ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xeDjHMDgNPy2TCfUMKmbFc4\r\njHgk+AfTVJ3GzMGdkB6BV63vDsRe7yFTdGSaHNJuxYP5TWkabj22Rsc6+/aW7dYA\r\nU0eL3+sTq2fgEzfNLIRqy4m93Tru9RLUOcrLp2+AlUXpQU6tqBdkOg==\r\n-----END RSA PRIVATE KEY-----\r\n","NoStore":false,"IsClose":false,"AutoHttps":false,"Flow":{"ExportFlow":0,"InletFlow":0,"FlowLimit":0},"Client":{"Cnf":{"U":"","P":"","Compress":false,"Crypt":false},"Id":2,"VerifyKey":"a82kjhdyllqnlruk","Addr":"127.0.0.1","Remark":"","Status":true,"IsConnect":false,"RateLimit":0,"Flow":{"ExportFlow":551,"InletFlow":551,"FlowLimit":0},"Rate":{"NowRate":0},"NoStore":false,"NoDisplay":false,"MaxConn":0,"NowConn":0,"WebUserName":"","WebPassword":"","ConfigConnAllow":true,"MaxTunnelNum":0,"Version":"0.26.19","BlackIpList":[""],"LastOnlineTime":"2024-05-28 15:08:39"},"Target":{"TargetStr":"127.0.0.1:9090","TargetArr":null,"LocalProxy":false}}
*#*
7 changes: 5 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ require (
github.com/astaxie/beego v1.12.0
github.com/c4milo/unpackit v0.0.0-20170704181138-4ed373e9ef1c
github.com/ccding/go-stun v0.0.0-20180726100737-be486d185f3d
github.com/fatih/color v1.18.0
github.com/golang/snappy v0.0.3
github.com/google/uuid v1.6.0
github.com/kardianos/service v1.2.0
github.com/panjf2000/ants/v2 v2.4.2
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -35,7 +37,8 @@ require (
github.com/klauspost/pgzip v1.2.1 // indirect
github.com/klauspost/reedsolomon v1.9.12 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/pires/go-proxyproto v0.7.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect
Expand All @@ -53,7 +56,7 @@ require (
github.com/yusufpapurcu/wmi v1.2.3 // indirect
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect
golang.org/x/image v0.0.0-20200430140353-33d19683fad8 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.3.3 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 36182e4

Please sign in to comment.