mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
raw tcp mode: use ssl_read_select
This commit is contained in:
parent
3b6140dfff
commit
ebba79b655
@ -4,7 +4,7 @@ import select
|
|||||||
|
|
||||||
from OpenSSL import SSL
|
from OpenSSL import SSL
|
||||||
|
|
||||||
from netlib.tcp import NetLibError
|
from netlib.tcp import NetLibError, ssl_read_select
|
||||||
from netlib.utils import cleanBin
|
from netlib.utils import cleanBin
|
||||||
from ..exceptions import ProtocolException
|
from ..exceptions import ProtocolException
|
||||||
from .base import Layer
|
from .base import Layer
|
||||||
@ -28,7 +28,7 @@ class RawTCPLayer(Layer):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
r, _, _ = select.select(conns, [], [], 10)
|
r = ssl_read_select(conns, 10)
|
||||||
for conn in r:
|
for conn in r:
|
||||||
dst = server if conn == client else client
|
dst = server if conn == client else client
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user