Skip to content
Discussion options

You must be logged in to vote

It's on the session, not the request:

proxyServer.BeforeRequest += async (sender, e) =>
{
    var clientIp = e.ClientRemoteEndPoint.Address;
    Console.WriteLine($"Client IP: {clientIp}");
};

e.ClientRemoteEndPoint is the TCP peer that connected to the proxy. (There's also e.ClientLocalEndPoint for the local side of that socket.)

Closing this one out.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by justcoding121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants