mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-31 10:44:07 +09:00
1 parent
beb1214926
commit
8cf43952af
2 files changed
+41
-32
No files matched your search
@@ -75,10 +75,11 @@ func TestTailNode(t *testing.T) {
|
|||||||
MachineAuthorized: true,
|
MachineAuthorized: true,
|
||||||
|
|
||||||
CapMap: tailcfg.NodeCapMap{
|
CapMap: tailcfg.NodeCapMap{
|
||||||
nodecap.Admin: []tailcfg.RawMessage{},
|
nodecap.Admin: []tailcfg.RawMessage{},
|
||||||
nodecap.SSH: []tailcfg.RawMessage{},
|
nodecap.SSH: []tailcfg.RawMessage{},
|
||||||
nodecap.FileSharing: []tailcfg.RawMessage{},
|
nodecap.FileSharing: []tailcfg.RawMessage{},
|
||||||
nodecap.DefaultAutoUpdate: []tailcfg.RawMessage{tailcfg.RawMessage("false")},
|
nodecap.DefaultAutoUpdate: []tailcfg.RawMessage{tailcfg.RawMessage("false")},
|
||||||
|
nodecap.SSHEnvironmentVariables: []tailcfg.RawMessage{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
wantErr: false,
|
wantErr: false,
|
||||||
@@ -164,10 +165,11 @@ func TestTailNode(t *testing.T) {
|
|||||||
MachineAuthorized: true,
|
MachineAuthorized: true,
|
||||||
|
|
||||||
CapMap: tailcfg.NodeCapMap{
|
CapMap: tailcfg.NodeCapMap{
|
||||||
nodecap.Admin: []tailcfg.RawMessage{},
|
nodecap.Admin: []tailcfg.RawMessage{},
|
||||||
nodecap.SSH: []tailcfg.RawMessage{},
|
nodecap.SSH: []tailcfg.RawMessage{},
|
||||||
nodecap.FileSharing: []tailcfg.RawMessage{},
|
nodecap.FileSharing: []tailcfg.RawMessage{},
|
||||||
nodecap.DefaultAutoUpdate: []tailcfg.RawMessage{tailcfg.RawMessage("false")},
|
nodecap.DefaultAutoUpdate: []tailcfg.RawMessage{tailcfg.RawMessage("false")},
|
||||||
|
nodecap.SSHEnvironmentVariables: []tailcfg.RawMessage{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
wantErr: false,
|
wantErr: false,
|
||||||
@@ -189,10 +191,11 @@ func TestTailNode(t *testing.T) {
|
|||||||
MachineAuthorized: true,
|
MachineAuthorized: true,
|
||||||
|
|
||||||
CapMap: tailcfg.NodeCapMap{
|
CapMap: tailcfg.NodeCapMap{
|
||||||
nodecap.Admin: []tailcfg.RawMessage{},
|
nodecap.Admin: []tailcfg.RawMessage{},
|
||||||
nodecap.SSH: []tailcfg.RawMessage{},
|
nodecap.SSH: []tailcfg.RawMessage{},
|
||||||
nodecap.FileSharing: []tailcfg.RawMessage{},
|
nodecap.FileSharing: []tailcfg.RawMessage{},
|
||||||
nodecap.DefaultAutoUpdate: []tailcfg.RawMessage{tailcfg.RawMessage("false")},
|
nodecap.DefaultAutoUpdate: []tailcfg.RawMessage{tailcfg.RawMessage("false")},
|
||||||
|
nodecap.SSHEnvironmentVariables: []tailcfg.RawMessage{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
wantErr: false,
|
wantErr: false,
|
||||||
@@ -276,10 +279,11 @@ func TestTailNodeBaselineGates(t *testing.T) {
|
|||||||
AutoUpdate: types.AutoUpdateConfig{Enabled: false},
|
AutoUpdate: types.AutoUpdateConfig{Enabled: false},
|
||||||
},
|
},
|
||||||
want: tailcfg.NodeCapMap{
|
want: tailcfg.NodeCapMap{
|
||||||
nodecap.Admin: []tailcfg.RawMessage{},
|
nodecap.Admin: []tailcfg.RawMessage{},
|
||||||
nodecap.SSH: []tailcfg.RawMessage{},
|
nodecap.SSH: []tailcfg.RawMessage{},
|
||||||
nodecap.FileSharing: []tailcfg.RawMessage{},
|
nodecap.FileSharing: []tailcfg.RawMessage{},
|
||||||
nodecap.DefaultAutoUpdate: autoUpdate(false),
|
nodecap.DefaultAutoUpdate: autoUpdate(false),
|
||||||
|
nodecap.SSHEnvironmentVariables: []tailcfg.RawMessage{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -289,9 +293,10 @@ func TestTailNodeBaselineGates(t *testing.T) {
|
|||||||
AutoUpdate: types.AutoUpdateConfig{Enabled: false},
|
AutoUpdate: types.AutoUpdateConfig{Enabled: false},
|
||||||
},
|
},
|
||||||
want: tailcfg.NodeCapMap{
|
want: tailcfg.NodeCapMap{
|
||||||
nodecap.Admin: []tailcfg.RawMessage{},
|
nodecap.Admin: []tailcfg.RawMessage{},
|
||||||
nodecap.SSH: []tailcfg.RawMessage{},
|
nodecap.SSH: []tailcfg.RawMessage{},
|
||||||
nodecap.DefaultAutoUpdate: autoUpdate(false),
|
nodecap.DefaultAutoUpdate: autoUpdate(false),
|
||||||
|
nodecap.SSHEnvironmentVariables: []tailcfg.RawMessage{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -301,10 +306,11 @@ func TestTailNodeBaselineGates(t *testing.T) {
|
|||||||
AutoUpdate: types.AutoUpdateConfig{Enabled: true},
|
AutoUpdate: types.AutoUpdateConfig{Enabled: true},
|
||||||
},
|
},
|
||||||
want: tailcfg.NodeCapMap{
|
want: tailcfg.NodeCapMap{
|
||||||
nodecap.Admin: []tailcfg.RawMessage{},
|
nodecap.Admin: []tailcfg.RawMessage{},
|
||||||
nodecap.SSH: []tailcfg.RawMessage{},
|
nodecap.SSH: []tailcfg.RawMessage{},
|
||||||
nodecap.FileSharing: []tailcfg.RawMessage{},
|
nodecap.FileSharing: []tailcfg.RawMessage{},
|
||||||
nodecap.DefaultAutoUpdate: autoUpdate(true),
|
nodecap.DefaultAutoUpdate: autoUpdate(true),
|
||||||
|
nodecap.SSHEnvironmentVariables: []tailcfg.RawMessage{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -315,10 +321,11 @@ func TestTailNodeBaselineGates(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
want: tailcfg.NodeCapMap{
|
want: tailcfg.NodeCapMap{
|
||||||
nodecap.Admin: []tailcfg.RawMessage{},
|
nodecap.Admin: []tailcfg.RawMessage{},
|
||||||
nodecap.SSH: []tailcfg.RawMessage{},
|
nodecap.SSH: []tailcfg.RawMessage{},
|
||||||
nodecap.HTTPS: []tailcfg.RawMessage{},
|
nodecap.HTTPS: []tailcfg.RawMessage{},
|
||||||
nodecap.DefaultAutoUpdate: autoUpdate(false),
|
nodecap.DefaultAutoUpdate: autoUpdate(false),
|
||||||
|
nodecap.SSHEnvironmentVariables: []tailcfg.RawMessage{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -328,9 +335,10 @@ func TestTailNodeBaselineGates(t *testing.T) {
|
|||||||
AutoUpdate: types.AutoUpdateConfig{Enabled: true},
|
AutoUpdate: types.AutoUpdateConfig{Enabled: true},
|
||||||
},
|
},
|
||||||
want: tailcfg.NodeCapMap{
|
want: tailcfg.NodeCapMap{
|
||||||
nodecap.Admin: []tailcfg.RawMessage{},
|
nodecap.Admin: []tailcfg.RawMessage{},
|
||||||
nodecap.SSH: []tailcfg.RawMessage{},
|
nodecap.SSH: []tailcfg.RawMessage{},
|
||||||
nodecap.DefaultAutoUpdate: autoUpdate(true),
|
nodecap.DefaultAutoUpdate: autoUpdate(true),
|
||||||
|
nodecap.SSHEnvironmentVariables: []tailcfg.RawMessage{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1372,8 +1372,9 @@ func (nv NodeView) TailNode(
|
|||||||
// cfg.DNSConfig.Certificates.Enabled gates HTTPS, without which
|
// cfg.DNSConfig.Certificates.Enabled gates HTTPS, without which
|
||||||
// `tailscale serve` refuses to serve HTTPS.
|
// `tailscale serve` refuses to serve HTTPS.
|
||||||
capMap := tailcfg.NodeCapMap{
|
capMap := tailcfg.NodeCapMap{
|
||||||
nodecap.Admin: []tailcfg.RawMessage{},
|
nodecap.Admin: []tailcfg.RawMessage{},
|
||||||
nodecap.SSH: []tailcfg.RawMessage{},
|
nodecap.SSH: []tailcfg.RawMessage{},
|
||||||
|
nodecap.SSHEnvironmentVariables: []tailcfg.RawMessage{},
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.Taildrop.Enabled {
|
if cfg.Taildrop.Enabled {
|
||||||
|
|||||||
Reference in new issue
Block a user