mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-02 02:37:15 +00:00
parent
ad7f1d11e4
commit
53ca9dda90
2 changed files with 3 additions and 7 deletions
|
|
@ -171,7 +171,7 @@ class TlsConfig:
|
|||
else:
|
||||
verify = net_tls.Verify.VERIFY_PEER
|
||||
|
||||
if server.sni is True:
|
||||
if server.sni is None:
|
||||
server.sni = client.sni or server.address[0]
|
||||
|
||||
if not server.alpn_offers:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import uuid
|
|||
import warnings
|
||||
from abc import ABCMeta
|
||||
from enum import Flag
|
||||
from typing import Literal, Optional, Sequence, Tuple, Union
|
||||
from typing import Optional, Sequence, Tuple
|
||||
|
||||
from mitmproxy import certs
|
||||
from mitmproxy.coretypes import serializable
|
||||
|
|
@ -85,10 +85,9 @@ class Connection(serializable.Serializable, metaclass=ABCMeta):
|
|||
"""Ciphers accepted by the proxy server on this connection."""
|
||||
tls_version: Optional[str] = None
|
||||
"""The active TLS version."""
|
||||
sni: Union[str, Literal[True], None]
|
||||
sni: Optional[str] = None
|
||||
"""
|
||||
The [Server Name Indication (SNI)](https://en.wikipedia.org/wiki/Server_Name_Indication) sent in the ClientHello.
|
||||
For server connections, this value may also be set to `True`, which means "use `Server.address`".
|
||||
"""
|
||||
|
||||
timestamp_start: Optional[float]
|
||||
|
|
@ -144,8 +143,6 @@ class Client(Connection):
|
|||
"""
|
||||
The certificate used by mitmproxy to establish TLS with the client.
|
||||
"""
|
||||
sni: Union[str, None] = None
|
||||
"""The Server Name Indication sent by the client."""
|
||||
|
||||
timestamp_start: float
|
||||
"""*Timestamp:* TCP SYN received"""
|
||||
|
|
@ -272,7 +269,6 @@ class Server(Connection):
|
|||
timestamp_tcp_setup: Optional[float] = None
|
||||
"""*Timestamp:* TCP ACK received."""
|
||||
|
||||
sni: Union[str, Literal[True], None] = True
|
||||
via: Optional[server_spec.ServerSpec] = None
|
||||
"""An optional proxy server specification via which the connection should be established."""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue