mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-14 13:05:09 +00:00
fix(proxy): keep service traffic on --proxy and warn about requests that bypass it
--proxy now overrides HTTP(S)_PROXY and the Windows system proxy while keeping the env CA bundle. Core fallback sessions use the run's proxy, and a warn-only audit hook names service code that sends a request or opens a raw socket outside the proxy; a session with proxy_exempt = True opts out.
This commit is contained in:
@@ -606,6 +606,7 @@ def test_the_client_session_downloads_through_the_proxy_it_sends(
|
||||
with pytest.raises(_SentCreate) as exc:
|
||||
svc.authenticate()
|
||||
assert dict(svc._session.proxies) == expected
|
||||
assert svc._session.trust_env is no_proxy # a proxied session ignores HTTP(S)_PROXY
|
||||
assert exc.value.args[0].get("proxy") == (None if no_proxy else "http://proxy.example:8080")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user