From bc7cf0c1a29f9f67221f35c0dac46d0250476107 Mon Sep 17 00:00:00 2001 From: Searchstars Date: Sat, 8 Nov 2025 19:13:44 +0800 Subject: [PATCH] Add support for espidf target in TUN_PROTO configurations --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index eb6225f..7207a6b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,9 +32,9 @@ const TTL: u8 = 128; #[cfg(unix)] const TUN_FLAGS: [u8; 2] = [0x00, 0x00]; -#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd"))] +#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd", target_os = "espidf"))] const TUN_PROTO_IP6: [u8; 2] = [0x86, 0xdd]; -#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd"))] +#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd", target_os = "espidf"))] const TUN_PROTO_IP4: [u8; 2] = [0x08, 0x00]; #[cfg(any(target_os = "macos", target_os = "ios"))]