set proxy when proxy=true