Find the Windows Process Connecting to a Proxy Port
Distinguish an outgoing connection to port 8080 from a local listener and associate the socket with its owning process.
When investigating an outgoing connection to a suspected proxy, filter the remote port rather than looking only for local listeners:
Get-NetTCPConnection -RemotePort 8080 |
Select-Object LocalAddress, LocalPort, RemoteAddress,
RemotePort, State, OwningProcess
OwningProcess is the process ID associated with the socket. Inspect that ID with Get-Process and correlate it with the executable’s normal role. Keep the remote address too: port 8080 can host an ordinary website or another service. Verify proxy support separately.
For a program accepting proxy connections locally, investigate LocalPort and the Listen state instead. A client normally uses an ephemeral local port while connecting to the proxy’s fixed remote port.
This is a point-in-time observation. A short failed attempt can disappear before the query, and a later process lookup can race with process exit. Absence from one snapshot does not prove that no attempt occurred.