Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e6cc0f40f |
@@ -26,6 +26,14 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
- 2026-03-12 v0.26.30
|
||||
修复:
|
||||
- http 协议 websocket 错误,感谢[xiaozonglong](https://github.com/xiaozonglong) 提供的 home assistant 环境 ,[#268](https://github.com/yisier/nps/issues/268),[#296](https://github.com/yisier/nps/issues/296)
|
||||
- 域名解析中,主机url点击无法跳转非80端口 [311](https://github.com/yisier/nps/issues/311)
|
||||
- 新增的主机配置页面,客户端ID异常 [#310](https://github.com/yisier/nps/issues/310)
|
||||
- 自动 HTTPS(301) 按照 `https_proxy_port` 配置的端口号跳转
|
||||
|
||||
|
||||
- 2026-01-24 v0.26.29
|
||||
新增:
|
||||
GUI 客户端,基于 Wails 开发,[点击查看了解更多](https://github.com/yisier/nps/blob/master/cmd/npc/npc-gui/README.md),需要 WebView2 运行时,可通过两种方式添加客户端。
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#/bash/sh
|
||||
export VERSION=0.26.29
|
||||
export VERSION=0.26.30
|
||||
export GOPROXY=direct
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
"info": {
|
||||
"productName": "NPS Client",
|
||||
"productVersion": "0.26.29",
|
||||
"productVersion": "0.26.30",
|
||||
"companyName": "NPS",
|
||||
"copyright": "Copyright © 2026 NPS"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package version
|
||||
|
||||
const VERSION = "0.26.29"
|
||||
const VERSION = "0.26.30"
|
||||
|
||||
// Compulsory minimum version, Minimum downward compatibility to this version
|
||||
func GetVersion() string {
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"ehang.io/nps/lib/goroutine"
|
||||
"ehang.io/nps/server/connection"
|
||||
"encoding/json"
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/astaxie/beego/logs"
|
||||
"io"
|
||||
"net"
|
||||
@@ -113,7 +114,7 @@ func (s *httpServer) handleTunneling(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// 自动 http 301 https
|
||||
if host.AutoHttps && r.TLS == nil {
|
||||
http.Redirect(w, r, "https://"+r.Host+r.RequestURI, http.StatusMovedPermanently)
|
||||
http.Redirect(w, r, "https://"+host.Host+":"+beego.AppConfig.String("https_proxy_port"), http.StatusMovedPermanently)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@ func NewHttpReverseProxy(s *httpServer) *HttpReverseProxy {
|
||||
local, _ := net.ResolveTCPAddr("tcp", "127.0.0.1")
|
||||
proxy := NewReverseProxy(&httputil.ReverseProxy{
|
||||
Director: func(r *http.Request) {
|
||||
host := r.Context().Value("host").(*file.Host)
|
||||
common.ChangeHostAndHeader(r, host.HostChange, host.HeaderChange, "")
|
||||
//host := r.Context().Value("host").(*file.Host)
|
||||
//common.ChangeHostAndHeader(r, host.HostChange, host.HeaderChange, "")
|
||||
},
|
||||
Transport: &http.Transport{
|
||||
ResponseHeaderTimeout: rp.responseHeaderTimeout,
|
||||
|
||||
@@ -65,6 +65,10 @@ func (s *BaseController) Prepare() {
|
||||
s.Data["allow_tunnel_num_limit"], _ = beego.AppConfig.Bool("allow_tunnel_num_limit")
|
||||
s.Data["allow_local_proxy"], _ = beego.AppConfig.Bool("allow_local_proxy")
|
||||
s.Data["allow_user_change_username"], _ = beego.AppConfig.Bool("allow_user_change_username")
|
||||
httpPort := beego.AppConfig.String("http_proxy_port")
|
||||
if httpPort != "80" {
|
||||
s.Data["http_proxy_port"] = ":" + beego.AppConfig.String("http_proxy_port")
|
||||
}
|
||||
}
|
||||
|
||||
// 加载模板
|
||||
|
||||
@@ -187,6 +187,7 @@
|
||||
var option = "<option value=\"" + data.rows[i].Id + "\"";
|
||||
option += ">" + data.rows[i].Id + '-' + data.rows[i].Remark + "</option>"; //动态添加数据
|
||||
$("select[name='client_id']").append(option);
|
||||
$("select[name='client_id']").find("option[value='{{.client_id}}']").attr("selected", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
halign: 'center',
|
||||
visible: true,//false表示不显示
|
||||
formatter: function (value, row, index) {
|
||||
return "<a href='http://" + row.Host + "' target='_blank'>" + row.Host + "</a>"
|
||||
return "<a href='http://" + row.Host + '{{.http_proxy_port}}' + "' target='_blank'>" + row.Host + '{{.http_proxy_port}}' + "</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user