Skip to content
This repository has been archived by the owner on Sep 27, 2020. It is now read-only.

无法找到默认网卡的问题 #73

Open
boy119 opened this issue Feb 7, 2020 · 10 comments
Open

无法找到默认网卡的问题 #73

boy119 opened this issue Feb 7, 2020 · 10 comments

Comments

@boy119
Copy link

boy119 commented Feb 7, 2020

您好,win10 64位中node-tap 1.341.34分别测试了Win10Pcap和npcap都报错,使用了您在issues63中提供的debug程序,输出的错误发在这里,请指教,谢谢。
node-tap 1.341.34
win10专业版64位
Win10Pcap-v10.2-5002
[{"name":"{0D49C4AD-C304-4C52-AB0D-CB8BCAA08F7F}","description":"Realtek PCIe GBE Family Controller","type":6,"index":2,"address":{"type":"Buffer","data":[228,17,91,66,250,134]},"dhcpEnable":false,"currentIpAddress":"0.0.0.0","gatewayIpAddress":"0.0.0.0","dhcpServer":"","primaryWinsServer":"","secondaryWinsServer":""},{"name":"{B6D14997-F962-4D09-BE46-76AB77EC5CD5}","description":"Bluetooth Device (Personal Area Network)","type":6,"index":15,"address":{"type":"Buffer","data":[156,183,13,97,51,104]},"dhcpEnable":true,"currentIpAddress":"0.0.0.0","gatewayIpAddress":"0.0.0.0","dhcpServer":"","primaryWinsServer":"","secondaryWinsServer":""},{"name":"{0B3E4076-9F7A-4D39-9926-AFE98D4E64B1}","description":"TAP-Windows Adapter V9","type":6,"index":12,"address":{"type":"Buffer","data":[0,255,11,62,64,118]},"dhcpEnable":false,"currentIpAddress":"10.198.75.60","gatewayIpAddress":"0.0.0.0","dhcpServer":"","primaryWinsServer":"","secondaryWinsServer":""},{"name":"{225B65A1-39B3-4D11-83A3-B7192A9EF7A8}","description":"Qualcomm Atheros AR9285 802.11b|g|n WiFi Adapter","type":71,"index":5,"address":{"type":"Buffer","data":[156,183,13,96,214,112]},"dhcpEnable":true,"currentIpAddress":"192.168.60.106","gatewayIpAddress":"192.168.60.1","dhcpServer":"192.168.60.1","primaryWinsServer":"","secondaryWinsServer":""},{"name":"{74941060-A7D1-44A5-BF8B-AF5994AE6D4E}","description":"Microsoft Wi-Fi Direct Virtual Adapter","type":71,"index":9,"address":{"type":"Buffer","data":[30,183,13,96,214,112]},"dhcpEnable":true,"currentIpAddress":"0.0.0.0","gatewayIpAddress":"0.0.0.0","dhcpServer":"","primaryWinsServer":"","secondaryWinsServer":""}]

