I am doing something wrong, I just don't know what. #932
|
It will start the |
Answered by
justcoding121
Aug 3, 2026
Replies: 1 comment
|
Looking at the snippet ? you start the proxy and then immediately unsubscribe + You need to keep the proxy alive, and point your client at it. Minimal idea: var proxyServer = new ProxyServer();
var explicitEndPoint = new ExplicitProxyEndPoint(IPAddress.Any, 8024, true);
proxyServer.BeforeRequest += OnRequest;
proxyServer.BeforeResponse += OnResponse;
explicitEndPoint.BeforeTunnelConnectRequest += OnBeforeTunnelConnectRequest;
proxyServer.AddEndPoint(explicitEndPoint);
proxyServer.Start();
// optional: set system proxy for this machine
proxyServer.SetAsSystemHttpProxy(explicitEndPoint);
proxyServer.SetAsSystemHttpsProxy(explicitEndPoint);
Console.WriteLine("Listening on 8024 ? press Enter to stop");
Console.ReadLine();
proxyServer.Stop();Also make sure the browser/app is actually using Closing ? reopen if it's still quiet after leaving it running. |
0 replies
Answer selected by
justcoding121
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looking at the snippet ? you start the proxy and then immediately unsubscribe +
Stop(). Nothing can happen in between because the process never stays running long enough to accept traffic.You need to keep the proxy alive, and point your client at it. Minimal idea: