diff --git a/Example/Program.cs b/Example/Program.cs
index c81c3691..225ccac9 100644
--- a/Example/Program.cs
+++ b/Example/Program.cs
@@ -63,9 +63,6 @@ namespace Example
// For HTTP Authentication (Basic/Digest)
//ws.SetCredentials ("nobita", "password", false);
- // For HTTP Proxy
- //ws.SetHttpProxy ("http://localhost:3128", "nobita", "password");
-
// Setting Origin header
//ws.Origin = "http://echo.websocket.org";
//ws.Origin = "http://localhost:4649";
@@ -74,6 +71,9 @@ namespace Example
//ws.SetCookie (new Cookie ("name", "nobita"));
//ws.SetCookie (new Cookie ("roles", "\"idiot, gunfighter\""));
+ // Setting Proxy
+ //ws.SetProxy ("http://localhost:3128", "nobita", "password");
+
// Connecting to the server
ws.Connect ();
//ws.ConnectAsync ();
diff --git a/README.md b/README.md
index 2a7559a3..7a5da376 100644
--- a/README.md
+++ b/README.md
@@ -548,11 +548,11 @@ Also, if you would like to get each value of the Origin header and cookies, you
websocket-sharp supports to connect through the **HTTP Proxy** server.
-If you would like to connect to a WebSocket server through the HTTP Proxy server, you should set the proxy server URL, and if necessary, a pair of user name and password for the proxy server authentication (Basic/Digest), using the `WebSocket.SetHttpProxy (string, string, string)` method before connecting.
+If you would like to connect to a WebSocket server through the HTTP Proxy server, you should set the proxy server URL, and if necessary, a pair of user name and password for the proxy server authentication (Basic/Digest), using the `WebSocket.SetProxy (string, string, string)` method before connecting.
```cs
var ws = new WebSocket ("ws://example.com");
-ws.SetHttpProxy ("http://localhost:3128", "nobita", "password");
+ws.SetProxy ("http://localhost:3128", "nobita", "password");
```
I tested this with the [Squid]. And it's necessary to disable the following configuration option in **squid.conf** (e.g. `/etc/squid/squid.conf`).
diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs
index 9bbfb22f..ef52fe9f 100644
--- a/websocket-sharp/WebSocket.cs
+++ b/websocket-sharp/WebSocket.cs
@@ -2124,12 +2124,12 @@ namespace WebSocketSharp
}
///
- /// Sets the HTTP Proxy server URL to connect through, and if necessary, a pair of
+ /// Sets an HTTP Proxy server URL to connect through, and if necessary, a pair of
/// and for the proxy server
/// authentication (Basic/Digest).
///
///
- /// A that represents the HTTP Proxy server URL to connect through.
+ /// A that represents the proxy server URL to connect through.
///
///
/// A that represents the user name used to authenticate.
@@ -2138,10 +2138,10 @@ namespace WebSocketSharp
/// A that represents the password for
/// used to authenticate.
///
- public void SetHttpProxy (string url, string username, string password)
+ public void SetProxy (string url, string username, string password)
{
lock (_forConn) {
- var msg = checkIfAvailable ("SetHttpProxy", false, false);
+ var msg = checkIfAvailable ("SetProxy", false, false);
if (msg == null) {
if (url.IsNullOrEmpty ()) {
_proxyUri = null;