diff --git a/pkg/config/client.go b/pkg/config/client.go index 61654cb4..2c5c51d8 100644 --- a/pkg/config/client.go +++ b/pkg/config/client.go @@ -164,6 +164,7 @@ type Proxy struct { HTTPPwd string `ini:"http_pwd,omitempty" http:"true"` HostHeaderRewrite string `ini:"host_header_rewrite,omitempty" http:"true"` Multiplexer string `ini:"multiplexer,omitempty" tcpmux:"true"` + RouteByHTTPUser string `ini:"route_by_http_user,omitempty" http:"true" tcpmux:"true"` } // GetAlias returns the alias of this proxy. diff --git a/pkg/consts/config.go b/pkg/consts/config.go index bc15e023..cd4825c2 100644 --- a/pkg/consts/config.go +++ b/pkg/consts/config.go @@ -41,3 +41,8 @@ const ( AuthToken = "token" AuthOIDC = "oidc" ) + +// TCP multiplexer +const ( + HTTPConnectTCPMultiplexer = "httpconnect" +) diff --git a/ui/editproxy.go b/ui/editproxy.go index ed2fe4f3..fa09f420 100644 --- a/ui/editproxy.go +++ b/ui/editproxy.go @@ -183,7 +183,13 @@ func (pd *EditProxyDialog) baseProxyPage() TabPage { Label{Visible: Bind("vm.HTTPVisible"), Text: "URL 路由:"}, LineEdit{Visible: Bind("vm.HTTPVisible"), Text: Bind("Locations")}, Label{Visible: Bind("vm.MuxVisible"), Text: "复用器:"}, - LineEdit{Visible: Bind("vm.MuxVisible"), Text: Bind("Multiplexer")}, + ComboBox{ + Visible: Bind("vm.MuxVisible"), + Model: []string{consts.HTTPConnectTCPMultiplexer}, + Value: Bind("Multiplexer"), + }, + Label{Visible: Bind("vm.MuxVisible || vm.HTTPVisible"), Text: "路由用户:"}, + LineEdit{Visible: Bind("vm.MuxVisible || vm.HTTPVisible"), Text: Bind("RouteByHTTPUser")}, }, } }