feat: add cli option to pass custom remote port

This commit is contained in:
tux
2026-01-27 17:31:19 +05:30
parent cb31ac762c
commit f586506180
4 changed files with 26 additions and 7 deletions

View File

@@ -79,9 +79,10 @@ func (t *Trok) handleCMDHELO(p *lib.ProtocolHandler, m *lib.Message) {
log.Info().Msgf("[CMD] %s [ARG] %s", m.CMD, m.ARG)
var s TCPServer
err := s.Init(":", "Handler")
err := s.Init(fmt.Sprintf(":%s", m.ARG), "Handler")
if err != nil {
log.Error().Msgf("error handling HELO cmd: %v", err)
p.WriteMessage(&lib.Message{CMD: "ERR", ARG: "ADDRESS_UNAVAILABLE"})
return
}