diff --git a/docs/nps_extend.md b/docs/nps_extend.md index e49131e..cb613df 100644 --- a/docs/nps_extend.md +++ b/docs/nps_extend.md @@ -3,7 +3,7 @@ **方式一:** 类似于nginx实现https的处理 -在配置文件中将https_proxy_port设置为443或者其他你想配置的端口,和在web中对应域名编辑中设置对应的证书路径,将`https_just_proxy`设置为false,然后就和http代理一样了 +在配置文件中将https_proxy_port设置为443或者其他你想配置的端口,将`https_just_proxy`设置为false,nps 重启后,在web管理界面,域名新增或修改界面中修改域名证书和密钥。 **此外:** 可以在`nps.conf`中设置一个默认的https配置,当遇到未在web中设置https证书的域名解析时,将自动使用默认证书,另还有一种情况就是对于某些请求的clienthello不携带sni扩展信息,nps也将自动使用默认证书 diff --git a/web/controllers/client.go b/web/controllers/client.go index 2a1848a..97bc1ca 100644 --- a/web/controllers/client.go +++ b/web/controllers/client.go @@ -102,6 +102,8 @@ func (s *ClientController) Edit() { } else { if c, err := file.GetDb().GetClient(id); err != nil { s.error() + s.AjaxErr("client ID not found") + return } else { if s.getEscapeString("web_username") != "" { if s.getEscapeString("web_username") == beego.AppConfig.String("web_username") || !file.GetDb().VerifyUserName(s.getEscapeString("web_username"), c.Id) {