YvesChan/shadowsocks

send_all(sock, self.decrypt(data))???

Opened this issue · 0 comments

I had changed def handle_tcp:

            while True:

                r, w, e = select.select(fdset, [], [])      # use select I/O multiplexing model

                if sock in r:                               # if local socket is ready for reading
                    data = sock.recv(4096)
                    if len(data) <= 0:                      # received all data
                        break
                    sd = self.encrypt(data)
                    pprint.pprint(sd)
                    result = send_all(remote, sd)   # send data after encrypting
                    if result < len(data):
                        raise Exception('failed to send all data')

when I received data, I print the data.It shows:

qq 20160928134045

My problem is:
Is it received byte stream istead of string stream after I built socks5?

Thanks