zhxie / pcap2socks

Redirect traffic to SOCKS proxy with pcap.
MIT License
631 stars 76 forks source link

能否提供网卡的选项操作参数 #5

Closed test-black closed 3 years ago

test-black commented 3 years ago

写批处理要手动替换还是不太方便

zhxie commented 3 years ago

I considered listing options and waiting for user input when it cannot decide which network interface should be used But since pcap2socks is a CLI tool, unnecessary input should be simplified as much as possible, I chose not to add this function eventually.


我原本考虑过在无法决定使用那张网卡时,列举各可用的网卡并等待用户输入。但考虑到 pcap2socks 是一个 CLI 工具,应当尽可能减少不必要的输入,所以我最后决定不增加此功能。

zhxie commented 3 years ago

In addition, because the problem you described is not very clear, if you want to ask how to select the network interface in parameters, you can refer to here.

// macOS & Linux are usually like this
pcap2socks --interface eth0

// ...and for Windows
./pcap2socks.exe --interface "\Device\NPF_{00000000-0000-0000-0000-000000000000}"

另外,由于你描述的问题并不十分清晰,如果你想问的是网卡参数应当怎么填写的话,你可以参考这里

// macOS 与 Linux 通常如
pcap2socks --interface eth0

// ...而 Windows 则是
./pcap2socks.exe --interface "\Device\NPF_{00000000-0000-0000-0000-000000000000}"
test-black commented 3 years ago

能否像lanplay一样开启所有网卡

snipaste_20210217_203017

zhxie commented 3 years ago

You can fork the repository and add codes. Since listening on all network devices requests more computational capability and brings extra latency, I will not add this function.


你可以 fork 这个项目并添加代码。因为监听所有的网络设备需要更多的算力并带来额外的延时,我不会添加这一功能。

SmRiley commented 2 years ago

In addition, because the problem you described is not very clear, if you want to ask how to select the network interface in parameters, you can refer to here.

// macOS & Linux are usually like this
pcap2socks --interface eth0

// ...and for Windows
./pcap2socks.exe --interface "\Device\NPF_{00000000-0000-0000-0000-000000000000}"

另外,由于你描述的问题并不十分清晰,如果你想问的是网卡参数应当怎么填写的话,你可以参考这里

// macOS 与 Linux 通常如
pcap2socks --interface eth0

// ...而 Windows 则是
./pcap2socks.exe --interface "\Device\NPF_{00000000-0000-0000-0000-000000000000}"

我在windows下使用如您所说的"\Device\NPF_{00000000-0000-0000-0000-000000000000}" 显示无法指定网卡,反而使用形如linux的命令方可使用.请问是否是项目更新中取消了这二者的差异性? image

image

zhxie commented 2 years ago

No, this may be caused by changes in the API of applications such as Npcap or the kernel.


没有,这可能是 Npcap 等应用或内核的 API 变动所致的。

SmRiley commented 2 years ago

No, this may be caused by changes in the API of applications such as Npcap or the kernel.

没有,这可能是 Npcap 等应用或内核的 API 变动所致的。

明白了,我使用的win10Cap.谢谢