MCPcopy Index your code
hub / github.com/sshuttle/sshuttle / _mock_getaddrinfo

Function _mock_getaddrinfo

tests/client/test_options.py:31–45  ·  view source on GitHub ↗
(host, *_)

Source from the content-addressed store, hash-verified

29
30
31def _mock_getaddrinfo(host, *_):
32 return {
33 "example.com": [
34 (socket.AF_INET6, socket.SOCK_STREAM, 0, '', ('2606:2800:220:1:248:1893:25c8:1946', 0, 0, 0)),
35 (socket.AF_INET, socket.SOCK_STREAM, 0, '', ('93.184.216.34', 0)),
36 ],
37 "my.local": [
38 (socket.AF_INET6, socket.SOCK_STREAM, 0, '', ('::1', 0, 0, 0)),
39 (socket.AF_INET, socket.SOCK_STREAM, 0, '', ('127.0.0.1', 0)),
40 ],
41 "*.blogspot.com": [
42 (socket.AF_INET6, socket.SOCK_STREAM, 0, '', ('2404:6800:4004:821::2001', 0, 0, 0)),
43 (socket.AF_INET, socket.SOCK_STREAM, 0, '', ('142.251.42.129', 0)),
44 ],
45 }.get(host, [])
46
47
48def test_parse_subnetport_ip4():

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected