wangyu- / udp2raw-multiplatform

multi-platform(cross-platform) version of udp2raw-tunnel, which supports Windows/Mac/BSD natively. Client-Only at the moment.
MIT License
645 stars 146 forks source link

win10运行客户端出现报错:[FATAL]unknown pcap link type : 12 #58

Open Philosjay opened 1 year ago

Philosjay commented 1 year ago

我在win10运行客户端(版本:20230206.0),执行命令: .\udp2raw_mp_wepoll.exe -c -l 0.0.0.0:4321 -r 100.64.1.4:1234 -k "passwd" --raw-mode easy-faketcp

出现报错: using system32/wpcap.dll The Winsock 2.2 dll was found okay, _setmaxstdio() was set to 4000 [2023-04-12 17:36:17][INFO]argc=10 .\udp2raw_mp.exe -c -l 0.0.0.0:4321 -r 100.64.1.4:1234 -k passwd --raw-mode easy-faketcp [2023-04-12 17:36:17][INFO]parsing address: 0.0.0.0:4321 [2023-04-12 17:36:17][INFO]its an ipv4 adress [2023-04-12 17:36:17][INFO]ip_address is {0.0.0.0}, port is {4321} [2023-04-12 17:36:17][INFO]parsing address: 100.64.1.4:1234 [2023-04-12 17:36:17][INFO]its an ipv4 adress [2023-04-12 17:36:17][INFO]ip_address is {100.64.1.4}, port is {1234} [2023-04-12 17:36:17][INFO]important variables: log_level=4:INFO raw_mode=faketcp cipher_mode=aes128cbc auth_mode=md5 key=passwd local_addr=0.0.0.0:4321 remote_addr=100.64.1.4:1234 socket_buf_size=1048576 [2023-04-12 17:36:17][INFO]remote_ip=[100.64.1.4], make sure this is a vaild IP address [2023-04-12 17:36:17][INFO]constid:5e5913f [2023-04-12 17:36:17][INFO]--dev have not been set, trying to detect automatically, available devices: [2023-04-12 17:36:17][INFO]available device(device name: ip address ; description): \Device\NPF{CA47546C-C594-4501-BAD9-F4646CB0C456}: [no ip found]; WAN Miniport (Network Monitor) \Device\NPF{C8CB1E0D-4AF7-4B88-9F95-EDA709947FBD}: [no ip found]; WAN Miniport (IPv6) \Device\NPF{724422C0-85C9-4ED9-9982-D9B999961438}: [no ip found]; WAN Miniport (IP) \Device\NPF{A46C4E13-61BD-4B4F-851F-FB1EEBF668A9}: [169.254.68.80] [fe80::869c:b5cf:79a5:7176]; Bluetooth Device (Personal Area Network) \Device\NPF{F56ED26A-CAC4-426D-9DF7-3F6DED916CB4}: [192.168.43.86] [fe80::c63c:fca0:d793:3263] [2409:896c:c30:3687:84:1d1c:6060:a690] [2409:896c:c30:3687:e489:aae4:6f26:7075]; Intel(R) Wireless-AC 9560 160MHz \Device\NPF{68DE72B7-140B-4823-85A6-36532AC5F21C}: [192.168.61.1] [fe80::6ef4:6c7:4015:c9ad]; VMware Virtual Ethernet Adapter for VMnet8 \Device\NPF{DD59A814-A496-473B-915C-74C1063B50D3}: [192.168.157.1] [fe80::9e31:ce24:965:acc1]; VMware Virtual Ethernet Adapter for VMnet1 \Device\NPF{21364E8F-25A5-49C4-BDCC-0FCB11977C98}: [192.168.137.1] [fe80::b715:a3f0:e74a:bdc]; Microsoft Wi-Fi Direct Virtual Adapter #2 \Device\NPF{4DD8F9FF-00A4-4574-B7A2-5A4285CC4214}: [169.254.213.73] [fe80::9b6:fbfe:dab8:3254]; Microsoft Wi-Fi Direct Virtual Adapter \Device\NPF_{37217669-42DA-4657-A55B-0D995D328250}: [100.64.1.1] [fe80::d8ff:5060:f230:9168]; Tailscale Tunnel \Device\NPFLoopback: [::1] [127.0.0.1]; Adapter for loopback traffic capture \Device\NPF{FF6C03B7-C13D-4ABF-9F0D-9BBACDA22CA7}: [172.16.0.122] [169.254.196.221] [fe80::ead0:b579:6154:12d8]; OrayBoxVPN Virtual Ethernet Adapter [2023-04-12 17:36:18][INFO]using device:[\Device\NPF_{37217669-42DA-4657-A55B-0D995D328250}], ip: [100.64.1.1] [2023-04-12 17:36:18][FATAL]unknown pcap link type : 12

其中100.64.1.4是我用tailscale访问NAS的IP地址。 请问是什么原因?以及如何查看日志帮助我定位具体问题?

Jondoe398 commented 1 year ago

我也遇到了同样的问题 起因是使用udp2raw搭配wireguard 一开始npcap 0.9995,会报“no matched device found for ip: xxxx”,该ip是wireguard生成虚拟网卡的ip,而该网卡为ndismediumip类型,npcap 0.9995不支持 于是我安装了npcap1.75,该版本能挂载到wireguard生成的虚拟网卡上,而后出现的问题,也是“unknown pcap link type : 12” 和之前未出现问题的设备对比,发现之前几台设备udp2raw找的IP都是本机主网卡IP,而非wireguard产生的ip,不知道是什么原因导致这两者的区别