Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit b8cefa4

Browse files
committed
LocalEndPoint renamed, old names are obsolate
1 parent 4c6a8f5 commit b8cefa4

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private protected SessionEventArgsBase(ProxyServer server, ProxyEndPoint endPoin
5959

6060
ClientStream = clientStream;
6161
HttpClient = new HttpWebClient(connectRequest, request, new Lazy<int>(() => clientStream.Connection.GetProcessId(endPoint)));
62-
LocalEndPoint = endPoint;
62+
ProxyEndPoint = endPoint;
6363
EnableWinAuth = server.EnableWinAuth && isWindowsAuthenticationSupported;
6464
}
6565

@@ -103,6 +103,9 @@ public bool EnableWinAuth
103103
/// </summary>
104104
public IPEndPoint ClientRemoteEndPoint => (IPEndPoint)ClientConnection.RemoteEndPoint;
105105

106+
[Obsolete("Use ClientRemoteEndPoint instead.")]
107+
public IPEndPoint ClientEndPoint => ClientRemoteEndPoint;
108+
106109
/// <summary>
107110
/// The web client used to communicate with server for this session.
108111
/// </summary>
@@ -119,12 +122,15 @@ public bool EnableWinAuth
119122
/// <summary>
120123
/// Local endpoint via which we make the request.
121124
/// </summary>
122-
public ProxyEndPoint LocalEndPoint { get; }
125+
public ProxyEndPoint ProxyEndPoint { get; }
126+
127+
[Obsolete("Use ProxyEndPoint instead.")]
128+
public ProxyEndPoint LocalEndPoint => ProxyEndPoint;
123129

124130
/// <summary>
125131
/// Is this a transparent endpoint?
126132
/// </summary>
127-
public bool IsTransparent => LocalEndPoint is TransparentProxyEndPoint;
133+
public bool IsTransparent => ProxyEndPoint is TransparentProxyEndPoint;
128134

129135
/// <summary>
130136
/// The last exception that happened.

src/Titanium.Web.Proxy/WinAuthHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private async Task rewriteUnauthorizedResponse(SessionEventArgs args)
175175
// Add custom div to body to clarify that the proxy (not the client browser) failed authentication
176176
string authErrorMessage =
177177
"<div class=\"inserted-by-proxy\"><h2>NTLM authentication through Titanium.Web.Proxy (" +
178-
args.ClientConnection.LocalEndPoint +
178+
args.ClientLocalEndPoint +
179179
") failed. Please check credentials.</h2></div>";
180180
string originalErrorMessage =
181181
"<div class=\"inserted-by-proxy\"><h3>Response from remote web server below.</h3></div><br/>";

0 commit comments

Comments
 (0)