global-agent
global-agent copied to clipboard
fix: do not proxy traffic to sockets
This commit implements a proxy-exception for traffic targeting local sockets instead of a "host:port" combination. If such traffic would be forwarded through the proxy, the socket destination info would be lost, while a "localhost:80" destination would be added. This means that the proxy cannot handle such requests correctly either way, which makes sending traffic to the proxy pointless.
Because of that, if the agent receives traffic destined for a socket, it will simply use the fallback agent to handle that traffic.
Fixes #59.