|
|
@ -18,6 +18,7 @@ import (
|
|
|
|
"tailscale.com/health/healthmsg"
|
|
|
|
"tailscale.com/health/healthmsg"
|
|
|
|
"tailscale.com/ipn"
|
|
|
|
"tailscale.com/ipn"
|
|
|
|
"tailscale.com/ipn/ipnstate"
|
|
|
|
"tailscale.com/ipn/ipnstate"
|
|
|
|
|
|
|
|
"tailscale.com/tailcfg"
|
|
|
|
"tailscale.com/tka"
|
|
|
|
"tailscale.com/tka"
|
|
|
|
"tailscale.com/tstest"
|
|
|
|
"tailscale.com/tstest"
|
|
|
|
"tailscale.com/types/persist"
|
|
|
|
"tailscale.com/types/persist"
|
|
|
@ -834,7 +835,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
flags: []string{},
|
|
|
|
flags: []string{},
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: ipn.DefaultControlURL,
|
|
|
|
ControlURL: ipn.DefaultControlURL,
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
env: upCheckEnv{
|
|
|
|
env: upCheckEnv{
|
|
|
|
backendState: "Stopped",
|
|
|
|
backendState: "Stopped",
|
|
|
@ -846,7 +847,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
flags: []string{},
|
|
|
|
flags: []string{},
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: ipn.DefaultControlURL,
|
|
|
|
ControlURL: ipn.DefaultControlURL,
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
env: upCheckEnv{backendState: "Running"},
|
|
|
|
env: upCheckEnv{backendState: "Running"},
|
|
|
|
wantSimpleUp: true,
|
|
|
|
wantSimpleUp: true,
|
|
|
@ -857,7 +858,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
flags: []string{"--reset"},
|
|
|
|
flags: []string{"--reset"},
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: ipn.DefaultControlURL,
|
|
|
|
ControlURL: ipn.DefaultControlURL,
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
env: upCheckEnv{backendState: "Running"},
|
|
|
|
env: upCheckEnv{backendState: "Running"},
|
|
|
|
wantJustEditMP: &ipn.MaskedPrefs{
|
|
|
|
wantJustEditMP: &ipn.MaskedPrefs{
|
|
|
@ -884,7 +885,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
flags: []string{},
|
|
|
|
flags: []string{},
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
env: upCheckEnv{backendState: "Running"},
|
|
|
|
env: upCheckEnv{backendState: "Running"},
|
|
|
|
wantSimpleUp: true,
|
|
|
|
wantSimpleUp: true,
|
|
|
@ -895,7 +896,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
flags: []string{"--login-server=https://localhost:1000"},
|
|
|
|
flags: []string{"--login-server=https://localhost:1000"},
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
@ -910,7 +911,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
flags: []string{"--advertise-tags=tag:foo"},
|
|
|
|
flags: []string{"--advertise-tags=tag:foo"},
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
@ -944,7 +945,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
flags: []string{"--ssh"},
|
|
|
|
flags: []string{"--ssh"},
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
@ -965,7 +966,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
flags: []string{"--ssh=false"},
|
|
|
|
flags: []string{"--ssh=false"},
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
RunSSH: true,
|
|
|
|
RunSSH: true,
|
|
|
@ -990,7 +991,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
sshOverTailscale: true,
|
|
|
|
sshOverTailscale: true,
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
@ -1014,7 +1015,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
sshOverTailscale: true,
|
|
|
|
sshOverTailscale: true,
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
@ -1037,7 +1038,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
sshOverTailscale: true,
|
|
|
|
sshOverTailscale: true,
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
|
NetfilterMode: preftype.NetfilterOn,
|
|
|
@ -1059,7 +1060,7 @@ func TestUpdatePrefs(t *testing.T) {
|
|
|
|
sshOverTailscale: true,
|
|
|
|
sshOverTailscale: true,
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
curPrefs: &ipn.Prefs{
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
ControlURL: "https://login.tailscale.com",
|
|
|
|
Persist: &persist.Persist{LoginName: "crawshaw.github"},
|
|
|
|
Persist: &persist.Persist{UserProfile: tailcfg.UserProfile{LoginName: "crawshaw.github"}},
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
AllowSingleHosts: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
CorpDNS: true,
|
|
|
|
RunSSH: true,
|
|
|
|
RunSSH: true,
|
|
|
|