At this point of time I can not think of any solution where you can setup proxy midway. Usually we setup proxy before we start the execution.
I came across such scenario once, but we resolved it by initiating new Firefox browser and working with it for that perticular test.
Hope that helpls! Let me know your scenario why you need to change proxy mid way. I can try giving workaround.