|
|
@@ -259,9 +259,16 @@ func (p *Proxy) doTelegramCall(ctx *streamContext) error {
|
|
259
|
259
|
ctx: ctx,
|
|
260
|
260
|
}
|
|
261
|
261
|
|
|
|
262
|
+ telegramHost, _, err := net.SplitHostPort(foundAddr.Address)
|
|
|
263
|
+ if err != nil {
|
|
|
264
|
+ conn.Close() //nolint: errcheck
|
|
|
265
|
+
|
|
|
266
|
+ return fmt.Errorf("cannot parse telegram address %s: %w", foundAddr.Address, err)
|
|
|
267
|
+ }
|
|
|
268
|
+
|
|
262
|
269
|
p.eventStream.Send(ctx,
|
|
263
|
270
|
NewEventConnectedToDC(ctx.streamID,
|
|
264
|
|
- conn.RemoteAddr().(*net.TCPAddr).IP, //nolint: forcetypeassert
|
|
|
271
|
+ net.ParseIP(telegramHost),
|
|
265
|
272
|
ctx.dc),
|
|
266
|
273
|
)
|
|
267
|
274
|
|