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

FEATURE REQUEST: RSD tunnel on Windows #569

Closed
k-inoway opened this issue Sep 22, 2023 · 37 comments · Fixed by #797
Closed

FEATURE REQUEST: RSD tunnel on Windows #569

k-inoway opened this issue Sep 22, 2023 · 37 comments · Fixed by #797
Labels
help wanted Extra attention is needed

Comments

@k-inoway
Copy link

What are the obstacles to supporting QUIC tunnel on Windows?

Currently, the remote start-quic-tunnel command is only supported on macOS.
this issue describes support for Linux, but there is currently no information about Windows.

If you have any information at this time, please share it.

@k-inoway
Copy link
Author

At least, it seems like we need to have something to replace /usr/libexec/remoted.

REMOTED_PATH = '/usr/libexec/remoted'

@MobitrixTechnology
Copy link

I think the core problem to be solved is creating a network over USB, does this require a driver from Apple?

@k-inoway
Copy link
Author

It is unknown if Apple includes related files in the latest iTunes, but here is the download link for the latest iTunes.
https://github.com/littlebyteorg/appledb/blob/ee91250cde82e2e9dbf1182f7bc196a49ec72d86/osFiles/Software/iTunes/12.12.10.1.json
Probably it's not included.

@doronz88
Copy link
Owner

Actually the remoted process is just a hinderance I'm stopping so I can communicate.

Currently the latest iTunes version isn't shipped with a USB Ethernet driver which exposes the CDC NCM configuration.

Only once this this issue is resolved we can proceed with all the rest

@yinyajiang
Copy link

Actually the remoted process is just a hinderance I'm stopping so I can communicate.

Currently the latest iTunes version isn't shipped with a USB Ethernet driver which exposes the CDC NCM configuration.

Only once this this issue is resolved we can proceed with all the rest

I found this product, iAnyGo, that implements these on windows.
It creates a virtual adapter for communication:

461CA450-EA60-4D9D-A2AD-03F96FAEA502

FD419552-82DC-467A-A78A-8D1469FCFA1A

But this network driver is supposed to be provided by Microsoft, and it changes the name of a file.
70E8F458-53E5-40F2-874E-3ADE7FB0FEA7

@trouble-bao
Copy link

事实上,这个remoted过程只是一个障碍,我要停止这样我才能沟通。
目前,最新的 iTunes 版本未附带公开 CDC NCM 配置的 USB 以太网驱动程序。
只有解决了这个问题,我们才能继续处理剩下的事情

我发现这个产品 iAnyGo 可以在 Windows 上实现这些功能。 它创建一个用于通信的虚拟适配器:

461CA450-EA60-4D9D-A2AD-03F96FAEA502

FD419552-82DC-467A-A78A-8D1469FCFA1A

但这个网络驱动程序应该是由微软提供的,它改变了一个文件的名称。 70E8F458-53E5-40F2-874E-3ADE7FB0FEA7
this sys maybe is this https://github.com/microsoft/NCM-Driver-for-Windows, but I don’t understand driver development

@CatueLi
Copy link

CatueLi commented Oct 7, 2023

The key is how to set up the tunnel on windows, on mac, this process seems to be done automatically by "remotepairingd". When get serverAddress, clientAddress, serverRSDPort (63548), the server and the client how to establish communication? iAnyGo uses wintun to create the Adapter and clientAddress to set up the ipv6 address. Through the netstat command view can see serverAddress, established a TCP connection between clientAddress, they appear to be connected via Teredo tunnel. Does it seem to make sense that serverAddress and serverRSDPort are exposed for external use, and clientAddress acts as a bridge between information transfer and device communication? Welcome to communicate.

@trouble-bao
Copy link

关键是如何在windows上设置隧道,在mac上,这个过程似乎是由“remotepairingd”自动完成的。当获取到serverAddress、clientAddress、serverRSDPort(63548)后,服务器和客户端如何建立通信?iAnyGo 使用 wintun 创建 Adapter 和 clientAddress 来设置 ipv6 地址。通过netstat命令视图可以看到serverAddress、clientAddress之间建立了TCP连接,它们看起来是通过Teredo隧道连接的。serverAddress 和 serverRSDPort 暴露给外部使用,clientAddress 充当信息传输和设备通信之间的桥梁,这似乎有意义吗?欢迎交流。

