mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-30 13:05:08 +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:
@@ -17,6 +17,7 @@ from unshackle.core import binaries
|
||||
from unshackle.core.config import config
|
||||
from unshackle.core.console import console
|
||||
from unshackle.core.utilities import log_event
|
||||
from unshackle.core.utils import run_proxy
|
||||
|
||||
|
||||
def b64url_encode_nopad(data: bytes) -> str:
|
||||
@@ -114,7 +115,7 @@ class ClearKeyCENC:
|
||||
|
||||
if response is None and self.laurl:
|
||||
if not session:
|
||||
session = Session()
|
||||
session = run_proxy.fallback_session()
|
||||
session.headers.update(config.headers)
|
||||
r = session.post(self.laurl, data=challenge, headers={"Content-Type": "application/json"})
|
||||
r.raise_for_status()
|
||||
|
||||
Reference in New Issue
Block a user