fixed server.py to handle proxy