@@ -19,15 +19,15 @@ type localForwardChannelData struct {
1919OriginPort uint32
2020}
2121
22- //ChannelAcceptWatcher is used to trackjetbrains portforwarding (gateway )
23- //connections . If the port forward is something other thanjetbrains , this
24- //struct is a noop.
25- type ChannelAcceptWatcher struct {
22+ //JetbrainsChannelWatcher is used to trackJetBrains portforwarded (Gateway )
23+ //channels . If the port forward is something other thanJetBrains , this struct
24+ // is a noop.
25+ type JetbrainsChannelWatcher struct {
2626gossh.NewChannel
2727jetbrainsCounter * atomic.Int64
2828}
2929
30- func NewChannelAcceptWatcher (ctx ssh.Context ,logger slog.Logger ,newChannel gossh.NewChannel ,counter * atomic.Int64 ) gossh.NewChannel {
30+ func NewJetbrainsChannelWatcher (ctx ssh.Context ,logger slog.Logger ,newChannel gossh.NewChannel ,counter * atomic.Int64 ) gossh.NewChannel {
3131d := localForwardChannelData {}
3232if err := gossh .Unmarshal (newChannel .ExtraData (),& d );err != nil {
3333// If the data fails to unmarshal, do nothing.
@@ -58,13 +58,13 @@ func NewChannelAcceptWatcher(ctx ssh.Context, logger slog.Logger, newChannel gos
5858logger .Debug (ctx ,"discovered forwarded JetBrains process" ,
5959slog .F ("destination_port" ,d .DestPort ))
6060
61- return & ChannelAcceptWatcher {
61+ return & JetbrainsChannelWatcher {
6262NewChannel :newChannel ,
6363jetbrainsCounter :counter ,
6464}
6565}
6666
67- func (w * ChannelAcceptWatcher )Accept () (gossh.Channel ,<- chan * gossh.Request ,error ) {
67+ func (w * JetbrainsChannelWatcher )Accept () (gossh.Channel ,<- chan * gossh.Request ,error ) {
6868c ,r ,err := w .NewChannel .Accept ()
6969if err != nil {
7070return c ,r ,err