clowwindy/shadowsocks — pull request #205 by felixonmars (2014-11-01 16:29:40+00:00)
Title: tcprelay.py: decode remote_addr to fix extra b'' in logging on python 3

On Python 3, `"%s" % a_bytes_variable` will generate outputs like `"b'content'"` instead of just `"content"`. This PR fixes it by always calling `decode` for logging, so both Python 2.x and 3.x will get the same output style.

Before:
```
Nov 01 23:20:03 flygon.felixc.at sslocal[3860]: 2014-11-01 23:20:03 INFO connecting b'clients4.google.com':443
```

After:
```
Nov 02 00:21:07 flygon.felixc.at sslocal[12885]: 2014-11-02 00:21:07 INFO connecting clients4.google.com:443
```