add a option to force 'localhost' as hostname instead of local ip