11/28/2023 0 Comments Mitmproxy portwarn ( 244 "Client.clientcert is deprecated, use Client.certificate_list instead.", 245 DeprecationWarning, 246 stacklevel = 2, 247 ) 248 if val : 249 self. setter 242 def clientcert ( self, val ): # pragma: no cover 243 warnings. certificate_list 238 else : 239 return None 240 241. warn ( 232 "Client.clientcert is deprecated, use Client.certificate_list instead.", 233 DeprecationWarning, 234 stacklevel = 2, 235 ) 236 if self. Cert | None : # pragma: no cover 230 """*Deprecated:* An outdated alias for Connection.certificate_list.""" 231 warnings. cipher 227 228 229 def clientcert ( self ) -> certs. warn ( 222 "Client.cipher_name is deprecated, use Client.cipher instead.", 223 DeprecationWarning, 224 stacklevel = 2, 225 ) 226 return self. peername = x 217 218 219 def cipher_name ( self ) -> str | None : # pragma: no cover 220 """*Deprecated:* An outdated alias for Connection.cipher.""" 221 warnings. ![]() warn ( 212 "Client.address is deprecated, use Client.peername instead.", 213 DeprecationWarning, 214 stacklevel = 2, 215 ) 216 self. setter 210 def address ( self, x ): # pragma: no cover 211 warnings. warn ( 203 "Client.address is deprecated, use Client.peername instead.", 204 DeprecationWarning, 205 stacklevel = 2, 206 ) 207 return self. ![]() 34 Address = tuple 35 36 kw_only = )" 198 199 200 def address ( self ): # pragma: no cover 201 """*Deprecated:* An outdated alias for Client.peername.""" 202 warnings. ![]() 33 # this version at least provides useful type checking messages. 1 import dataclasses 2 import time 3 import uuid 4 import warnings 5 from abc import ABCMeta 6 from collections.abc import Sequence 7 from dataclasses import dataclass 8 from dataclasses import field 9 from enum import Flag 10 from typing import Literal 11 12 from mitmproxy import certs 13 from retypes import serializable 14 from import server_spec 15 from mitmproxy.proxy import mode_specs 16 from mitmproxy.utils import human 17 18 19 class ConnectionState ( Flag ): 20 """The current state of the underlying socket.""" 21 22 CLOSED = 0 23 CAN_READ = 1 24 CAN_WRITE = 2 25 OPEN = CAN_READ | CAN_WRITE 26 27 28 TransportProtocol = Literal 29 30 31 # practically speaking we may have IPv6 addresses with flowinfo and scope_id, 32 # but type checking isn't good enough to properly handle tuple unions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |