Converted code to dynamically detect proxy always at run-time, instead of configuring any static defaults.