Have you been able to obtain the server IP and port? how to get server ip and rsd port

@yinyajiang
Copy link

关键是如何在windows上设置隧道,在mac上,这个过程似乎是由“remotepairingd”自动完成的。当获取到serverAddress、clientAddress、serverRSDPort(63548)后,服务器和客户端如何建立通信?iAnyGo 使用 wintun 创建 Adapter 和 clientAddress 来设置 ipv6 地址。通过netstat命令视图可以看到serverAddress、clientAddress之间建立了TCP连接,它们看起来是通过Teredo隧道连接的。serverAddress 和 serverRSDPort 暴露给外部使用,clientAddress 充当信息传输和设备通信之间的桥梁,这似乎有意义吗?欢迎交流。

Have you been able to obtain the server IP and port? how to get server ip and rsd port

https://github.com/doronz88/pymobiledevice3/blob/master/misc/RemoteXPC.md#trusted-tunnel

@CatueLi
Copy link

CatueLi commented Oct 7, 2023

关键是如何在windows上设置隧道,在mac上,这个过程似乎是由“remotepairingd”自动完成的。当获取到serverAddress、clientAddress、serverRSDPort(63548)后,服务器和客户端如何建立通信?iAnyGo 使用 wintun 创建 Adapter 和 clientAddress 来设置 ipv6 地址。通过netstat命令视图可以看到serverAddress、clientAddress之间建立了TCP连接,它们看起来是通过Teredo隧道连接的。serverAddress 和 serverRSDPort 暴露给外部使用,clientAddress 充当信息传输和设备通信之间的桥梁,这似乎有意义吗?欢迎交流。

Have you been able to obtain the server IP and port? how to get server ip and rsd port

On windows, you need to install the device driver first, and then expose the network interface of the device.

@trouble-bao
Copy link

关键是如何在windows上设置隧道,在mac上,这个过程好像是由“remotepairingd”自动完成的。当获取到serverAddress、clientAddress、serverRSDPort(63548)后,服务器和客户端如何建立通信?iAnyGo wintun 使用创建Adapter 和 clientAddress 来设置 ipv6 地址。通过netstat命令视图可以看到serverAddress、clientAddress之间建立了TCP连接,它们看起来是通过Teredo隧道连接的。serverAddress 和 serverRSDPort 公开给外部使用,clientAddress 承担信息传输和设备通信之间的桥梁,这似乎有意义吗?欢迎交流。

您是否能够获取服务器IP和端口?如何获取服务器ip和rsd端口

在windows上,需要先安装设备驱动程序,然后暴露设备的网络接口。
Can you provide detailed operating instructions and drivers on windows?

@doronz88
Copy link
Owner

doronz88 commented Oct 8, 2023

If anyone here can provide with instructions for how an official driver can be installed on a windows machine, I'll update the README with the required steps. In addition, do any of you know how do they create the TAP device on windows? If it's python, it should be pretty simple to implement.

@CatueLi
Copy link

CatueLi commented Oct 9, 2023

I have found a way to install the device drivers, but have not yet researched how to get their official versions:

  1. install Apple Driver, perhaps you can extract the official driver from itunes
  2. Install libusb Driver, refer to: https://github.com/libusb/libusb
  3. Install sliding Device Driver, refer to: https://github.com/microsoft/NCM-Driver-for-Windows

The above steps are only to install the driver. When the device is disconnected and reconnected, it is necessary to reactivate the NCM device and send the device instruction:
[0xc0,0x52,0x00,0x00,0x01,0x00,0x03,0x00]

How to create a utun/tap device on windows, this may be a good reference example:
https://github.com/gnbdev/opengnb/tree/master/src/mingw

@trouble-bao
Copy link

