I have at the rate in the password (@) that I use to authenticate and use internet in my college. But to set proxy settings from the terminal we have to separate password and proxy host with @. Ubuntu is mistaking my @ in the password to this @.
Unfortunately I cannot change the password as the site, through which I can change by password, is down. And to set the proxy I did this: sudo gedit /etc/bash.bashrc in terminal and in the end of this file added this line
export http_proxy=username:password@proxyhost:port/
with my details.