Compare commits
2
Commits
v0.26.12
...
v0.26.12.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8be1e9f865 | ||
|
|
c0667e2dca |
@@ -12,8 +12,8 @@
|
||||
## 更新日志
|
||||
|
||||
- 2022-10-30
|
||||
***新增***:在管理面板中新增客户端时,可以多个配置黑名单IP,用于防止被肉鸡扫描端口。
|
||||
***优化***:无论是否注册系统服务,直接执行 nps 时只会读取当前目录下的配置文件。0.26.12 版本还原了注册系统功能,使用方式和以前一样。
|
||||
***新增***:在管理面板中新增客户端时,可以配置多个黑名单IP,用于防止被肉鸡扫描端口或被恶意攻击。
|
||||
***优化***:0.26.12 版本还原了注册系统功能,使用方式和以前一样。无论是否注册了系统服务,直接执行 nps 时只会读取当前目录下的配置文件。
|
||||
|
||||
|
||||
- 2022-10-27
|
||||
|
||||
+2
-9
@@ -40,15 +40,8 @@ func main() {
|
||||
common.PrintVersion()
|
||||
return
|
||||
}
|
||||
|
||||
if len(os.Args) <= 1 {
|
||||
if err := beego.LoadAppConfig("ini", filepath.Join("./", "conf", "nps.conf")); err != nil {
|
||||
log.Fatalln("load config file error", err.Error())
|
||||
}
|
||||
} else {
|
||||
if err := beego.LoadAppConfig("ini", filepath.Join(common.GetRunPath(), "conf", "nps.conf")); err != nil {
|
||||
log.Fatalln("load config file error", err.Error())
|
||||
}
|
||||
if err := beego.LoadAppConfig("ini", filepath.Join(common.GetRunPath(), "conf", "nps.conf")); err != nil {
|
||||
log.Fatalln("load config file error", err.Error())
|
||||
}
|
||||
|
||||
common.InitPProfFromFile()
|
||||
|
||||
+6
-2
@@ -11,8 +11,12 @@ import (
|
||||
//windows system, select the C:\Program Files\nps as config directory if exist, or select ./
|
||||
func GetRunPath() string {
|
||||
var path string
|
||||
if path = GetInstallPath(); !FileExists(path) {
|
||||
return GetAppPath()
|
||||
if len(os.Args) <= 1 {
|
||||
return "./"
|
||||
} else {
|
||||
if path = GetInstallPath(); !FileExists(path) {
|
||||
return GetAppPath()
|
||||
}
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user