Projects STRLCPY reverse_ssh Commits 89764939
🤬
  • Fix #93, remove error checking clause for no host

  • Loading...
  • NHAS committed 1 year ago
    89764939
    1 parent bcda20c7
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■
    internal/client/client.go
    skipped 144 lines
    145 145   conn, err := Connect(addr, proxyAddr, config.Timeout)
    146 146   if err != nil {
    147 147   
    148  - errMsg := err.Error()
    149  - switch {
    150  - case strings.Contains(errMsg, "no such host"), strings.Contains(errMsg, "missing port in address"):
     148 + if errMsg := err.Error(); strings.Contains(errMsg, "missing port in address") {
    151 149   log.Fatalf("Unable to connect to TCP invalid address: '%s', %s", addr, errMsg)
    152 150   }
    153 151   
    skipped 56 lines
  • ■ ■ ■ ■ ■ ■
    internal/client/handlers/jumphost.go
    skipped 87 lines
    88 88   }(reqs)
    89 89   
    90 90   err = internal.RegisterChannelCallbacks(user, chans, clientLog, map[string]internal.ChannelHandler{
    91  - "session": Session,
    92  - "direct-tcpip": LocalForward,
    93  - "[email protected]": Tun,
     91 + "session": Session,
     92 + "direct-tcpip": LocalForward,
    94 93   })
    95 94   
     95 + if err != nil {
     96 + log.Error("Channel call back error: %s", err)
     97 + }
     98 + 
    96 99   for rf := range user.SupportedRemoteForwards {
    97 100   go StopRemoteForward(rf)
    98 101   }
    99 102   
    100  - return
    101 103   }
    102 104  }
    103 105   
Please wait...
Page is in error, reload to recover