J
J
John2021-09-13 16:02:52
VPN
John, 2021-09-13 16:02:52

How to make a separate vpn channel in the application?

I have a xamarin application. Parser torrent sites. However, they are constantly closed by the registry.
I would like to make it so that the application would create a personal vpn channel through which the site was parsed, but playing torrents went through the main channel, not through vpn, so as not to depend on the speed of the vpn server.
Can you tell me how this can be done? and preferably with examples or links to examples.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AlexVWill, 2021-09-13
@AlexVWill

The VPN channel is created not for the application, but for the network interface (or route, if we are talking about IPSec, for example), so when creating a VPN channel, all network traffic goes there.
On Linux, you can create multiple separate network namespaces. In each such space, you can define your own: routes, firewall rules and network devices.
By default, all processes run in the network space - default network namespaces. You can run the application in your network namespaces. Its child processes will inherit this network space.
You can manage such spaces and run processes in them with the command:
ip netns
I don’t know how to deal with the .NET application.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question