Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xdeng opened this issue Jun 26, 2024 · 3 comments

Comments

@xdeng
Copy link

xdeng commented Jun 26, 2024

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

@doronz88
Copy link
Owner

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

@xdeng
Copy link
Author

xdeng commented Jun 27, 2024

@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?

@doronz88
Copy link
Owner

doronz88 commented Jun 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants