improve server IP/hostname handling
Merge branch '3.3'