[{"destIp":"0.0.0.0","netMask":"0.0.0.0","nextHop":"192.168.60.1","interfaceIndex":5,"type":4,"proto":3,"age":6317,"metric1":200},{"destIp":"40.83.114.103","netMask":"255.255.255.255","nextHop":"192.168.60.1","interfaceIndex":5,"type":4,"proto":3,"age":5841,"metric1":101},{"destIp":"127.0.0.0","netMask":"255.0.0.0","nextHop":"127.0.0.1","interfaceIndex":1,"type":3,"proto":2,"age":15951,"metric1":331},{"destIp":"127.0.0.1","netMask":"255.255.255.255","nextHop":"127.0.0.1","interfaceIndex":1,"type":3,"proto":2,"age":15951,"metric1":331},{"destIp":"127.255.255.255","netMask":"255.255.255.255","nextHop":"127.0.0.1","interfaceIndex":1,"type":3,"proto":2,"age":15951,"metric1":331},{"destIp":"192.168.60.0","netMask":"255.255.255.0","nextHop":"192.168.60.106","interfaceIndex":5,"type":3,"proto":2,"age":6317,"metric1":356},{"destIp":"192.168.60.106","netMask":"255.255.255.255","nextHop":"192.168.60.106","interfaceIndex":5,"type":3,"proto":2,"age":6317,"metric1":356},{"destIp":"192.168.60.255","netMask":"255.255.255.255","nextHop":"192.168.60.106","interfaceIndex":5,"type":3,"proto":2,"age":6317,"metric1":356},{"destIp":"224.0.0.0","netMask":"240.0.0.0","nextHop":"127.0.0.1","interfaceIndex":1,"type":3,"proto":2,"age":15951,"metric1":331},{"destIp":"224.0.0.0","netMask":"240.0.0.0","nextHop":"192.168.60.106","interfaceIndex":5,"type":3,"proto":2,"age":15851,"metric1":356},{"destIp":"224.0.0.0","netMask":"240.0.0.0","nextHop":"0.0.0.0","interfaceIndex":12,"type":3,"proto":2,"age":186,"metric1":257},{"destIp":"255.255.255.255","netMask":"255.255.255.255","nextHop":"127.0.0.1","interfaceIndex":1,"type":3,"proto":2,"age":15951,"metric1":331},{"destIp":"255.255.255.255","netMask":"255.255.255.255","nextHop":"192.168.60.106","interfaceIndex":5,"type":3,"proto":2,"age":15851,"metric1":356},{"destIp":"255.255.255.255","netMask":"255.255.255.255","nextHop":"0.0.0.0","interfaceIndex":12,"type":3,"proto":2,"age":186,"metric1":257}]
IPv6 has been disabled.
netsh interface ipv4 set interface 12 metric=1
netsh interface ipv6 set interface 12 metric=1
netsh interface ipv4 set dnsservers 12 static 8.8.8.8 primary
netsh interface ip set address name=12 static 10.198.75.60 255.255.255.0 10.198.75.61
route delete 0.0.0.0 10.198.75.61
route delete 8.8.8.8 路由删除失败: 找不到元素。
route add 40.83.114.103 mask 255.255.255.255 192.168.60.1 metric 1 路由添加失败: 对象已存在。
route add 40.83.114.103 mask 255.255.255.255 192.168.60.1 metric 1 路由添加失败: 对象已存在。
netsh int ipv6 delete route ::/0 interface=12 nexthop=fd05:5dd5:b158:0b23:0000:0000:0000:0004
netsh int ipv6 delete address interface=12 address=fd05:5dd5:b158:0b23:0000:0000:0000:0005
XTUdp: 20
Default ip of adapter: 192.168.60.106
Default gateway of adapter: 192.168.60.1
Unhandled Rejection at: Promise Promise {
TypeError: device must be a string
at registerXTUdp (C:\snapshot\node-tap\output\filters\TimesUDP.js:0:0)
at Object. (C:\snapshot\node-tap\output\filters\TimesUDP.js:0:0)
at Module._compile (pkg/prelude/bootstrap.js:1243:22)
at Object.Module._extensions..js (module.js:644:10)
at Module.load (module.js:552:32)
at tryModuleLoad (module.js:495:12)
at Function.Module._load (module.js:487:3)
at Module.require (module.js:577:17)
at Module.require (pkg/prelude/bootstrap.js:1153:31)
at require (internal/module.js:11:18) } reason: TypeError: device must be a string
at registerXTUdp (C:\snapshot\node-tap\output\filters\TimesUDP.js:0:0)
at Object. (C:\snapshot\node-tap\output\filters\TimesUDP.js:0:0)
at Module._compile (pkg/prelude/bootstrap.js:1243:22)
at Object.Module._extensions..js (module.js:644:10)
at Module.load (module.js:552:32)
at tryModuleLoad (module.js:495:12)
at Function.Module._load (module.js:487:3)
at Module.require (module.js:577:17)
at Module.require (pkg/prelude/bootstrap.js:1153:31)
at require (internal/module.js:11:18)