我已经找到了安装设备驱动程序的方法,但尚未研究如何获取其正式版本:

  1. 安装Apple驱动程序,也许你可以从itunes中提取官方驱动程序
  2. 安装libusb驱动,参考:https://github.com/libusb/libusb
  3. 安装滑动设备驱动,参考:https ://github.com/microsoft/NCM-Driver-for-Windows

以上步骤只是安装驱动程序。当设备断开重连时,需要重新激活NCM设备,发送设备指令: [0xc0,0x52,0x00,0x00,0x01,0x00,0x03,0x00]

如何在windows上创建utun/tap设备,这可能是一个很好的参考示例: https://github.com/gnbdev/opengnb/tree/master/src/mingw

我已经找到了安装设备驱动程序的方法,但尚未研究如何获取其正式版本:

  1. 安装Apple驱动程序,也许你可以从itunes中提取官方驱动程序
  2. 安装libusb驱动,参考:https://github.com/libusb/libusb
  3. 安装滑动设备驱动,参考:https ://github.com/microsoft/NCM-Driver-for-Windows

以上步骤只是安装驱动程序。当设备断开重连时,需要重新激活NCM设备,发送设备指令: [0xc0,0x52,0x00,0x00,0x01,0x00,0x03,0x00]

如何在windows上创建utun/tap设备,这可能是一个很好的参考示例: https://github.com/gnbdev/opengnb/tree/master/src/mingw

How to send device instructions, please give an example

@yinyajiang
Copy link

I have found a way to install the device drivers, but have not yet researched how to get their official versions:

  1. install Apple Driver, perhaps you can extract the official driver from itunes
  2. Install libusb Driver, refer to: https://github.com/libusb/libusb
  3. Install sliding Device Driver, refer to: https://github.com/microsoft/NCM-Driver-for-Windows

The above steps are only to install the driver. When the device is disconnected and reconnected, it is necessary to reactivate the NCM device and send the device instruction: [0xc0,0x52,0x00,0x00,0x01,0x00,0x03,0x00]

How to create a utun/tap device on windows, this may be a good reference example: https://github.com/gnbdev/opengnb/tree/master/src/mingw

For the feature to work on windows, shouldn't bonjour be able to discover the iPhone (via usb connection) first, just like on a mac. (I see the code flow like this)

@jiang1027
Copy link

I have found a way to install the device drivers, but have not yet researched how to get their official versions:

  1. install Apple Driver, perhaps you can extract the official driver from itunes
  2. Install libusb Driver, refer to: https://github.com/libusb/libusb
  3. Install sliding Device Driver, refer to: https://github.com/microsoft/NCM-Driver-for-Windows

The above steps are only to install the driver. When the device is disconnected and reconnected, it is necessary to reactivate the NCM device and send the device instruction: [0xc0,0x52,0x00,0x00,0x01,0x00,0x03,0x00]

How to create a utun/tap device on windows, this may be a good reference example: https://github.com/gnbdev/opengnb/tree/master/src/mingw

Hi, what's meaning of "0xc0,0x52,0x00,0x00,0x01,0x00,0x03,0x00"? I understoold the first byte 0xc0 denotes it's a Device-to-Host, Vendor request to device.

@doronz88
Copy link
Owner

That's a vendor-specific command to set the device mode to CDC-NCM. I already implemented this in:

https://github.com/doronz88/pyusbmuxd

@CatueLi
Copy link

CatueLi commented Oct 14, 2023

That's a vendor-specific command to set the device mode to CDC-NCM. I already implemented this in:

https://github.com/doronz88/pyusbmuxd

Set the device mode to CDC-NCM, But Bonjour still can't discover the "ncm._remoted._tcp.local" service. Why? Still need to start some DNS services for the adapter?

@MGSSPYU
Copy link

MGSSPYU commented Oct 16, 2023

事实上,这个remoted过程只是一个障碍,我要停止这样的沟通。
目前,最新的 iTunes 版本未附带公开 CDC NCM 配置的 USB 挖掘驱动程序。
只有解决了这个问题,我们才能继续处理剩余的事情

我发现这个产品iAnyGo可以在Windows上实现这些功能。它创建了一个用于通信的虚拟闹钟:
461CA450-EA60-4D9D-A2AD-03F96FAEA502
FD419552-82DC-467A-A78A-8D1469FCFA1A
但这个网络驱动程序应该是由微软提供的,它改变了一个文件的名称。70E8F458-53E5-40F2-874E-3ADE7FB0FEA7
这个系统可能是这个https://github.com/microsoft/NCM-Driver-for-Windows,但我不明白驱动程序发展

请问你解决了吗 兄弟?
Have you solved it, brother?

@doronz88 doronz88 added the help wanted Extra attention is needed label Oct 19, 2023
@doronz88 doronz88 changed the title QUIC tunnel on Windows FEATURE REQUEST: QUIC tunnel on Windows Nov 3, 2023
@omggodlike123
Copy link

it

事实上,这个remoted过程只是一个障碍,我要停止这样的沟通。
目前,最新的 iTunes 版本未附带公开 CDC NCM 配置的 USB 挖掘驱动程序。
只有解决了这个问题,我们才能继续处理剩余的事情

我发现这个产品iAnyGo可以在Windows上实现这些功能。它创建了一个用于通信的虚拟闹钟:
461CA450-EA60-4D9D-A2AD-03F96FAEA502
FD419552-82DC-467A-A78A-8D1469FCFA1A
但这个网络驱动程序应该是由微软提供的,它改变了一个文件的名称。70E8F458-53E5-40F2-874E-3ADE7FB0FEA7
这个系统可能是这个https://github.com/microsoft/NCM-Driver-for-Windows,但我不明白驱动程序发展

请问你解决了吗 兄弟? Have you solved it, brother?

it looks like they use wireguard and wintune

any one know how to do?

@DsoTsin
Copy link

DsoTsin commented Jan 14, 2024

@doronz88 we can use pywintun-pmd3: support python 3.6-3.13 amd64 currently to create tunnel device on windows, with the windows usb driver provided by Tencent Wetest's perfdog. Just need to modify few lines....

image image

screenshot start tunnel

perfdog-ios17-driver-win64.zip

@SoY0ung
Copy link

SoY0ung commented Jan 15, 2024

I found a quic-tunnel on Windows developed in Python.

xdm-exec-location.zip Download Link: https://drive.google.com/file/d/1DXqDkRtE3j_1RPhV7rQqwZkKE_ig6NQg/view?usp=sharing

It is extracted from https://file.ishalou.com/pc/install/6.8.3/ShaLou-Setup-6.8.3.exe

You can follow the instruction below to get RSD address and port

Show instructions

0x0 File Tree

You will get these files after extracting the zip.

- Control
  └ Control.exe
  └ _internal
- NcmDriver
  └ x64
    └ apple
    └ ncmdriver
    └ NcmdriverInstaller.exe
    └ ...
- redBullquic
  └ redBullquic.exe
  └ wintun.dll
  └ ...
  • Control.exe is used to browse devices over bonjour and simulate location. It is based on pymobiledevice3.

    Usage

    # Browse device with a specific UDID
    Control.exe bonjour browse --udid <UDID>
    # Browse all device over bonjour
    Control.exe bonjour browse
    # Simulate location to San Francisco
    Control.exe developer simulate-location --host 127.0.0.1 --port 10041 --latitude 37.77493000 --longitude -122.41942000
    # Note that the host should be 127.0.0.1 and the port should be 10041
  • NcmdriverInstaller.exe is used to create a CDC NCM device for communication.

    Usage

    NcmdriverInstaller.exe MFNcmDriverInstall

    You need to run it in administrator.

  • redBullquic.exe is used to create a QUIC tunnel and a wireguard tun

    Usage

    redBullquic.exe remote start-quic-tunnel --host <ipv6_addr> --port 10041

    <ipv6_addr> is the output of Control.exe

0x1 Create NCM Device

cd to the NcmdriverInstaller.exe directory. Connect idevice then open powershell in administrator and run

./NcmdriverInstaller.exe MFNcmDriverInstall

When you see replug USB\VID_05AC&PID_12A8\<UDID> , just replug idevice.

