pymobiledevice3 icon indicating copy to clipboard operation
pymobiledevice3 copied to clipboard

tunnel_service.py", line 445, in start_tcp_tunnel ctx = SSLPSKContext(ssl.PROTOCOL_TLSv1_2) TypeError: 'NoneType' object is not callable

Open xdeng opened this issue 1 year ago • 3 comments
trafficstars

Test environment

  • Host OS version.
  • win10
  • Target device model and iOS version.
  • 17.1 (21B74)

Describe the bug A clear and concise description of what the bug is.

main.py remote start-tunnel -p tcp

tunnel_service.py", line 445, in start_tcp_tunnel ctx = SSLPSKContext(ssl.PROTOCOL_TLSv1_2) TypeError: 'NoneType' object is not callable

xdeng avatar Jun 26 '24 07:06 xdeng

The tcp tunnels aren't something that is officially supported cross-platform. Use the default QUIC instead

doronz88 avatar Jun 26 '24 12:06 doronz88

@doronz88

in Ubuntu 22.04.4 LTS

sudo pymobiledevice3 remote start-tunnel -p tcp

File "/usr/local/lib/python3.10/dist-packages/pymobiledevice3/remote/tunnel_service.py", line 446, in start_tcp_tunnel reader, writer = await asyncio.open_connection(sock=sock, ssl=ctx, server_hostname='') File "/usr/lib/python3.10/asyncio/streams.py", line 48, in open_connection transport, _ = await loop.create_connection( File "/usr/lib/python3.10/asyncio/base_events.py", line 1103, in create_connection transport, protocol = await self._create_connection_transport( File "/usr/lib/python3.10/asyncio/base_events.py", line 1133, in _create_connection_transport await waiter File "/usr/lib/python3.10/asyncio/sslproto.py", line 682, in _process_write_backlog ssldata = self._sslpipe.do_handshake( File "/usr/lib/python3.10/asyncio/sslproto.py", line 122, in do_handshake ssldata, appdata = self.feed_ssldata(b'', only_handshake=True) File "/usr/lib/python3.10/asyncio/sslproto.py", line 188, in feed_ssldata self._sslobj.do_handshake() File "/usr/local/lib/python3.10/dist-packages/sslpsk_pmd3/sslpsk.py", line 127, in do_handshake super().do_handshake(*args, **kwargs) File "/usr/lib/python3.10/ssl.py", line 975, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: NO_CIPHERS_AVAILABLE] no ciphers available (_ssl.c:1007)

tcp tunnels only available on Mac?

xdeng avatar Jun 27 '24 01:06 xdeng

even not on mac. i don't know of a rule of thumb where they work. they do on all my workstations (even windows/linux) and users have reported otherwise so dunno feel free to submit a PR to fix that

doronz88 avatar Jun 27 '24 05:06 doronz88