-
Notifications
You must be signed in to change notification settings - Fork 148
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
clean code #74
clean code #74
Conversation
due to libc crate updated, ifreq struct added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wintun::Adapter::create(&wintun, tun_name, tun_name, guid)?
The last argument should be set as None
here. I find the given guid
can make the creation of the tun device fail, especially, the next time after the device was created successfully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixed value prevents the number of device name aliases from growing indefinitely. so needn't to set to None.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixed value prevents the number of device name aliases from growing indefinitely. so needn't to set to None.
However, the device can fail to be created with the current arguments, during my practice test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
post your log info here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chat from telegram?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this error can be stably reproduced within three times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have add a switch for tun, now you can set guid to Some(u128) or None in the examples.
d9072c4
to
9935102
Compare
@meh Please take a look at this patch for enhancing read/write performance on Windows platform. |
Stumbled on this PR whilst debugging an issue in CI. Assuming the changes here are the same as those from https://github.com/ssrlive/rust-tun e944758, then this PR fixes the issues I've been seeing using this crate with async code on Windows from Github CI (see fujiapple852/trippy#891 for WIP code which work with the fork and fails sporadically with I haven't bisected exactly which change here fixes the issue, as I've only just discovered this to be the cause, but I will. |
Hi @meh , If you really don't have time to maintain this repo and crate, I would like you to add me as a co-contributor and publisher. what do you think? |
8f2f109
to
dbc1c4e
Compare
Hi @meh, if this PR has not been responded a week later, I will have to publish tun2 crate, and I don't want this to happen. Hope you can respond in time. For me, a submitted PR has not been reviewed for a long time, cannot be merged to the main branch, and cannot be published. It is like a patient who has not been sutured on the operating table for a long time. This is a bad experience. I believe that many people feel the same. |
The changes are all over the place. It would be easier to accept if you narrowed your scope and instead pushed a few more focused and smaller PRs. |
due to libc crate updated, ifreq struct added