HTTP代理端口显示逻辑 选择是否展示端口

This commit is contained in:
gift95
2026-04-02 15:38:39 +08:00
committed by 🐛野生Bug程序员
parent b39f0c30ef
commit e0c8c73b91
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -10,7 +10,8 @@ https_just_proxy=true
#default https certificate setting
https_default_cert_file=conf/server.pem
https_default_key_file=conf/server.key
# 是否展示非【80】端口
show_http_proxy_port=true
##bridge
bridge_type=tcp
bridge_port=8024
@@ -99,4 +100,4 @@ open_captcha=false
# 是否开启tls
tls_enable=true
tls_bridge_port=8025
tls_bridge_port=8025
+3 -2
View File
@@ -65,9 +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")
showHttpProxyPort, _ := beego.AppConfig.Bool("show_http_proxy_port")
httpPort := beego.AppConfig.String("http_proxy_port")
if httpPort != "80" {
s.Data["http_proxy_port"] = ":" + beego.AppConfig.String("http_proxy_port")
if httpPort != "80" && showHttpProxyPort {
s.Data["http_proxy_port"] = ":" + httpPort
}
}