Then you will see update-ncm-driver USB\VID_05AC&PID_12A8\<UDID> ok , check Network Adapter Page to see if Apple NCM Device for iOS17 is be created.

0x2 Get iDevice IPv6 Over Bonjour

cd to the Control.exe directory. Open powershell in administrator and run

.\Control.exe bonjour browse

If everything is right, you will see the output like:

device 000*****-UDID************ address: fe80::f490:****:fedc:f6d1%22

If the output is empty, please replug your idevice and try 0x1 Create NCM Device

Copy the address fe80::f490:****:fedc:f6d1%22

0x3 Create QUIC Tunnel

cd to the redBullquic.exe directory. Open powershell in administrator and run

.\redBullquic.exe remote start-quic-tunnel --host fe80::f490:****:fedc:f6d1%22 --port 10041

You will see a file named 000*****-UDID************ in the directory. The content is like

address=fd41:2d9e:314c::1
port=49560

And that is the RSD address and port. Please Keep the powershell windows open.

If you get error, please replug your idevice and try 0x1 Create NCM Device

0x4 Use pymobiledevice3 with RSD

It is suggest to run

.\Control.exe developer simulate-location --host 127.0.0.1 --port 10041 --latitude 37.77493000 --longitude -122.41942000

before running pymobiledevice3 .

Run the command to access the DVT services

python -m pymobiledevice3 developer dvt ls / --rsd 

But simulate-location in pymobiledevice3 gets error.

> pymobiledevice3 developer dvt simulate-location set  --rsd fd41:2d9e:314c::1 49560 -- 60 60
d:\python39\lib\site-packages\blessed\terminal.py:183: UserWarning: Failed to setupterm(kind='dumb'): Could not find terminal dumb
  warnings.warn(msg)
Press Ctrl+C to send a SIGINT or use 'kill' command to send a SIGTERM
Traceback (most recent call last):
  File "d:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "d:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\Python39\Scripts\pymobiledevice3.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "d:\python39\lib\site-packages\pymobiledevice3\__main__.py", line 101, in main
    cli()
  File "d:\python39\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "d:\python39\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "d:\python39\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "d:\python39\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "d:\python39\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  [Previous line repeated 1 more time]
  File "d:\python39\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "d:\python39\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "d:\python39\lib\site-packages\pymobiledevice3\cli\cli_common.py", line 134, in wrap_callback_calling
    callback(service_provider=service_provider, **kwargs)
  File "d:\python39\lib\site-packages\pymobiledevice3\cli\developer.py", line 988, in dvt_simulate_location_set
    wait_return()
  File "d:\python39\lib\site-packages\pymobiledevice3\cli\cli_common.py", line 97, in wait_return
    signal.sigwait([signal.SIGINT, signal.SIGTERM])
AttributeError: module 'signal' has no attribute 'sigwait'

@lezhi12
Copy link

lezhi12 commented Jan 15, 2024

@doronz88 we can use python-wintun: support python 3.12 amd64 currently to create tunnel device on windows, with the windows usb driver provided by Tencent Wetest's perfdog. Just need to modify few lines....

image image
screenshot start tunnel

perfdog-ios17-driver-win64.zip

是安装perfdog的驱动就可以了么?我安装驱动以后,执行pymobiledevice3 remote tunneld,仍然报错不支持windows平台。还需要做其他操作么?

@DsoTsin
Copy link

DsoTsin commented Jan 15, 2024

@doronz88 we can use python-wintun: support python 3.12 amd64 currently to create tunnel device on windows, with the windows usb driver provided by Tencent Wetest's perfdog. Just need to modify few lines....
image image
screenshot start tunnel
perfdog-ios17-driver-win64.zip

是安装perfdog的驱动就可以了么?我安装驱动以后,执行pymobiledevice3 remote tunneld,仍然报错不支持windows平台。还需要做其他操作么?

要改几行pymobiledevice3的代码,不超过100行

@doronz88
Copy link
Owner

If you can, please publish a PR that adds this support

@omggodlike123
Copy link

