Update
This commit is contained in:
1 parent
3530afb854
commit
6903fcff27
2146 files changed
+112256
-190703
No files matched your search
+39
-18
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Code generated by tailscale/cmd/viewer; DO NOT EDIT.
|
||||
@@ -9,11 +9,13 @@ import (
|
||||
jsonv1 "encoding/json"
|
||||
"errors"
|
||||
"net/netip"
|
||||
"time"
|
||||
|
||||
jsonv2 "github.com/go-json-experiment/json"
|
||||
"github.com/go-json-experiment/json/jsontext"
|
||||
"tailscale.com/drive"
|
||||
"tailscale.com/tailcfg"
|
||||
"tailscale.com/tailcfg/peercap"
|
||||
"tailscale.com/types/opt"
|
||||
"tailscale.com/types/persist"
|
||||
"tailscale.com/types/preftype"
|
||||
@@ -113,7 +115,7 @@ func (v LoginProfileView) Key() StateKey { return v.ж.Key }
|
||||
|
||||
// UserProfile is the server provided UserProfile for this profile.
|
||||
// This is updated whenever the server provides a new UserProfile.
|
||||
func (v LoginProfileView) UserProfile() tailcfg.UserProfile { return v.ж.UserProfile }
|
||||
func (v LoginProfileView) UserProfile() tailcfg.UserProfileView { return v.ж.UserProfile.View() }
|
||||
|
||||
// NodeID is the NodeID of the node that this profile is logged into.
|
||||
// This should be stable across tagging and untagging nodes.
|
||||
@@ -131,6 +133,12 @@ func (v LoginProfileView) LocalUserID() WindowsUserID { return v.ж.LocalUserID
|
||||
// into.
|
||||
func (v LoginProfileView) ControlURL() string { return v.ж.ControlURL }
|
||||
|
||||
// Created is when this profile was first added to this client. It is
|
||||
// stamped once at profile creation and never changes. It is used to sort
|
||||
// the profile list with newest first; profiles created before this field
|
||||
// existed have a zero value and sort after all stamped profiles.
|
||||
func (v LoginProfileView) Created() time.Time { return v.ж.Created }
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _LoginProfileViewNeedsRegeneration = LoginProfile(struct {
|
||||
ID ProfileID
|
||||
@@ -141,6 +149,7 @@ var _LoginProfileViewNeedsRegeneration = LoginProfile(struct {
|
||||
NodeID tailcfg.StableNodeID
|
||||
LocalUserID WindowsUserID
|
||||
ControlURL string
|
||||
Created time.Time
|
||||
}{})
|
||||
|
||||
// View returns a read-only view of Prefs.
|
||||
@@ -283,7 +292,8 @@ func (v PrefsView) InternalExitNodePrior() tailcfg.StableNodeID { return v.ж.In
|
||||
func (v PrefsView) ExitNodeAllowLANAccess() bool { return v.ж.ExitNodeAllowLANAccess }
|
||||
|
||||
// CorpDNS specifies whether to install the Tailscale network's
|
||||
// DNS configuration, if it exists.
|
||||
// DNS configuration, if it exists. It is the internal name for
|
||||
// the "tailscale set --accept-dns=" flag.
|
||||
func (v PrefsView) CorpDNS() bool { return v.ж.CorpDNS }
|
||||
|
||||
// RunSSH bool is whether this node should run an SSH
|
||||
@@ -378,7 +388,7 @@ func (v PrefsView) Sync() opt.Bool { return v.ж.Sync }
|
||||
// network to route Tailscale traffic back to the subnet relay
|
||||
// machine.
|
||||
//
|
||||
// Linux-only.
|
||||
// Linux and FreeBSD only.
|
||||
func (v PrefsView) NoSNAT() bool { return v.ж.NoSNAT }
|
||||
|
||||
// NoStatefulFiltering specifies whether to apply stateful filtering when
|
||||
@@ -432,6 +442,24 @@ func (v PrefsView) PostureChecking() bool { return v.ж.PostureChecking }
|
||||
// Linux-only.
|
||||
func (v PrefsView) NetfilterKind() string { return v.ж.NetfilterKind }
|
||||
|
||||
// RemoteConfig, if true, delegates full remote control of this node's
|
||||
// prefs and LocalAPI to the tailnet admin via the control plane. When
|
||||
// enabled, the control server can read and edit any of this node's
|
||||
// prefs at any time, and invoke any LocalAPI endpoint on this node,
|
||||
// without any further local consent (no CLI or GUI confirmation).
|
||||
//
|
||||
// This is an alternative to Tailscale's default per-feature double
|
||||
// opt-in model, in which both the tailnet admin and the local machine
|
||||
// owner must agree to each individual setting change. RemoteConfig is
|
||||
// a single client-side "I trust the tailnet admin" switch that hands
|
||||
// over full remote management of this node.
|
||||
//
|
||||
// Only enable this when the tailnet admin owns the machine (e.g. a
|
||||
// corporate fleet device) or the local user has explicitly delegated
|
||||
// full control to the tailnet admin. Do NOT enable this on personal
|
||||
// or BYOD devices where the tailnet admin is not fully trusted.
|
||||
func (v PrefsView) RemoteConfig() bool { return v.ж.RemoteConfig }
|
||||
|
||||
// DriveShares are the configured DriveShares, stored in increasing order
|
||||
// by name.
|
||||
func (v PrefsView) DriveShares() views.SliceView[*drive.Share, drive.ShareView] {
|
||||
@@ -453,16 +481,6 @@ func (v PrefsView) RelayServerStaticEndpoints() views.Slice[netip.AddrPort] {
|
||||
return views.SliceOf(v.ж.RelayServerStaticEndpoints)
|
||||
}
|
||||
|
||||
// AllowSingleHosts was a legacy field that was always true
|
||||
// for the past 4.5 years. It controlled whether Tailscale
|
||||
// peers got /32 or /128 routes for each other.
|
||||
// As of 2024-05-17 we're starting to ignore it, but to let
|
||||
// people still downgrade Tailscale versions and not break
|
||||
// all peer-to-peer networking we still write it to disk (as JSON)
|
||||
// so it can be loaded back by old versions.
|
||||
// TODO(bradfitz): delete this in 2025 sometime. See #12058.
|
||||
func (v PrefsView) AllowSingleHosts() marshalAsTrueInJSON { return v.ж.AllowSingleHosts }
|
||||
|
||||
// The Persist field is named 'Config' in the file for backward
|
||||
// compatibility with earlier versions.
|
||||
// TODO(apenwarr): We should move this out of here, it's not a pref.
|
||||
@@ -503,10 +521,10 @@ var _PrefsViewNeedsRegeneration = Prefs(struct {
|
||||
AppConnector AppConnectorPrefs
|
||||
PostureChecking bool
|
||||
NetfilterKind string
|
||||
RemoteConfig bool
|
||||
DriveShares []*drive.Share
|
||||
RelayServerPort *uint16
|
||||
RelayServerStaticEndpoints []netip.AddrPort
|
||||
AllowSingleHosts marshalAsTrueInJSON
|
||||
Persist *persist.Persist
|
||||
}{})
|
||||
|
||||
@@ -807,7 +825,10 @@ func (v TCPPortHandlerView) HTTPS() bool { return v.ж.HTTPS }
|
||||
// It is mutually exclusive with TCPForward.
|
||||
func (v TCPPortHandlerView) HTTP() bool { return v.ж.HTTP }
|
||||
|
||||
// TCPForward is the IP:port to forward TCP connections to.
|
||||
// TCPForward is the address to forward TCP connections to.
|
||||
// It is either a host:port (e.g. "127.0.0.1:3128", "localhost:5432")
|
||||
// or a Unix socket path prefixed with "unix:"
|
||||
// (e.g. "unix:/var/run/app.sock" or "unix:relative.sock").
|
||||
// Whether or not TLS is terminated by tailscaled depends on
|
||||
// TerminateTLS.
|
||||
//
|
||||
@@ -912,7 +933,7 @@ func (v HTTPHandlerView) Proxy() string { return v.ж.Proxy }
|
||||
func (v HTTPHandlerView) Text() string { return v.ж.Text }
|
||||
|
||||
// peer capabilities to forward in grant header, e.g. example.com/cap/mon
|
||||
func (v HTTPHandlerView) AcceptAppCaps() views.Slice[tailcfg.PeerCapability] {
|
||||
func (v HTTPHandlerView) AcceptAppCaps() views.Slice[peercap.Cap] {
|
||||
return views.SliceOf(v.ж.AcceptAppCaps)
|
||||
}
|
||||
|
||||
@@ -930,7 +951,7 @@ var _HTTPHandlerViewNeedsRegeneration = HTTPHandler(struct {
|
||||
Path string
|
||||
Proxy string
|
||||
Text string
|
||||
AcceptAppCaps []tailcfg.PeerCapability
|
||||
AcceptAppCaps []peercap.Cap
|
||||
Redirect string
|
||||
}{})
|
||||
|
||||
|
||||
Reference in new issue
Block a user