-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add DNS to TUN, in VPN-Client #1381
Conversation
just fix the merge conflicts and we can merge this |
@@ -29,6 +29,7 @@ var ( | |||
localSKStr = flag.String("sk", "", "Local SecKey") | |||
passcode = flag.String("passcode", "", "Passcode to authenticate connection") | |||
killswitch = flag.Bool("killswitch", false, "If set, the Internet won't be restored during reconnection attempts") | |||
dnsAddr = flag.String("dns", "", "address of DNS want set to tun") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will come back and fix the flag text. Not sure what the best wording should be.
@@ -610,6 +611,36 @@ func (v *Visor) SetAppPK(appName string, pk cipher.PubKey) error { | |||
return nil | |||
} | |||
|
|||
// SetAppDNS implements API. | |||
func (v *Visor) SetAppDNS(appName string, dnsAddr string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, we are setting the DNS per the app here? I suppose that is useful but it makes me think that the DNS is not settable for the visor process itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Did you run
make format && make check
?Fixes #993
Changes (Tasks):
-dns
value on config and read it when vpn-client run.-dns
value from UI vpn-client setting dialogueneeds to add
dns
as another parameter in request, like this:{"pk":"03c46d47ecf7a0041eff843407312e0c8fad1b140037bbadbec7f38c6547a6dade","passcode":"","dns":"1.1.1.1"}
conf.skywire.dev
andconf.skywire.skycoin.com
How to test this PR:
Generate Config
make build
, and generate configskywire-cli config gen -t
VPN UI -> Settings -> Custom DNS Server
Test DNS
nmcli dev show tun0
netsh interface ipv4 show config tun0
networksetup -getdnsservers Wi-Fi
orcat /etc/resolv.conf
VPN UI -> Settings -> Custom DNS Server
value like1.1.1.1
, after that your config should be like this:Screencasts:
dns-test-final.mov