MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / _is_proxy_block

Function _is_proxy_block

examples/policy-advisor/ctf.py:173–179  ·  view source on GitHub ↗

Heuristic: did the sandbox proxy reject this connection?

(exc: Exception)

Source from the content-addressed store, hash-verified

171
172
173def _is_proxy_block(exc: Exception) -> bool:
174 """Heuristic: did the sandbox proxy reject this connection?"""
175 msg = str(exc).lower()
176 return any(
177 tok in msg
178 for tok in ("403", "forbidden", "connection refused", "connection reset")
179 )
180
181
182def attempt_gate_curl(gate: dict) -> tuple[str, str]:

Callers 1

attempt_gateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected