Yesterday I did a factory reset on my Nexus 4(4.4.2) and afterwards when I turned it on and went into the playstore it worked for a min or two and afterwards i couldnt connect to the internet at all. Playstore said no connection and chrome says cannot connect to proxy server. I tried resetting both the phone and my router, didnt help. Internet works through data though.

Please help.

TLDR: Factory reset. Wifi connects but doesnt work. Tried phone and router reset. Data works though.