@doronz88 we can use python-wintun: support python 3.12 amd64 currently to create tunnel device on windows, with the windows usb driver provided by Tencent Wetest's perfdog. Just need to modify few lines....
image image
screenshot start tunnel
perfdog-ios17-driver-win64.zip

是安装perfdog的驱动就可以了么?我安装驱动以后,执行pymobiledevice3 remote tunneld,仍然报错不支持windows平台。还需要做其他操作么?

要改几行pymobiledevice3的代码,不超过100行

dear, can you develop this. so many people need it

@lezhi12
Copy link

lezhi12 commented Jan 17, 2024

@doronz88 we can use python-wintun: support python 3.12 amd64 currently to create tunnel device on windows, with the windows usb driver provided by Tencent Wetest's perfdog. Just need to modify few lines....
image image
screenshot start tunnel
perfdog-ios17-driver-win64.zip

是安装perfdog的驱动就可以了么?我安装驱动以后,执行pymobiledevice3 remote tunneld,仍然报错不支持windows平台。还需要做其他操作么?

要改几行pymobiledevice3的代码,不超过100行

梳理下思路,看对不对哈
1、我在windows上安装了perfdog,插上ios17的手机,去网络设置里看了下,多了一个tun设备(一块虚拟网卡)tun1
2、解压了层主发的perfdog驱动,里面有wintun.dll,那么perfdog的思路应该是通过wintun,创建了虚拟网卡tun1,并且通过对tun1的send和receive与ios17通信
3、同理,pymobiledevice3可以使用python_wintun去创建虚拟网卡并通过该tun设备与ios17通信。
4、如何用python_wintun,资料比较少,网络通信这块也不是很熟,我从官网demo里没太看明白,如果是这么个思路的话,看哪位朋友帮忙实现。

@doronz88 doronz88 changed the title FEATURE REQUEST: QUIC tunnel on Windows FEATURE REQUEST: RSD tunnel on Windows Jan 18, 2024
@DsoTsin
Copy link

DsoTsin commented Jan 20, 2024

I found a quic-tunnel on Windows developed in Python.

xdm-exec-location.zip Download Link: https://drive.google.com/file/d/1DXqDkRtE3j_1RPhV7rQqwZkKE_ig6NQg/view?usp=sharing

It is extracted from https://file.ishalou.com/pc/install/6.8.3/ShaLou-Setup-6.8.3.exe

You can follow the instruction below to get RSD address and port

Show instructions
But simulate-location in pymobiledevice3 gets error.

> pymobiledevice3 developer dvt simulate-location set  --rsd fd41:2d9e:314c::1 49560 -- 60 60
d:\python39\lib\site-packages\blessed\terminal.py:183: UserWarning: Failed to setupterm(kind='dumb'): Could not find terminal dumb
  warnings.warn(msg)
Press Ctrl+C to send a SIGINT or use 'kill' command to send a SIGTERM
Traceback (most recent call last):
  File "d:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "d:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\Python39\Scripts\pymobiledevice3.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "d:\python39\lib\site-packages\pymobiledevice3\__main__.py", line 101, in main
    cli()
  File "d:\python39\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "d:\python39\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "d:\python39\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "d:\python39\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "d:\python39\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  [Previous line repeated 1 more time]
  File "d:\python39\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "d:\python39\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "d:\python39\lib\site-packages\pymobiledevice3\cli\cli_common.py", line 134, in wrap_callback_calling
    callback(service_provider=service_provider, **kwargs)
  File "d:\python39\lib\site-packages\pymobiledevice3\cli\developer.py", line 988, in dvt_simulate_location_set
    wait_return()
  File "d:\python39\lib\site-packages\pymobiledevice3\cli\cli_common.py", line 97, in wait_return
    signal.sigwait([signal.SIGINT, signal.SIGTERM])
AttributeError: module 'signal' has no attribute 'sigwait'

This might be a fork of pymobiledevice3.... Their software also worked with the driver provided by Tencent. The company (深圳市大摩登科技有限公司) should publish their changes on pymobiledevice3.

@omggodlike123
Copy link

