fix proxy generation.
add mock proxy support