[ad_1]
Is it somehow possible for me to modify the configuration of the windows (in my case windows 7), network adapter with python?
I am subscribed to a VPN provider and just want to change the host name address ocasionally (for example if the current connection to their server starts lagging or died entirely), so I can hop around on their servers without having to use their GUI because it’s too much hardware resource taking. Also I just recently found this: https://stackoverflow.com/a/7581831/15163882 ; it seems to actually modify network adapter settings, the issue is it is not modifying my IPVanish network adapter but the “Local Area Connection” network adapter > IPv4 configuration and all it did so far is bricking my network connection by overwriting it with invalid settings. Can anyone help me point it to the correct adapter, I am struggeling to find a documentation apart from the docs that microsoft provided https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-networkadapterconfiguration
Additionally I did some research through githubs code search and after looking at multiple codes I’m not so sure anymore if it would even be possible to edit the host server address of a network adapter to that way cause a dynamic server switch. Here’s my search term https://github.com/search?l=Python&p=1&q=Win32_NetworkAdapterConfiguration%28&type=Code I came to this conclusion, because none of them have included editing the host name at all. But it could also be, that I’m just missing the point entirely and you don’t even have to in first place set the host name adress(also username, password) through code as you would need to, when connecting through the network adapter manually (initially)?
I also noticed that it would be possible just using openvpn through their cmd interface / powershell, but I’m really trying to save hardware resources on the machine I am trying to configure the network adapter on as it’s very resource limited, so I can’t afford a 150-400 memory taking program running in the background.
[ad_2]