node-tap 1.341.34
win10专业版64位
npcap-0.9982-oem
Installing driver...
Install driver successfully.
[{"name":"{0D49C4AD-C304-4C52-AB0D-CB8BCAA08F7F}","description":"Realtek PCIe GBE Family Controller","type":6,"index":2,"address":{"type":"Buffer","data":[228,17,91,66,250,134]},"dhcpEnable":false,"currentIpAddress":"0.0.0.0","gatewayIpAddress":"0.0.0.0","dhcpServer":"","primaryWinsServer":"","secondaryWinsServer":""},{"name":"{B6D14997-F962-4D09-BE46-76AB77EC5CD5}","description":"Bluetooth Device (Personal Area Network)","type":6,"index":15,"address":{"type":"Buffer","data":[156,183,13,97,51,104]},"dhcpEnable":true,"currentIpAddress":"0.0.0.0","gatewayIpAddress":"0.0.0.0","dhcpServer":"","primaryWinsServer":"","secondaryWinsServer":""},{"name":"{F5E31887-0900-418C-82D3-22E96EBB480B}","description":"Npcap Loopback Adapter","type":6,"index":48,"address":{"type":"Buffer","data":[2,0,76,79,79,80]},"dhcpEnable":true,"currentIpAddress":"169.254.45.162","gatewayIpAddress":"0.0.0.0","dhcpServer":"0.0.0.0","primaryWinsServer":"","secondaryWinsServer":""},{"name":"{E8A967AA-A00A-4D36-A853-81C0E7522145}","description":"TAP-Windows Adapter V9","type":6,"index":58,"address":{"type":"Buffer","data":[0,255,232,169,103,170]},"dhcpEnable":true,"currentIpAddress":"0.0.0.0","gatewayIpAddress":"0.0.0.0","dhcpServer":"","primaryWinsServer":"","secondaryWinsServer":""},{"name":"{225B65A1-39B3-4D11-83A3-B7192A9EF7A8}","description":"Qualcomm Atheros AR9285 802.11b|g|n WiFi Adapter","type":71,"index":5,"address":{"type":"Buffer","data":[156,183,13,96,214,112]},"dhcpEnable":true,"currentIpAddress":"192.168.60.106","gatewayIpAddress":"192.168.60.1","dhcpServer":"192.168.60.1","primaryWinsServer":"","secondaryWinsServer":""},{"name":"{74941060-A7D1-44A5-BF8B-AF5994AE6D4E}","description":"Microsoft Wi-Fi Direct Virtual Adapter","type":71,"index":9,"address":{"type":"Buffer","data":[30,183,13,96,214,112]},"dhcpEnable":true,"currentIpAddress":"0.0.0.0","gatewayIpAddress":"0.0.0.0","dhcpServer":"","primaryWinsServer":"","secondaryWinsServer":""}]

[{"destIp":"0.0.0.0","netMask":"0.0.0.0","nextHop":"192.168.60.1","interfaceIndex":5,"type":4,"proto":3,"age":6757,"metric1":200},{"destIp":"40.83.114.103","netMask":"255.255.255.255","nextHop":"192.168.60.1","interfaceIndex":5,"type":4,"proto":3,"age":6282,"metric1":101},{"destIp":"127.0.0.0","netMask":"255.0.0.0","nextHop":"127.0.0.1","interfaceIndex":1,"type":3,"proto":2,"age":16392,"metric1":331},{"destIp":"127.0.0.1","netMask":"255.255.255.255","nextHop":"127.0.0.1","interfaceIndex":1,"type":3,"proto":2,"age":16392,"metric1":331},{"destIp":"127.255.255.255","netMask":"255.255.255.255","nextHop":"127.0.0.1","interfaceIndex":1,"type":3,"proto":2,"age":16392,"metric1":331},{"destIp":"169.254.0.0","netMask":"255.255.0.0","nextHop":"169.254.45.162","interfaceIndex":48,"type":3,"proto":2,"age":3,"metric1":281},{"destIp":"169.254.45.162","netMask":"255.255.255.255","nextHop":"169.254.45.162","interfaceIndex":48,"type":3,"proto":2,"age":3,"metric1":281},{"destIp":"169.254.255.255","netMask":"255.255.255.255","nextHop":"169.254.45.162","interfaceIndex":48,"type":3,"proto":2,"age":3,"metric1":281},{"destIp":"192.168.60.0","netMask":"255.255.255.0","nextHop":"192.168.60.106","interfaceIndex":5,"type":3,"proto":2,"age":6757,"metric1":356},{"destIp":"192.168.60.106","netMask":"255.255.255.255","nextHop":"192.168.60.106","interfaceIndex":5,"type":3,"proto":2,"age":6757,"metric1":356},{"destIp":"192.168.60.255","netMask":"255.255.255.255","nextHop":"192.168.60.106","interfaceIndex":5,"type":3,"proto":2,"age":6757,"metric1":356},{"destIp":"224.0.0.0","netMask":"240.0.0.0","nextHop":"127.0.0.1","interfaceIndex":1,"type":3,"proto":2,"age":16392,"metric1":331},{"destIp":"224.0.0.0","netMask":"240.0.0.0","nextHop":"192.168.60.106","interfaceIndex":5,"type":3,"proto":2,"age":16292,"metric1":356},{"destIp":"224.0.0.0","netMask":"240.0.0.0","nextHop":"169.254.45.162","interfaceIndex":48,"type":3,"proto":2,"age":13,"metric1":281},{"destIp":"224.0.0.0","netMask":"240.0.0.0","nextHop":"0.0.0.0","interfaceIndex":58,"type":3,"proto":2,"age":0,"metric1":291},{"destIp":"255.255.255.255","netMask":"255.255.255.255","nextHop":"127.0.0.1","interfaceIndex":1,"type":3,"proto":2,"age":16392,"metric1":331},{"destIp":"255.255.255.255","netMask":"255.255.255.255","nextHop":"192.168.60.106","interfaceIndex":5,"type":3,"proto":2,"age":16292,"metric1":356},{"destIp":"255.255.255.255","netMask":"255.255.255.255","nextHop":"169.254.45.162","interfaceIndex":48,"type":3,"proto":2,"age":13,"metric1":281},{"destIp":"255.255.255.255","netMask":"255.255.255.255","nextHop":"0.0.0.0","interfaceIndex":58,"type":3,"proto":2,"age":0,"metric1":291}]
IPv6 has been disabled.
netsh interface ipv4 set interface 58 metric=1
netsh interface ipv6 set interface 58 metric=1
netsh interface ipv4 set dnsservers 58 static 8.8.8.8 primary
netsh interface ip set address name=58 static 10.198.75.60 255.255.255.0 10.198.75.61
route delete 0.0.0.0 10.198.75.61
route delete 8.8.8.8 路由删除失败: 找不到元素。
route add 40.83.114.103 mask 255.255.255.255 192.168.60.1 metric 1 路由添加失败: 对象已存在。
route add 40.83.114.103 mask 255.255.255.255 192.168.60.1 metric 1 路由添加失败: 对象已存在。
netsh int ipv6 delete route ::/0 interface=58 nexthop=fd05:5dd5:b158:0b23:0000:0000:0000:0004
netsh int ipv6 delete address interface=58 address=fd05:5dd5:b158:0b23:0000:0000:0000:0005
XTUdp: 20
Default ip of adapter: 192.168.60.106
Default gateway of adapter: 192.168.60.1

@Srar
Copy link
Owner

Srar commented Feb 7, 2020

您好 我看您提供的第二段日志里没有报错, 是这个情况么?

@boy119
Copy link
Author

boy119 commented Feb 7, 2020

是的,卡死在这里,网卡是无法连接的状态,无法上网,用control+c强制结束后恢复上网

@Srar
Copy link
Owner

Srar commented Feb 7, 2020

这样的表现是已经开起来了, 有可能SS配置问题没有连上服务端导致的.

@boy119
Copy link
Author

boy119 commented Feb 7, 2020

您好,使用ssr客户端测试服务器节点可用,更换了服务器节点仍然是这样的错误

@Srar
Copy link
Owner

Srar commented Feb 7, 2020

还有一种情况: 您软件开启后有点击到控制台里面么, 这样会把日志的输出流卡住导致程序卡住.

B247BC97-7BF4-453F-A8D5-13DAC4067832

@boy119
Copy link
Author

boy119 commented Feb 7, 2020

没有这种情况,另外,如果不使用debug的话,最后的输出是这样的:
2020-02-07 18:06:36 [info] 删除路由: 0.0.0.0/0.0.0.0
2020-02-07 18:06:36 [info] 删除路由: 10.198.75.0/255.255.255.0
2020-02-07 18:06:36 [info] 删除路由: 10.198.75.60/255.255.255.255
2020-02-07 18:06:36 [warn] 删除路由失败: 10.198.75.255/255.255.255.255
2020-02-07 18:06:36 [info] IPv6已禁用.
2020-02-07 18:06:36 [info] 执行命令: netsh interface ipv4 set interface 58 metric=1
2020-02-07 18:06:36 [info] 执行命令: netsh interface ipv6 set interface 58 metric=1
2020-02-07 18:06:37 [info] 执行命令: netsh interface ipv4 set dnsservers 58 static 8.8.8.8 primary
2020-02-07 18:06:37 [info] 执行命令: netsh interface ip set address name=58 static 10.198.75.60 255.255.255.0 10.198.75.61
2020-02-07 18:06:37 [info] 执行命令: route delete 0.0.0.0 10.198.75.61
2020-02-07 18:06:37 [warn] 执行命令: route delete 8.8.8.8 错误信息: 路由删除失败: 找不到元素。
2020-02-07 18:06:37 [warn] 执行命令: route add 40.83.114.103 mask 255.255.255.255 192.168.60.1 metric 1 错误信息: 路由添加失
败: 对象已存在。
2020-02-07 18:06:37 [warn] 执行命令: route add 40.83.114.103 mask 255.255.255.255 192.168.60.1 metric 1 错误信息: 路由添加失
败: 对象已存在。
2020-02-07 18:06:38 [info] 执行命令: netsh int ipv6 delete route ::/0 interface=58 nexthop=fd05:5dd5:b158:0b23:0000:0000:000
0:0004
2020-02-07 18:06:38 [info] 执行命令: netsh int ipv6 delete address interface=58 address=fd05:5dd5:b158:0b23:0000:0000:0000:0
005
2020-02-07 18:06:38 [info] 添加路由: 0.0.0.0/0.0.0.0
2020-02-07 18:06:38 [info] UDP多倍发包倍率: 20
2020-02-07 18:06:38 [info] UDP多倍发包网卡IP: 192.168.60.106
2020-02-07 18:06:39 [info] UDP多倍发包网卡: \Device\NPF_{225B65A1-39B3-4D11-83A3-B7192A9EF7A8}
2020-02-07 18:06:39 [info] UDP多倍发包规则: udp and dst port 9999 and dst host 40.83.114.103

@Srar
Copy link
Owner

Srar commented Feb 7, 2020

这个是正常输出没有报错

@boy119
Copy link
Author

boy119 commented Feb 7, 2020

但是无法联网,虚拟网卡也是没有网络连接的状态

@Srar
Copy link
Owner

Srar commented Feb 7, 2020

连接不上服务器可能会导致Windows检测网络失败, 就会出现没有网络连接的状态. 您可以用Wireshark抓包看下啥情况.

@boy119
Copy link
Author

boy119 commented Feb 7, 2020

好的,谢谢

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants