瀏覽代碼

Use the same protocol as client

tags/0.9
9seconds 7 年之前
父節點
當前提交
53ef81a4fc
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      client/middle.go

+ 5
- 0
client/middle.go 查看文件

21
 		newConn = mtwrappers.NewIntermediateRWC(newConn, opts)
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
 	return opts, newConn, nil
29
 	return opts, newConn, nil
25
 }
30
 }

Loading…
取消
儲存