mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
parent
ad7f1d11e4
commit
53ca9dda90
@ -171,7 +171,7 @@ class TlsConfig:
|
|||||||
else:
|
else:
|
||||||
verify = net_tls.Verify.VERIFY_PEER
|
verify = net_tls.Verify.VERIFY_PEER
|
||||||
|
|
||||||
if server.sni is True:
|
if server.sni is None:
|
||||||
server.sni = client.sni or server.address[0]
|
server.sni = client.sni or server.address[0]
|
||||||
|
|
||||||
if not server.alpn_offers:
|
if not server.alpn_offers:
|
||||||
|
@ -2,7 +2,7 @@ import uuid
|
|||||||
import warnings
|
import warnings
|
||||||
from abc import ABCMeta
|
from abc import ABCMeta
|
||||||
from enum import Flag
|
from enum import Flag
|
||||||
from typing import Literal, Optional, Sequence, Tuple, Union
|
from typing import Optional, Sequence, Tuple
|
||||||
|
|
||||||
from mitmproxy import certs
|
from mitmproxy import certs
|
||||||
from mitmproxy.coretypes import serializable
|
from mitmproxy.coretypes import serializable
|
||||||
@ -85,10 +85,9 @@ class Connection(serializable.Serializable, metaclass=ABCMeta):
|
|||||||
"""Ciphers accepted by the proxy server on this connection."""
|
"""Ciphers accepted by the proxy server on this connection."""
|
||||||
tls_version: Optional[str] = None
|
tls_version: Optional[str] = None
|
||||||
"""The active TLS version."""
|
"""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.
|
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]
|
timestamp_start: Optional[float]
|
||||||
@ -144,8 +143,6 @@ class Client(Connection):
|
|||||||
"""
|
"""
|
||||||
The certificate used by mitmproxy to establish TLS with the client.
|
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_start: float
|
||||||
"""*Timestamp:* TCP SYN received"""
|
"""*Timestamp:* TCP SYN received"""
|
||||||
@ -272,7 +269,6 @@ class Server(Connection):
|
|||||||
timestamp_tcp_setup: Optional[float] = None
|
timestamp_tcp_setup: Optional[float] = None
|
||||||
"""*Timestamp:* TCP ACK received."""
|
"""*Timestamp:* TCP ACK received."""
|
||||||
|
|
||||||
sni: Union[str, Literal[True], None] = True
|
|
||||||
via: Optional[server_spec.ServerSpec] = None
|
via: Optional[server_spec.ServerSpec] = None
|
||||||
"""An optional proxy server specification via which the connection should be established."""
|
"""An optional proxy server specification via which the connection should be established."""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user