Open mokhtarabadi opened 2 hours ago
The wintun_bindings::log: WinTun:
is in a callback function. And it can not return an error to the caller.
Any workaround? How can I ensure the device created or error occurs? I check tun2proxy that also has this bug
here is the callback setting point. PR welcome. Maybe we can use a global variant to store the error info and read it from the normal logic of wintun.
When I set the TUN device name to an ID like
wintun11
, my app sometimes fails to start and returns the following errors:Interestingly, the app works on the second attempt, successfully creating the Wintun device.
I suggest refactoring the Windows device implementation to return errors instead of just logging them. This would especially help with handling the
Cannot create a file when that file already exists
error in my application.Thank you!