working on platforms with websockets disabled. gracefully switched between internal and ecternal server ip.