Explorar el Código

Use the same protocol as client

tags/0.9
9seconds hace 8 años
padre
commit
53ef81a4fc
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5
    0
      client/middle.go

+ 5
- 0
client/middle.go Ver fichero

@@ -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…
Cancelar
Guardar