I found a quic-tunnel on Windows developed in Python.

xdm-exec-location.zip Download Link: https://drive.google.com/file/d/1DXqDkRtE3j_1RPhV7rQqwZkKE_ig6NQg/view?usp=sharing

It is extracted from https://file.ishalou.com/pc/install/6.8.3/ShaLou-Setup-6.8.3.exe

You can follow the instruction below to get RSD address and port

Show instructions

0x0 File Tree

You will get these files after extracting the zip.

- Control
  └ Control.exe
  └ _internal
- NcmDriver
  └ x64
    └ apple
    └ ncmdriver
    └ NcmdriverInstaller.exe
    └ ...
- redBullquic
  └ redBullquic.exe
  └ wintun.dll
  └ ...
  • Control.exe is used to browse devices over bonjour and simulate location. It is based on pymobiledevice3.

    Usage

    # Browse device with a specific UDID
    Control.exe bonjour browse --udid <UDID>
    # Browse all device over bonjour
    Control.exe bonjour browse
    # Simulate location to San Francisco
    Control.exe developer simulate-location --host 127.0.0.1 --port 10041 --latitude 37.77493000 --longitude -122.41942000
    # Note that the host should be 127.0.0.1 and the port should be 10041
  • NcmdriverInstaller.exe is used to create a CDC NCM device for communication.

    Usage

    NcmdriverInstaller.exe MFNcmDriverInstall

    You need to run it in administrator.

  • redBullquic.exe is used to create a QUIC tunnel and a wireguard tun

    Usage

    redBullquic.exe remote start-quic-tunnel --host <ipv6_addr> --port 10041

    <ipv6_addr> is the output of Control.exe

0x1 Create NCM Device

cd to the NcmdriverInstaller.exe directory. Connect idevice then open powershell in administrator and run

./NcmdriverInstaller.exe MFNcmDriverInstall

When you see replug USB\VID_05AC&PID_12A8\<UDID> , just replug idevice.

Then you will see update-ncm-driver USB\VID_05AC&PID_12A8\<UDID> ok , check Network Adapter Page to see if Apple NCM Device for iOS17 is be created.

0x2 Get iDevice IPv6 Over Bonjour

cd to the Control.exe directory. Open powershell in administrator and run

.\Control.exe bonjour browse

If everything is right, you will see the output like:

device 000*****-UDID************ address: fe80::f490:****:fedc:f6d1%22

If the output is empty, please replug your idevice and try 0x1 Create NCM Device

Copy the address fe80::f490:****:fedc:f6d1%22

0x3 Create QUIC Tunnel

cd to the redBullquic.exe directory. Open powershell in administrator and run

.\redBullquic.exe remote start-quic-tunnel --host fe80::f490:****:fedc:f6d1%22 --port 10041

You will see a file named 000*****-UDID************ in the directory. The content is like

address=fd41:2d9e:314c::1
port=49560

And that is the RSD address and port. Please Keep the powershell windows open.

If you get error, please replug your idevice and try 0x1 Create NCM Device

0x4 Use pymobiledevice3 with RSD

It is suggest to run

.\Control.exe developer simulate-location --host 127.0.0.1 --port 10041 --latitude 37.77493000 --longitude -122.41942000

before running pymobiledevice3 .

Run the command to access the DVT services

python -m pymobiledevice3 developer dvt ls / --rsd 

But simulate-location in pymobiledevice3 gets error.

> pymobiledevice3 developer dvt simulate-location set  --rsd fd41:2d9e:314c::1 49560 -- 60 60
d:\python39\lib\site-packages\blessed\terminal.py:183: UserWarning: Failed to setupterm(kind='dumb'): Could not find terminal dumb
  warnings.warn(msg)
