mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-05-28 15:35:02 +08:00
minor fixes
This commit is contained in:
@@ -2,11 +2,11 @@ from __future__ import print_function, absolute_import
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
import netlib.version
|
||||
from netlib.version_check import check_pyopenssl_version, check_mitmproxy_version
|
||||
from . import version, cmdline
|
||||
from .proxy import process_proxy_options, ProxyServerError
|
||||
from .exceptions import ServerException
|
||||
from .proxy.server import DummyServer, ProxyServer
|
||||
from .proxy.config import process_proxy_options
|
||||
|
||||
|
||||
def assert_utf8_env():
|
||||
@@ -31,7 +31,7 @@ def get_server(dummy_server, options):
|
||||
else:
|
||||
try:
|
||||
return ProxyServer(options)
|
||||
except ProxyServerError as v:
|
||||
except ServerException as v:
|
||||
print(str(v), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
@@ -66,7 +66,8 @@ class TlsLayer(Layer):
|
||||
self._client_tls and self._server_tls and not self.config.no_upstream_cert
|
||||
)
|
||||
|
||||
self._parse_client_hello()
|
||||
if self._client_tls:
|
||||
self._parse_client_hello()
|
||||
|
||||
if client_tls_requires_server_cert:
|
||||
self._establish_tls_with_client_and_server()
|
||||
|
||||
Reference in New Issue
Block a user