Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdb24b115b | ||
|
|
1cd77f877d | ||
|
|
f3ad499273 | ||
|
|
8fca98bdf8 |
@@ -12,7 +12,7 @@
|
||||
***宝塔面板***:[宝塔面板 Docker](docs/bt.md)
|
||||
|
||||
# 交流群
|
||||
聊天灌水QQ群:770569342,619833483(已满)
|
||||
聊天灌水QQ群:619833483(2000人群),770569342
|
||||
|
||||
# 免费NPS节点
|
||||
https://natnps.com/
|
||||
@@ -27,9 +27,16 @@ https://natnps.com/
|
||||
|
||||
|
||||
# 更新日志
|
||||
- 2025-08-15 v0.26.26
|
||||
修复:
|
||||
- windows注册服务 使用tls无法连接 [269](https://github.com/yisier/nps/issues/269)
|
||||
- 域名解析自动HTTPS逻辑bug [273](https://github.com/yisier/nps/issues/273)
|
||||
|
||||
|
||||
- 2025-05-28 v0.26.25
|
||||
新增:
|
||||
- nps增加`nps(.exe) -server` 命令,用于管理NPS服务,安装和卸载服务在 Linux 下需要有 sudo 权限,Windows 下需要有管理员权限。
|
||||
- nps增加`nps(.exe) -server` 命令,用于管理NPS服务,安装和卸载服务在 Linux 下需要有 sudo 权限,Windows 下需要有管理员权限。
|
||||

|
||||
- 增加【TLS快捷启动命令】,可用于在tls模式下,快速启动客户端。 [257](https://github.com/yisier/nps/issues/257)
|
||||
|
||||
|
||||
|
||||
+12
-4
@@ -353,7 +353,7 @@ func startNpcServer(startCmd string) {
|
||||
}
|
||||
go func() {
|
||||
for {
|
||||
if tls == "-tls_enable=true" {
|
||||
if tls == "-tls_enable=true" || len(array) > 2 {
|
||||
client.SetTlsEnable(true)
|
||||
logs.Info("start cmd:-server=" + serAddr + " -vkey=" + vkey + " " + tls)
|
||||
logs.Info("the version of client is %s, the core version of client is %s,tls enable is %t", version.VERSION, version.GetVersion(), client.GetTlsEnable())
|
||||
@@ -410,11 +410,16 @@ func systemService(flag string) {
|
||||
|
||||
for _, item := range cmdArray {
|
||||
array := strings.Fields(item)
|
||||
systemPro(flag, array[0], array[1])
|
||||
// tls
|
||||
if len(array) > 2 {
|
||||
systemPro(flag, array[0], array[1], true)
|
||||
} else {
|
||||
systemPro(flag, array[0], array[1], false)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for _, key := range vkeys {
|
||||
systemPro(flag, "", key)
|
||||
systemPro(flag, "", key, false)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -423,7 +428,7 @@ func systemService(flag string) {
|
||||
return
|
||||
}
|
||||
|
||||
func systemPro(flag string, serAddr string, vkey string) {
|
||||
func systemPro(flag string, serAddr string, vkey string, tls bool) {
|
||||
// init service
|
||||
prg := &npc{
|
||||
exit: make(chan struct{}),
|
||||
@@ -441,6 +446,9 @@ func systemPro(flag string, serAddr string, vkey string) {
|
||||
case "1":
|
||||
svcConfig.Arguments = append(svcConfig.Arguments, "-server="+serAddr)
|
||||
svcConfig.Arguments = append(svcConfig.Arguments, "-vkey="+vkey)
|
||||
if tls {
|
||||
svcConfig.Arguments = append(svcConfig.Arguments, "-tls_enable=true")
|
||||
}
|
||||
svcConfig.Arguments = append(svcConfig.Arguments, "-debug=false")
|
||||
|
||||
*logPath = common.GetNpcLogPath()
|
||||
|
||||
@@ -323,6 +323,11 @@ func (s *IndexController) AddHost() {
|
||||
CertFilePath: s.getEscapeString("cert_file_path"),
|
||||
AutoHttps: s.GetBoolNoErr("AutoHttps"),
|
||||
}
|
||||
|
||||
if h.Scheme == "http" {
|
||||
h.AutoHttps = false
|
||||
}
|
||||
|
||||
var err error
|
||||
if h.Client, err = file.GetDb().GetClient(s.GetIntNoErr("client_id")); err != nil {
|
||||
s.AjaxErr("add error the client can not be found")
|
||||
@@ -379,6 +384,11 @@ func (s *IndexController) EditHost() {
|
||||
h.CertFilePath = s.getEscapeString("cert_file_path")
|
||||
h.Target.LocalProxy = s.GetBoolNoErr("local_proxy")
|
||||
h.AutoHttps = s.GetBoolNoErr("AutoHttps")
|
||||
|
||||
if h.Scheme == "http" {
|
||||
h.AutoHttps = false
|
||||
}
|
||||
|
||||
file.GetDb().JsonDb.StoreHostToJsonFile()
|
||||
}
|
||||
s.AjaxOk("modified success")
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
+ '<b langtag="word-createtime"></b>: ' + row.CreateTime + ' <br/><br/>'
|
||||
+ '<b langtag="word-lastonlinetime"></b>: ' + row.LastOnlineTime + ' <br/><br/>'
|
||||
+ '<b langtag="word-quicklycommand"></b>: <span>' + encodeToBase64('{{.ip}}:{{.p}} ' + row.VerifyKey) + '</span> <button class="copy btn btn-info btn-xs" onclick="copyCommand(this)" data-clipboard-text="">复制</button><br/>'
|
||||
+ '<b langtag="word-tlsquicklycommand"></b>: <span>' + encodeToBase64('{{.ip}}:{{.tls_p}} ' + row.VerifyKey + ' -tls_enable=true') + '</span> <button class="copy btn btn-info btn-xs" onclick="copyCommand(this)" data-clipboard-text="">复制</button><br/>'
|
||||
+ '<b langtag="word-tlsquicklycommand"></b>: <span>' + encodeToBase64('{{.ip}}:{{.tls_p}} ' + row.VerifyKey + ' true') + '</span> <button class="copy btn btn-info btn-xs" onclick="copyCommand(this)" data-clipboard-text="">复制</button><br/>'
|
||||
+ '<b langtag="word-commandclient"></b>: ' + "<code>./npc{{.win}} -server={{.ip}}:{{.p}} -vkey=" + row.VerifyKey + " -type=" +{{.bridgeType}} +"</code><button class=\"copy btn btn-info btn-xs\" onclick=\"copyCommand(this)\" data-clipboard-text=\"\">复制</button><br/>"
|
||||
+ '<b langtag="word-commandclient-tls"></b>: ' + "<code>./npc{{.win}} -server={{.ip}}:{{.tls_p}} -vkey=" + row.VerifyKey + " -tls_enable=true</code><button class=\"copy btn btn-info btn-xs\" onclick=\"copyCommand(this)\" data-clipboard-text=\"\">复制</button>"
|
||||
},
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
<li>
|
||||
<span class="m-r-sm text-muted welcome-message"><span langtag="word-welcome"></span>
|
||||
<a href="https://ehang.io/nps" langtag="application"></a></span>
|
||||
<a href="https://github.com/yisier/nps" langtag="application"></a></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="btn-group dropdown">
|
||||
|
||||
Reference in New Issue
Block a user