|
|
@@ -112,7 +112,7 @@ func (s *Server) makeSocketID() string {
|
|
112
|
112
|
}
|
|
113
|
113
|
|
|
114
|
114
|
func (s *Server) getClientStream(ctx context.Context, cancel context.CancelFunc, conn net.Conn, socketID string) (io.ReadWriteCloser, int16, error) {
|
|
115
|
|
- wConn := newTimeoutReadWriteCloser(conn, s.readTimeout, s.writeTimeout)
|
|
|
115
|
+ wConn := wrappers.NewTimeoutRWC(conn, s.readTimeout, s.writeTimeout)
|
|
116
|
116
|
wConn = newTrafficReadWriteCloser(wConn, s.stats.addIncomingTraffic, s.stats.addOutgoingTraffic)
|
|
117
|
117
|
frame, err := obfuscated2.ExtractFrame(wConn)
|
|
118
|
118
|
if err != nil {
|
|
|
@@ -136,7 +136,7 @@ func (s *Server) getTelegramStream(ctx context.Context, cancel context.CancelFun
|
|
136
|
136
|
if err != nil {
|
|
137
|
137
|
return nil, errors.Annotate(err, "Cannot dial")
|
|
138
|
138
|
}
|
|
139
|
|
- wConn := newTimeoutReadWriteCloser(socket, s.readTimeout, s.writeTimeout)
|
|
|
139
|
+ wConn := wrappers.NewTimeoutRWC(socket, s.readTimeout, s.writeTimeout)
|
|
140
|
140
|
wConn = newTrafficReadWriteCloser(wConn, s.stats.addIncomingTraffic, s.stats.addOutgoingTraffic)
|
|
141
|
141
|
|
|
142
|
142
|
obfs2, frame := obfuscated2.MakeTelegramObfuscated2Frame()
|