Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features with process? #8

Open
nguyentuan3691 opened this issue Jan 25, 2024 · 6 comments
Open

Features with process? #8

nguyentuan3691 opened this issue Jan 25, 2024 · 6 comments

Comments

@nguyentuan3691
Copy link

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

@liulilittle
Copy link
Owner

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.

@nguyentuan3691
Copy link
Author

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

@liulilittle
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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

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

No branches or pull requests

2 participants