JonathanxD / openaws-vpn-client

Unofficial open-source AWS VPN Client GUI for Linux
Other
62 stars 14 forks source link

read DNS ip address from openvpn output ( fix #3 ) #5

Open FelipeLema opened 1 year ago

FelipeLema commented 1 year ago

fixes https://github.com/JonathanxD/openaws-vpn-client/issues/3

for now, this will read the "here's a DNS ip address you should set to", but I don't know exactly what to do with it. systemd-resolved requires an interface index... which I dunno where to get it from.

JonathanxD commented 1 year ago

Thanks for the contribution, I'll try to look into this and see if I can help.

I came across this documentation and by looking at the samples scripts I have on my machine it seems that we can use the “main interface” id¹ and append the DNS server there, in such a way that it doesn't override the current ones, but serves as a fallback, and this may be enough to resolve intranet addresses (we could also prepend, but honestly idk which one is better).

¹: About this one, we can look at /sys/class/net/ to find the index, but I'm still up to figure out how do we know which one is the main interface, I may need to do more research on this, but we can always fallback and ask NetworkManager to tell us.