added SetXtermHtml and GetXtermHtml to enable the caller to customize the ssh page

This commit is contained in:
2024-12-28 18:48:29 +09:00
parent 4016793327
commit 65cec65597
2 changed files with 17 additions and 3 deletions

View File

@ -59,7 +59,6 @@ type Server struct {
wpx_addr []string
wpx_mux *http.ServeMux
wpx []*http.Server // proxy server than handles http/https only
wpx_resp_tf ServerWpxResponseTransformer
ctl_addr []string
ctl_prefix string
@ -90,6 +89,9 @@ type Server struct {
ssh_proxy_sessions atomic.Int64
}
wpx_resp_tf ServerWpxResponseTransformer
xterm_html string
UnimplementedHoduServer
}
@ -1123,6 +1125,14 @@ func (s *Server) GetWpxResponseTransformer() ServerWpxResponseTransformer {
return s.wpx_resp_tf
}
func (s *Server) SetXtermHtml(html string) {
s.xterm_html = html
}
func (s *Server) GetXtermHtml() string {
return s.xterm_html
}
func (s *Server) run_grpc_server(idx int, wg *sync.WaitGroup) error {
var l *net.TCPListener
var err error