Skip to content

Commit 2241d7c

Browse files
committed
minor changes
1 parent a6c22ef commit 2241d7c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,6 @@ async fn setup(fd: i32) {
154154
rt.block_on(async {
155155
let mut cfg = tun::Configuration::default();
156156
cfg.raw_fd(fd);
157-
#[cfg(target_os = "ios")]
158-
cfg.platform_config(|p_cfg| {
159-
p_cfg.packet_information(true);
160-
});
161157
let mut tun = tun::create_as_async(&cfg).unwrap();
162158
let mut framed = tun.into_framed();
163159
while let Some(packet) = framed.next().await {

src/platform/windows/device.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ impl Device {
4545
let guid = config.platform_config.device_guid;
4646
let adapter = match Adapter::open(&wintun, tun_name) {
4747
Ok(a) => a,
48-
Err(_) => Adapter::create(&wintun, tun_name, tun_name, guid)?,
48+
Err(e) => {
49+
log::debug!("failed to open adapter: {}", e);
50+
Adapter::create(&wintun, tun_name, tun_name, guid)?
51+
}
4952
};
5053
if let Some(metric) = config.metric {
5154
// command: netsh interface ip set interface {index} metric={metric}

0 commit comments

Comments
 (0)