MCPcopy
hub / github.com/mitmproxy/mitmproxy / https_alpn

Method https_alpn

mitmproxy/dns.py:110–122  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

108
109 @property
110 def https_alpn(self) -> tuple[bytes, ...] | None:
111 record = https_records.unpack(self.data)
112 alpn_bytes = record.params.get(SVCParamKeys.ALPN.value, None)
113 if alpn_bytes is not None:
114 i = 0
115 ret = []
116 while i < len(alpn_bytes):
117 token_len = alpn_bytes[i]
118 ret.append(alpn_bytes[i + 1 : i + 1 + token_len])
119 i += token_len + 1
120 return tuple(ret)
121 else:
122 return None
123
124 @https_alpn.setter
125 def https_alpn(self, alpn: Iterable[bytes] | None) -> None:

Callers

nothing calls this directly

Calls 6

unpackMethod · 0.80
packMethod · 0.80
getMethod · 0.45
appendMethod · 0.45
popMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected