Click the Safari, and select Preferences... menu.
Click at the Advance tab.
Click the Change Settings... button, which located beside the Proxies.
Under Proxies tab, select the Web Proxy (HTTP) check box, which located inside the Select a protocol to configure box.
In the Web Proxy Server section, type the IP address or Hostname of the proxy server in the first box. And, type the port number that is used by the proxy server for client connections in the second box.
Select Proxy server requires password option.
In the Username box, type the username to connect to the proxy server.
In the Password box, type the password to connect to the proxy server.
Click OK to close the Network dialog box.
Click Apply button to save the configuration.
Close all dialog boxes.