skywire
skywire copied to clipboard
Add DNS to TUN, in VPN-Client
Did you run make format && make check?
Fixes #993
Changes (Tasks):
- [x] set
-dnsvalue on config and read it when vpn-client run. - [x] modify app put to get
-dnsvalue from UI vpn-client setting dialogue - [x] make change on UI, on skywire vpn ui settings
- [x] make changes on UI, on skywire manager vpn-client setting
needs to add
dnsas another parameter in request, like this:{"pk":"03c46d47ecf7a0041eff843407312e0c8fad1b140037bbadbec7f38c6547a6dade","passcode":"","dns":"1.1.1.1"} - [x] add dns set to tun process on linux
- [x] add dns set to tun process on darwin
- [x] add dns set to tun process on windows
- [ ] setup skywire dns (maybe SKYDNS)
- [x] put skywire dns value on skywire-utilities skyenv
- [ ] put skywire dns value on
conf.skywire.devandconf.skywire.skycoin.com - [x] get dns value during generate config
How to test this PR: Generate Config
- just build
make build, and generate configskywire-cli config gen -t - check vpn-client arguments in config file or in
VPN UI -> Settings -> Custom DNS Server
Test DNS
- remove dns arguments from vpn-client in config file, should be like:
{ "name": "vpn-client", "args": [ "-srv", "03c46d47ecf7a0041eff843407312e0c8fad1b140037bbadbec7f38c6547a6dade" ], "auto_start": false, "port": 43 }, - start vpn-client
- check dns of TUN (in linux and windows) or Wi-Fi (on darwin)
- linux:
nmcli dev show tun0 - windows:
netsh interface ipv4 show config tun0 - darwin:
networksetup -getdnsservers Wi-Fiorcat /etc/resolv.conf
- linux:
- check dns by online tools like DNS leak test
- stop vpn-client, add DNS ip to
VPN UI -> Settings -> Custom DNS Servervalue like1.1.1.1, after that your config should be like this:{ "name": "vpn-client", "args": [ "-srv", "03c46d47ecf7a0041eff843407312e0c8fad1b140037bbadbec7f38c6547a6dade", "-dns", "1.1.1.1" ], "auto_start": false, "port": 43 }, - start vpn again
- check dns of TUN (in linux and windows) or Wi-Fi (on darwin) again
- check dns by online tools again
- stop vpn
- check dns of Wi-Fi (on darwin) again | In windows and linux TUN driver will delete, so nothing to be check be there
Screencasts:
https://user-images.githubusercontent.com/79150699/177663931-d639a467-1257-47d5-9697-7da5b419d8ce.mov