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

Function send_get_to_proxy

e2e/python/test_sandbox_policy.py:574–584  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

572 """L4-6: Non-CONNECT HTTP method -> rejected with 403."""
573
574 def send_get_to_proxy() -> str:
575 import socket
576
577 conn = socket.create_connection(("10.200.0.1", 3128), timeout=10)
578 try:
579 conn.sendall(
580 b"GET http://example.com/ HTTP/1.1\r\nHost: example.com\r\n\r\n"
581 )
582 return conn.recv(256).decode("latin1")
583 finally:
584 conn.close()
585
586 policy = _base_policy(
587 network_policies={

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected