VEthernet icon indicating copy to clipboard operation
VEthernet copied to clipboard

Features with process?

Open nguyentuan3691 opened this issue 6 months ago • 6 comments

How to specify the traffic of one or more processes that must go through VEthernet instead of all, or whitelist one or more process traffic that does not go through VEthernet

nguyentuan3691 avatar Jan 25 '24 12:01 nguyentuan3691

Add system routing table rules to determine which traffic goes through the tun interface and which does not.

And VEthernet already provides the functionality to operate on the operating system's routing table. The interface provided by the Router class is specifically designed for manipulating the routing table. In fact, the tun2socks demo also demonstrates examples of adding and deleting routes. You can refer to that part for reference.

liulilittle avatar Jan 25 '24 17:01 liulilittle

Hello The router only supports working with IP, not with process (my network knowledge is limited) I have edited the source code to map from ip:port to process ID to achieve my wishes. Do you have a version of the VEthernet library built with .net standard 2.0?. I want to build the application with AOT compilation mode to achieve high performance Thanks

nguyentuan3691 avatar Jan 27 '24 16:01 nguyentuan3691

AOT is not supported, this only works on x86.

You can find the C/C++ implementation version of the VEthernet framework from this open source VPN repository. PPP PRIVATE NETWORK™ 2 https://github.com/liulilittle/openppp2

This VEthetnet C# libraries is a VEthernet framework built with PPP PRIVATE NETWORK™ 1 VPN.

This version of C# is restricted to running only on desktop x86, and cannot be compiler optimized, and x64, otherwise the.NET framework will report errors.

The subsequent PPP PRIVATE NETWORK™ 1 has already rewritten part of this framework in C++, of course, this first-generation PPP VPN project is not open source.

liulilittle avatar Jan 27 '24 17:01 liulilittle

Why don't you check the system routing table? If so, it should not, unless the default route of your PC's current network card is 10.0.0.0.

liulilittle avatar Jan 28 '24 15:01 liulilittle

VEthernet framework is now all open source, other C++ compiled library, in my open source warehouse can find the implementation, you this problem, if it is TAP IP, Gateway and your physical network card conflict, you can try to modify VEthernet inside the network card IP, GW-IP to solve.

But you need to pull the code locally first, and manually change the framework to. NET 4.0, because I don't have it here. NET 4.0, I have not used C# for a long time, basically playing C++, the system and tool chain environment this is not complete, but you do not change the framework version to 4.0, now using 4.5.1, for the release of the user's computer requirements are a little high,.NET 4.0 is now basically Windows are come with, But 4.5.1 is not necessarily the case.

liulilittle avatar Jan 28 '24 15:01 liulilittle

From this routing table information, it does not go to in VEthernet.

You try telnet this IP and port will not go to the virtual network card surface?

If it still does, it should be a routing metric priority problem, you can adjust the metric of these IP addresses in the routing table a little higher to try, in the VEthernet code, you can change this metric, there is this interface, you can see the routing related interface

liulilittle avatar Jan 28 '24 16:01 liulilittle