Kaynağa Gözat

Use the same protocol as client

tags/0.9
9seconds 8 yıl önce
ebeveyn
işleme
53ef81a4fc
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5
    0
      client/middle.go

+ 5
- 0
client/middle.go Dosyayı Görüntüle

@@ -21,5 +21,10 @@ func MiddleInit(conn net.Conn, conf *config.Config) (*mtproto.ConnectionOpts, wr
21 21
 		newConn = mtwrappers.NewIntermediateRWC(newConn, opts)
22 22
 	}
23 23
 
24
+	opts.ConnectionProto = mtproto.ConnectionProtocolIPv4
25
+	if conn.LocalAddr().(*net.TCPAddr).IP.To4() == nil {
26
+		opts.ConnectionProto = mtproto.ConnectionProtocolIPv6
27
+	}
28
+
24 29
 	return opts, newConn, nil
25 30
 }

Loading…
İptal
Kaydet