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

Windows tunnel improvements #818

Closed
vToMy opened this issue Jan 31, 2024 · 6 comments · Fixed by #924
Closed

Windows tunnel improvements #818

vToMy opened this issue Jan 31, 2024 · 6 comments · Fixed by #924
Labels
help wanted Extra attention is needed

Comments

@vToMy
Copy link

vToMy commented Jan 31, 2024

Currently the windows rsd tunnel implementation relies on this project: https://github.com/DsoTsin/wintun
Which is based on: https://www.wintun.net/ and also adds:

  1. Python bindings for wintun
  2. Installation of the wetest driver

For better maintainability I suggest the following:

  1. Create a new project that adds python bindings to wintun based on the prebuilt binaries from https://www.wintun.net/
    • without wintun source code - only rely on pre-built binaries and add python bindings (and add a ci build process for all architectures)
    • no wetest driver installation
    • This is easier to maintain if wintun has an update - just replace the pre-built binaries and update python bindings if API changed.
  2. Add wetest driver installation as a prerequisite section in the readme. It's as simple as running this command:
    pnputil.exe /add-driver %s /install
    • this way we're not tied to one specific driver, so if apple/microsoft add native support in the future, we can skip this step.
@doronz88 doronz88 added the help wanted Extra attention is needed label Jan 31, 2024
@doronz88
Copy link
Owner

This sounds like the better way to go about the whole process, though will require quite a lot of work, so hope to have the time for it. PRs are very much welcome

@doronz88 doronz88 pinned this issue Jan 31, 2024
@vToMy
Copy link
Author

vToMy commented Feb 5, 2024

It might be possible to code a windows driver using this project as a base:
https://github.com/microsoft/NCM-Driver-for-Windows
And applying something similar to the patch provided for the linux kernel here:
#566 (comment)

@doronz88
Copy link
Owner

doronz88 commented Apr 9, 2024

Since we can now establish tunnels over both wifi and lockdown, I think we should now avoid all the driver installations and rely solely on the prebuilt wintun binaries.

I hope someone is up for the job of wrapping this as a python package.

@doronz88
Copy link
Owner

doronz88 commented Apr 9, 2024

Also, I think we can technically just use ctypes.windll based on this code:
https://github.com/DsoTsin/wintun/blob/master/api/pybinding.c

If anyone is interested in helping, please reach me out

@doronz88
Copy link
Owner

doronz88 commented Apr 9, 2024

I created a skeleton project, but I won't have the time to also maintain this project:

https://github.com/doronz88/pywintun/blob/master/main.py

@doronz88
Copy link
Owner

I created a WIP PR for this:

https://github.com/doronz88/pytun-pmd3/pull/5/files

Couldn't manage to get it to work. I lack knowledge in win development

@doronz88 doronz88 linked a pull request Apr 11, 2024 that will close this issue
@doronz88 doronz88 unpinned this issue Apr 14, 2024
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.

2 participants