nythepegasus / SideJITServer

A JIT enabler for iOS 17 with a Windows/macOS computer on the same WiFi!
GNU General Public License v3.0
270 stars 18 forks source link

"sslpsk_pmd3/_sslpsk.c" can't be build in docker due to openssl. #12

Open alessioprescenzo opened 3 months ago

alessioprescenzo commented 3 months ago

Hi, I was trying to run the docker compose file in the repo, however, even after modifying the dockerfile to include openssl libs, when building wheel for sslpsk i get the following error: `sslpsk_pmd3/_sslpsk.c:19:10: fatal error: openssl/ssl.h: No such file or directory'

Is there a way to build the container? What am I doing wrong? Thanks in advance

takov751 commented 2 months ago

Greetings. You might want to try https://github.com/nythepegasus/SideJITServer/pull/15 I was working on an slightly improved version. You might just have to include installing openssl libssl-dev , but I have not encountered with the same issue. Could you share more about your setup and what steps to take to reproduce this issue?

massijay commented 2 months ago

Hi I have the same problem, I'm trying to run it on docker on a Raspberry Pi 4 (aarch64)

takov751 commented 2 months ago

@massijay Hello there i have tested it on my rpi4 . You need to install usbmuxd on host and then you could use my temporary docker solution https://github.com/takov751/SideJITServer here. There is a lot room for improvement but getting there. overall i just had to install libssl-dev package as dependency

takov751 commented 2 months ago
2024-04-28 19:23:34 pika pymobiledevice3.tunneld[93283] ERROR got exception from start-tunnel-task-mobdev2-00008030-0014302421F9802E-192.168.87.117: Traceback (most recent call last):
  File "/home/takov/.venv/lib/python3.11/site-packages/pymobiledevice3/service_connection.py", line 120, in sendall
    self.socket.sendall(data)
  File "/usr/lib/python3.11/ssl.py", line 1241, in sendall
    v = self.send(byte_view[count:])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 1210, in send
    return self._sslobj.write(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2393)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/takov/.venv/lib/python3.11/site-packages/pymobiledevice3/tunneld.py", line 196, in start_tunnel_task
    async with start_tunnel(protocol_handler, protocol=protocol) as tun:
  File "/usr/lib/python3.11/contextlib.py", line 204, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/takov/.venv/lib/python3.11/site-packages/pymobiledevice3/remote/tunnel_service.py", line 994, in start_tunnel
    async with protocol_handler.start_tcp_tunnel() as service:
  File "/usr/lib/python3.11/contextlib.py", line 204, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/takov/.venv/lib/python3.11/site-packages/pymobiledevice3/remote/tunnel_service.py", line 905, in start_tcp_tunnel
    self._service = await self._lockdown.aio_start_lockdown_service(self.SERVICE_NAME)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/takov/.venv/lib/python3.11/site-packages/pymobiledevice3/lockdown.py", line 502, in aio_start_lockdown_service
    attr = self.get_service_connection_attributes(name, include_escrow_bag=include_escrow_bag)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/takov/.venv/lib/python3.11/site-packages/pymobiledevice3/lockdown.py", line 482, in get_service_connection_attributes
    response = self._request('StartService', options)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/takov/.venv/lib/python3.11/site-packages/pymobiledevice3/lockdown.py", line 551, in _request
    response = self.service.send_recv_plist(message)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/takov/.venv/lib/python3.11/site-packages/pymobiledevice3/service_connection.py", line 125, in send_recv_plist
    self.send_plist(data, endianity=endianity, fmt=fmt)
  File "/home/takov/.venv/lib/python3.11/site-packages/pymobiledevice3/service_connection.py", line 175, in send_plist
    return self.sendall(build_plist(d, endianity, fmt))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/takov/.venv/lib/python3.11/site-packages/pymobiledevice3/service_connection.py", line 122, in sendall
    raise ConnectionTerminatedError from e
pymobiledevice3.exceptions.ConnectionTerminatedError
takov751 commented 2 months ago

Update:

I have installed fedora 40 on a rpi4 installed libssl-dev git gcc python3-devel and it was working smoothly. Fedora runs on mainline 6.8 kernel so it's all patched.

Fair reminder: be careful with firewalld , podman and SElinux those can trow you off slightly if you not expecting to handle them. Firewall policy is tight by default on fedora