Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlh committed Oct 7, 2021
2 parents f1793a7 + 92c06df commit 8257673
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/nps_extend.md
Original file line number Diff line number Diff line change
Expand Up @@ -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也将自动使用默认证书

Expand Down
2 changes: 2 additions & 0 deletions web/controllers/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8257673

Please sign in to comment.