support chained proxies

Add the ability to get real ip behind multiple reverse proxies.