mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
minor fixes
This commit is contained in:
parent
57f5d1af63
commit
de46db53e9
@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Optional, Tuple, TypedDict, Union, Any
|
from typing import List, Optional, Tuple, TypedDict, Any
|
||||||
|
|
||||||
from OpenSSL import SSL, crypto
|
from OpenSSL import SSL, crypto
|
||||||
from mitmproxy import certs, ctx, exceptions
|
from mitmproxy import certs, ctx, exceptions
|
||||||
|
@ -22,8 +22,8 @@ class Method(Enum):
|
|||||||
|
|
||||||
|
|
||||||
# TODO: remove once https://github.com/pyca/pyopenssl/pull/985 has landed.
|
# TODO: remove once https://github.com/pyca/pyopenssl/pull/985 has landed.
|
||||||
SSL.Context._methods.setdefault(Method.TLS_SERVER_METHOD.value, "TLS_server_method")
|
SSL.Context._methods.setdefault(Method.TLS_SERVER_METHOD.value, SSL._lib.TLS_server_method)
|
||||||
SSL.Context._methods.setdefault(Method.TLS_CLIENT_METHOD.value, "TLS_client_method")
|
SSL.Context._methods.setdefault(Method.TLS_CLIENT_METHOD.value, SSL._lib.TLS_client_method)
|
||||||
|
|
||||||
|
|
||||||
class Version(Enum):
|
class Version(Enum):
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
from typing import Optional, Sequence
|
from typing import Optional, Sequence
|
||||||
|
|
||||||
from mitmproxy import optmanager
|
from mitmproxy import optmanager
|
||||||
from mitmproxy.net import tls
|
|
||||||
|
|
||||||
|
|
||||||
CONF_DIR = "~/.mitmproxy"
|
CONF_DIR = "~/.mitmproxy"
|
||||||
CONF_BASENAME = "mitmproxy"
|
CONF_BASENAME = "mitmproxy"
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
import io
|
|
||||||
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from mitmproxy import exceptions
|
|
||||||
from mitmproxy.net import tls
|
from mitmproxy.net import tls
|
||||||
|
|
||||||
CLIENT_HELLO_NO_EXTENSIONS = bytes.fromhex(
|
CLIENT_HELLO_NO_EXTENSIONS = bytes.fromhex(
|
||||||
@ -11,9 +6,9 @@ CLIENT_HELLO_NO_EXTENSIONS = bytes.fromhex(
|
|||||||
"61006200640100"
|
"61006200640100"
|
||||||
)
|
)
|
||||||
FULL_CLIENT_HELLO_NO_EXTENSIONS = (
|
FULL_CLIENT_HELLO_NO_EXTENSIONS = (
|
||||||
b"\x16\x03\x03\x00\x65" # record layer
|
b"\x16\x03\x03\x00\x65" # record layer
|
||||||
b"\x01\x00\x00\x61" + # handshake header
|
b"\x01\x00\x00\x61" + # handshake header
|
||||||
CLIENT_HELLO_NO_EXTENSIONS
|
CLIENT_HELLO_NO_EXTENSIONS
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user