split to proxylib.py