Ver código fonte

Use the same protocol as client

tags/0.9
9seconds 8 anos atrás
pai
commit
53ef81a4fc
1 arquivos alterados com 5 adições e 0 exclusões
  1. 5
    0
      client/middle.go

+ 5
- 0
client/middle.go Ver arquivo

@@ -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
 }

Carregando…
Cancelar
Salvar