Press Ctrl+C to send a SIGINT or use 'kill' command to send a SIGTERM
Traceback (most recent call last):
  File "d:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "d:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\Python39\Scripts\pymobiledevice3.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "d:\python39\lib\site-packages\pymobiledevice3\__main__.py", line 101, in main
    cli()
  File "d:\python39\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "d:\python39\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "d:\python39\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "d:\python39\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "d:\python39\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  [Previous line repeated 1 more time]
  File "d:\python39\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "d:\python39\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "d:\python39\lib\site-packages\pymobiledevice3\cli\cli_common.py", line 134, in wrap_callback_calling
    callback(service_provider=service_provider, **kwargs)
  File "d:\python39\lib\site-packages\pymobiledevice3\cli\developer.py", line 988, in dvt_simulate_location_set
    wait_return()
  File "d:\python39\lib\site-packages\pymobiledevice3\cli\cli_common.py", line 97, in wait_return
    signal.sigwait([signal.SIGINT, signal.SIGTERM])
AttributeError: module 'signal' has no attribute 'sigwait'

dear my friend, your google drive file can not open now. can you share again

@SoY0ung
Copy link

SoY0ung commented Jan 24, 2024

@omggodlike123
Copy link

@lindaamanda123 New link: https://sharewh1.xuexi365.com/share/download/aa6a10920416edc2d6016835377214a2

thank you

@tinybug
Copy link

tinybug commented Jan 25, 2024

@doronz88 we can use pywintun-pmd3: support python 3.6-3.13 amd64 currently to create tunnel device on windows, with the windows usb driver provided by Tencent Wetest's perfdog. Just need to modify few lines....

image image
screenshot start tunnel

perfdog-ios17-driver-win64.zip

Hi, @DsoTsin could you release the pywintun-pmd3 for x86(32bit) version? Thanks for your works.

doronz88 pushed a commit to DsoTsin/pymobiledevice3 that referenced this issue Jan 25, 2024
@doronz88
Copy link
Owner

Just finished #797 which should add an official windows support. Can you please provide feedback?

doronz88 pushed a commit to DsoTsin/pymobiledevice3 that referenced this issue Jan 25, 2024
@lezhi12
Copy link

lezhi12 commented Jan 26, 2024

Just finished #797 which should add an official windows support. Can you please provide feedback?

我能弱弱的问一句,怎么验证么?我运行pymobiledevice3 remote start-tunnel还是提示windows平台不支持。我用的https://github.com/DsoTsin/pymobiledevice3/tree/master这个分支的代码

@DsoTsin
Copy link

DsoTsin commented Jan 26, 2024

Just finished #797 which should add an official windows support. Can you please provide feedback?

我能弱弱的问一句,怎么验证么?我运行pymobiledevice3 remote start-tunnel还是提示windows平台不支持。我用的https://github.com/DsoTsin/pymobiledevice3/tree/master这个分支的代码

请使用windows分支

doronz88 pushed a commit to DsoTsin/pymobiledevice3 that referenced this issue Jan 26, 2024
doronz88 pushed a commit to DsoTsin/pymobiledevice3 that referenced this issue Jan 28, 2024
doronz88 pushed a commit to DsoTsin/pymobiledevice3 that referenced this issue Jan 28, 2024
doronz88 pushed a commit to DsoTsin/pymobiledevice3 that referenced this issue Jan 28, 2024
doronz88 pushed a commit to DsoTsin/pymobiledevice3 that referenced this issue Jan 28, 2024
doronz88 pushed a commit to DsoTsin/pymobiledevice3 that referenced this issue Jan 28, 2024
doronz88 pushed a commit to DsoTsin/pymobiledevice3 that referenced this issue Jan 28, 2024
doronz88 pushed a commit to DsoTsin/pymobiledevice3 that referenced this issue Jan 28, 2024
@lezhi12
Copy link

lezhi12 commented Jan 29, 2024

Just finished #797 which should add an official windows support. Can you please provide feedback?

我能弱弱的问一句,怎么验证么?我运行pymobiledevice3 remote start-tunnel还是提示windows平台不支持。我用的https://github.com/DsoTsin/pymobiledevice3/tree/master这个分支的代码

请使用windows分支
应该是成功了,给到了rsd的ip地址和端口号
@DsoTsin @doronz88

@lezhi12
Copy link

lezhi12 commented Jan 29, 2024

ios17
ios17_2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.