Rename module

This commit is contained in:
世界
2025-12-22 12:43:44 +08:00
parent 986d2e6b54
commit e10383cfdb
620 changed files with 2716 additions and 2678 deletions

View File

@@ -18,15 +18,15 @@ import (
"strings"
"time"
"tailscale.com/syncs"
"tailscale.com/types/appctype"
"tailscale.com/types/logger"
"tailscale.com/types/views"
"tailscale.com/util/clientmetric"
"tailscale.com/util/dnsname"
"tailscale.com/util/eventbus"
"tailscale.com/util/execqueue"
"tailscale.com/util/slicesx"
"github.com/sagernet/tailscale/syncs"
"github.com/sagernet/tailscale/types/appctype"
"github.com/sagernet/tailscale/types/logger"
"github.com/sagernet/tailscale/types/views"
"github.com/sagernet/tailscale/util/clientmetric"
"github.com/sagernet/tailscale/util/dnsname"
"github.com/sagernet/tailscale/util/eventbus"
"github.com/sagernet/tailscale/util/execqueue"
"github.com/sagernet/tailscale/util/slicesx"
)
// rateLogger responds to calls to update by adding a count for the current period and

View File

@@ -9,8 +9,8 @@ import (
"net/netip"
"strings"
"github.com/sagernet/tailscale/util/mak"
"golang.org/x/net/dns/dnsmessage"
"tailscale.com/util/mak"
)
// ObserveDNSResponse is a callback invoked by the DNS resolver when a DNS

View File

@@ -16,7 +16,7 @@ import (
"strconv"
"time"
"tailscale.com/client/tailscale/apitype"
"github.com/sagernet/tailscale/client/tailscale/apitype"
)
// DebugPortmapOpts contains options for the [Client.DebugPortmap] command.

View File

@@ -27,23 +27,23 @@ import (
"sync"
"time"
"tailscale.com/client/tailscale/apitype"
"tailscale.com/drive"
"tailscale.com/envknob"
"tailscale.com/feature"
"tailscale.com/feature/buildfeatures"
"tailscale.com/ipn"
"tailscale.com/ipn/ipnstate"
"tailscale.com/net/netutil"
"tailscale.com/net/udprelay/status"
"tailscale.com/paths"
"tailscale.com/safesocket"
"tailscale.com/syncs"
"tailscale.com/tailcfg"
"tailscale.com/types/appctype"
"tailscale.com/types/dnstype"
"tailscale.com/types/key"
"tailscale.com/util/eventbus"
"github.com/sagernet/tailscale/client/tailscale/apitype"
"github.com/sagernet/tailscale/drive"
"github.com/sagernet/tailscale/envknob"
"github.com/sagernet/tailscale/feature"
"github.com/sagernet/tailscale/feature/buildfeatures"
"github.com/sagernet/tailscale/ipn"
"github.com/sagernet/tailscale/ipn/ipnstate"
"github.com/sagernet/tailscale/net/netutil"
"github.com/sagernet/tailscale/net/udprelay/status"
"github.com/sagernet/tailscale/paths"
"github.com/sagernet/tailscale/safesocket"
"github.com/sagernet/tailscale/syncs"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/types/appctype"
"github.com/sagernet/tailscale/types/dnstype"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/util/eventbus"
)
// defaultClient is the default Client when using the legacy

View File

@@ -11,7 +11,7 @@ import (
"fmt"
"net/http"
"tailscale.com/ipn"
"github.com/sagernet/tailscale/ipn"
)
// GetServeConfig return the current serve config.

View File

@@ -9,7 +9,7 @@ import (
"context"
"net/http"
"tailscale.com/util/syspolicy/setting"
"github.com/sagernet/tailscale/util/syspolicy/setting"
)
// GetEffectivePolicy returns the effective policy for the specified scope.

View File

@@ -12,10 +12,10 @@ import (
"fmt"
"net/url"
"tailscale.com/ipn/ipnstate"
"tailscale.com/tka"
"tailscale.com/types/key"
"tailscale.com/types/tkatype"
"github.com/sagernet/tailscale/ipn/ipnstate"
"github.com/sagernet/tailscale/tka"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/types/tkatype"
)
// NetworkLockStatus fetches information about the tailnet key authority, if one is configured.

View File

@@ -28,13 +28,13 @@ import (
ico "github.com/Kodeworks/golang-image-ico"
"github.com/atotto/clipboard"
dbus "github.com/godbus/dbus/v5"
"github.com/sagernet/tailscale/client/local"
"github.com/sagernet/tailscale/ipn"
"github.com/sagernet/tailscale/ipn/ipnstate"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/util/slicesx"
"github.com/sagernet/tailscale/util/stringsx"
"github.com/toqueteos/webbrowser"
"tailscale.com/client/local"
"tailscale.com/ipn"
"tailscale.com/ipn/ipnstate"
"tailscale.com/tailcfg"
"tailscale.com/util/slicesx"
"tailscale.com/util/stringsx"
)
var (

View File

@@ -5,9 +5,9 @@
package apitype
import (
"tailscale.com/tailcfg"
"tailscale.com/types/dnstype"
"tailscale.com/util/ctxkey"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/types/dnstype"
"github.com/sagernet/tailscale/util/ctxkey"
)
// LocalAPIHost is the Host header value used by the LocalAPI.

View File

@@ -9,7 +9,7 @@ import (
"context"
"crypto/tls"
"tailscale.com/client/local"
"github.com/sagernet/tailscale/client/local"
)
// GetCertificate is an alias for [tailscale.com/client/local.GetCertificate].

View File

@@ -14,7 +14,7 @@ import (
"net/http"
"net/url"
"tailscale.com/types/opt"
"github.com/sagernet/tailscale/types/opt"
)
type GetDevicesResponse struct {

View File

@@ -12,7 +12,7 @@ import (
"fmt"
"net/http"
"tailscale.com/client/tailscale/apitype"
"github.com/sagernet/tailscale/client/tailscale/apitype"
)
// DNSNameServers is returned when retrieving the list of nameservers.

View File

@@ -11,7 +11,7 @@ import (
"log"
"net/http"
"tailscale.com/client/local"
"github.com/sagernet/tailscale/client/local"
)
func main() {

View File

@@ -80,7 +80,6 @@ func (c *Client) CreateKey(ctx context.Context, caps KeyCapabilities) (keySecret
//
// The time is truncated to a whole number of seconds. If zero, that means no expiration.
func (c *Client) CreateKeyWithExpiry(ctx context.Context, caps KeyCapabilities, expiry time.Duration) (keySecret string, keyMeta *Key, _ error) {
// convert expirySeconds to an int64 (seconds)
expirySeconds := int64(expiry.Seconds())
if expirySeconds < 0 {

View File

@@ -6,9 +6,9 @@ package tailscale
import (
"context"
"tailscale.com/client/local"
"tailscale.com/client/tailscale/apitype"
"tailscale.com/ipn/ipnstate"
"github.com/sagernet/tailscale/client/local"
"github.com/sagernet/tailscale/client/tailscale/apitype"
"github.com/sagernet/tailscale/ipn/ipnstate"
)
// ErrPeerNotFound is an alias for [tailscale.com/client/local.ErrPeerNotFound].

View File

@@ -10,7 +10,7 @@ import (
"fmt"
"net/http"
"tailscale.com/util/httpm"
"github.com/sagernet/tailscale/util/httpm"
)
// TailnetDeleteRequest handles sending a DELETE request for a tailnet to control.

View File

@@ -15,9 +15,9 @@ import (
"strings"
"time"
"tailscale.com/client/tailscale/apitype"
"tailscale.com/ipn/ipnstate"
"tailscale.com/tailcfg"
"github.com/sagernet/tailscale/client/tailscale/apitype"
"github.com/sagernet/tailscale/ipn/ipnstate"
"github.com/sagernet/tailscale/tailcfg"
)
const (

View File

@@ -13,7 +13,7 @@ import (
"os/exec"
"strings"
"tailscale.com/util/groupmember"
"github.com/sagernet/tailscale/util/groupmember"
)
// authorizeSynology authenticates the logged-in Synology user and verifies

View File

@@ -22,25 +22,25 @@ import (
"sync"
"time"
"tailscale.com/client/local"
"tailscale.com/client/tailscale/apitype"
"tailscale.com/envknob"
"tailscale.com/envknob/featureknob"
"tailscale.com/feature"
"tailscale.com/feature/buildfeatures"
"tailscale.com/hostinfo"
"tailscale.com/ipn"
"tailscale.com/ipn/ipnstate"
"tailscale.com/licenses"
"tailscale.com/net/netutil"
"tailscale.com/net/tsaddr"
"tailscale.com/tailcfg"
"tailscale.com/types/logger"
"tailscale.com/types/views"
"tailscale.com/util/httpm"
"tailscale.com/util/syspolicy/policyclient"
"tailscale.com/version"
"tailscale.com/version/distro"
"github.com/sagernet/tailscale/client/local"
"github.com/sagernet/tailscale/client/tailscale/apitype"
"github.com/sagernet/tailscale/envknob"
"github.com/sagernet/tailscale/envknob/featureknob"
"github.com/sagernet/tailscale/feature"
"github.com/sagernet/tailscale/feature/buildfeatures"
"github.com/sagernet/tailscale/hostinfo"
"github.com/sagernet/tailscale/ipn"
"github.com/sagernet/tailscale/ipn/ipnstate"
"github.com/sagernet/tailscale/licenses"
"github.com/sagernet/tailscale/net/netutil"
"github.com/sagernet/tailscale/net/tsaddr"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/types/logger"
"github.com/sagernet/tailscale/types/views"
"github.com/sagernet/tailscale/util/httpm"
"github.com/sagernet/tailscale/util/syspolicy/policyclient"
"github.com/sagernet/tailscale/version"
"github.com/sagernet/tailscale/version/distro"
)
// ListenPort is the static port used for the web client when run inside tailscaled.
@@ -292,7 +292,6 @@ func (s *Server) csrfProtect(h http.Handler) http.Handler {
}
h.ServeHTTP(w, r)
})
}

View File

@@ -27,13 +27,13 @@ import (
"strconv"
"strings"
"tailscale.com/feature"
"tailscale.com/hostinfo"
"tailscale.com/types/lazy"
"tailscale.com/types/logger"
"tailscale.com/util/cmpver"
"tailscale.com/version"
"tailscale.com/version/distro"
"github.com/sagernet/tailscale/feature"
"github.com/sagernet/tailscale/hostinfo"
"github.com/sagernet/tailscale/types/lazy"
"github.com/sagernet/tailscale/types/logger"
"github.com/sagernet/tailscale/util/cmpver"
"github.com/sagernet/tailscale/version"
"github.com/sagernet/tailscale/version/distro"
)
const (
@@ -507,7 +507,7 @@ func updateDebianAptSourcesList(dstTrack string) (rewrote bool, err error) {
if bytes.Equal(was, newContent) {
return false, nil
}
return true, os.WriteFile(aptSourcesFile, newContent, 0644)
return true, os.WriteFile(aptSourcesFile, newContent, 0o644)
}
func updateDebianAptSourcesListBytes(was []byte, dstTrack string) (newContent []byte, err error) {
@@ -648,7 +648,7 @@ func updateYUMRepoTrack(repoFile, dstTrack string) (rewrote bool, err error) {
if bytes.Equal(was, newContent.Bytes()) {
return false, nil
}
return true, os.WriteFile(repoFile, newContent.Bytes(), 0644)
return true, os.WriteFile(repoFile, newContent.Bytes(), 0o644)
}
func (up *Updater) updateAlpineLike() (err error) {
@@ -898,7 +898,7 @@ func (up *Updater) downloadLinuxTarball(ver string) (string, error) {
dlDir = os.TempDir()
}
dlDir = filepath.Join(dlDir, "tailscale-update")
if err := os.MkdirAll(dlDir, 0700); err != nil {
if err := os.MkdirAll(dlDir, 0o700); err != nil {
return "", err
}
pkgsPath := fmt.Sprintf("%s/tailscale_%s_%s.tgz", up.Track, ver, runtime.GOARCH)
@@ -945,12 +945,12 @@ func (up *Updater) unpackLinuxTarball(path string) error {
switch filepath.Base(th.Name) {
case "tailscale":
files["tailscale"]++
if err := writeFile(tr, tailscale+".new", 0755); err != nil {
if err := writeFile(tr, tailscale+".new", 0o755); err != nil {
return fmt.Errorf("failed extracting the new tailscale binary from %q: %w", path, err)
}
case "tailscaled":
files["tailscaled"]++
if err := writeFile(tr, tailscaled+".new", 0755); err != nil {
if err := writeFile(tr, tailscaled+".new", 0o755); err != nil {
return fmt.Errorf("failed extracting the new tailscaled binary from %q: %w", path, err)
}
}

View File

@@ -8,7 +8,7 @@ package clientupdate
import (
"context"
"tailscale.com/clientupdate/distsign"
"github.com/sagernet/tailscale/clientupdate/distsign"
)
func (up *Updater) downloadURLToFile(pathSrc, fileDst string) (ret error) {

View File

@@ -19,9 +19,9 @@ import (
"time"
"github.com/google/uuid"
"github.com/sagernet/tailscale/util/winutil"
"github.com/sagernet/tailscale/util/winutil/authenticode"
"golang.org/x/sys/windows"
"tailscale.com/util/winutil"
"tailscale.com/util/winutil/authenticode"
)
const (
@@ -133,7 +133,7 @@ you can run the command prompt as Administrator one of these ways:
} else if !fi.IsDir() {
return fmt.Errorf("expected %s to be a directory; got %v", tsDir, fi.Mode())
}
if err := os.MkdirAll(msiDir, 0700); err != nil {
if err := os.MkdirAll(msiDir, 0o700); err != nil {
return err
}
up.cleanupOldDownloads(filepath.Join(msiDir, "*.msi"))
@@ -293,7 +293,7 @@ func (up *Updater) startNewLogFile(baseNamePrefix, baseNameSuffix string) string
time.Now().Format("20060102T150405"), baseNameSuffix)
dir := filepath.Join(os.Getenv("ProgramData"), "Tailscale", "Logs")
if err := os.MkdirAll(dir, 0700); err != nil {
if err := os.MkdirAll(dir, 0o700); err != nil {
up.Logf("failed to create log directory: %v", err)
return filepath.Join(os.TempDir(), baseName)
}

View File

@@ -54,11 +54,11 @@ import (
"time"
"github.com/hdevalence/ed25519consensus"
"github.com/sagernet/tailscale/feature"
"github.com/sagernet/tailscale/types/logger"
"github.com/sagernet/tailscale/util/httpm"
"github.com/sagernet/tailscale/util/must"
"golang.org/x/crypto/blake2s"
"tailscale.com/feature"
"tailscale.com/types/logger"
"tailscale.com/util/httpm"
"tailscale.com/util/must"
)
const (

View File

@@ -16,10 +16,10 @@ import (
"sync"
"time"
"github.com/sagernet/tailscale/syncs"
"github.com/sagernet/tailscale/types/key"
"golang.org/x/crypto/blake2s"
chp "golang.org/x/crypto/chacha20poly1305"
"tailscale.com/syncs"
"tailscale.com/types/key"
)
const (
@@ -375,6 +375,7 @@ type errReadTooBig struct {
func (e errReadTooBig) Error() string {
return fmt.Sprintf("requested read of %d bytes exceeds max allowed Noise frame size", e.requested)
}
func (e errReadTooBig) Temporary() bool {
// permanent error because this error only occurs when our peer
// sends us a frame so large we're unwilling to ever decode it.

View File

@@ -15,12 +15,12 @@ import (
"strconv"
"time"
"github.com/sagernet/tailscale/types/key"
"go4.org/mem"
"golang.org/x/crypto/blake2s"
chp "golang.org/x/crypto/chacha20poly1305"
"golang.org/x/crypto/curve25519"
"golang.org/x/crypto/hkdf"
"tailscale.com/types/key"
)
const (

View File

@@ -56,6 +56,7 @@ func (m *initiationMessage) Length() int { return int(binary.BigEndian.Uint1
func (m *initiationMessage) EphemeralPub() []byte {
return m[initiationHeaderLen : initiationHeaderLen+32]
}
func (m *initiationMessage) MachinePub() []byte {
return m[initiationHeaderLen+32 : initiationHeaderLen+32+48]
}

View File

@@ -12,18 +12,18 @@ import (
"sync/atomic"
"time"
"tailscale.com/net/sockstats"
"tailscale.com/tailcfg"
"tailscale.com/tstime"
"tailscale.com/types/key"
"tailscale.com/types/logger"
"tailscale.com/types/netmap"
"tailscale.com/types/persist"
"tailscale.com/types/structs"
"tailscale.com/util/backoff"
"tailscale.com/util/clientmetric"
"tailscale.com/util/execqueue"
"tailscale.com/util/testenv"
"github.com/sagernet/tailscale/net/sockstats"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/tstime"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/types/logger"
"github.com/sagernet/tailscale/types/netmap"
"github.com/sagernet/tailscale/types/persist"
"github.com/sagernet/tailscale/types/structs"
"github.com/sagernet/tailscale/util/backoff"
"github.com/sagernet/tailscale/util/clientmetric"
"github.com/sagernet/tailscale/util/execqueue"
"github.com/sagernet/tailscale/util/testenv"
)
type LoginGoal struct {

View File

@@ -11,8 +11,8 @@ package controlclient
import (
"context"
"tailscale.com/tailcfg"
"tailscale.com/types/key"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/types/key"
)
// LoginFlags is a bitmask of options to change the behavior of Client.Login

View File

@@ -26,40 +26,40 @@ import (
"sync/atomic"
"time"
"github.com/sagernet/tailscale/control/controlknobs"
"github.com/sagernet/tailscale/control/ts2021"
"github.com/sagernet/tailscale/envknob"
"github.com/sagernet/tailscale/feature"
"github.com/sagernet/tailscale/feature/buildfeatures"
"github.com/sagernet/tailscale/health"
"github.com/sagernet/tailscale/hostinfo"
"github.com/sagernet/tailscale/ipn/ipnstate"
"github.com/sagernet/tailscale/logtail"
"github.com/sagernet/tailscale/net/dnscache"
"github.com/sagernet/tailscale/net/dnsfallback"
"github.com/sagernet/tailscale/net/netmon"
"github.com/sagernet/tailscale/net/netutil"
"github.com/sagernet/tailscale/net/netx"
"github.com/sagernet/tailscale/net/tlsdial"
"github.com/sagernet/tailscale/net/tsdial"
"github.com/sagernet/tailscale/syncs"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/tka"
"github.com/sagernet/tailscale/tstime"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/types/logger"
"github.com/sagernet/tailscale/types/netmap"
"github.com/sagernet/tailscale/types/persist"
"github.com/sagernet/tailscale/types/ptr"
"github.com/sagernet/tailscale/types/tkatype"
"github.com/sagernet/tailscale/util/clientmetric"
"github.com/sagernet/tailscale/util/eventbus"
"github.com/sagernet/tailscale/util/singleflight"
"github.com/sagernet/tailscale/util/syspolicy/pkey"
"github.com/sagernet/tailscale/util/syspolicy/policyclient"
"github.com/sagernet/tailscale/util/testenv"
"github.com/sagernet/tailscale/util/zstdframe"
"go4.org/mem"
"tailscale.com/control/controlknobs"
"tailscale.com/control/ts2021"
"tailscale.com/envknob"
"tailscale.com/feature"
"tailscale.com/feature/buildfeatures"
"tailscale.com/health"
"tailscale.com/hostinfo"
"tailscale.com/ipn/ipnstate"
"tailscale.com/logtail"
"tailscale.com/net/dnscache"
"tailscale.com/net/dnsfallback"
"tailscale.com/net/netmon"
"tailscale.com/net/netutil"
"tailscale.com/net/netx"
"tailscale.com/net/tlsdial"
"tailscale.com/net/tsdial"
"tailscale.com/syncs"
"tailscale.com/tailcfg"
"tailscale.com/tka"
"tailscale.com/tstime"
"tailscale.com/types/key"
"tailscale.com/types/logger"
"tailscale.com/types/netmap"
"tailscale.com/types/persist"
"tailscale.com/types/ptr"
"tailscale.com/types/tkatype"
"tailscale.com/util/clientmetric"
"tailscale.com/util/eventbus"
"tailscale.com/util/singleflight"
"tailscale.com/util/syspolicy/pkey"
"tailscale.com/util/syspolicy/policyclient"
"tailscale.com/util/testenv"
"tailscale.com/util/zstdframe"
)
// Direct is the client that connects to a tailcontrol server for a node.

View File

@@ -20,21 +20,21 @@ import (
"sync"
"time"
"tailscale.com/control/controlknobs"
"tailscale.com/envknob"
"tailscale.com/hostinfo"
"tailscale.com/tailcfg"
"tailscale.com/tstime"
"tailscale.com/types/key"
"tailscale.com/types/logger"
"tailscale.com/types/netmap"
"tailscale.com/types/ptr"
"tailscale.com/types/views"
"tailscale.com/util/clientmetric"
"tailscale.com/util/mak"
"tailscale.com/util/set"
"tailscale.com/util/slicesx"
"tailscale.com/wgengine/filter"
"github.com/sagernet/tailscale/control/controlknobs"
"github.com/sagernet/tailscale/envknob"
"github.com/sagernet/tailscale/hostinfo"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/tstime"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/types/logger"
"github.com/sagernet/tailscale/types/netmap"
"github.com/sagernet/tailscale/types/ptr"
"github.com/sagernet/tailscale/types/views"
"github.com/sagernet/tailscale/util/clientmetric"
"github.com/sagernet/tailscale/util/mak"
"github.com/sagernet/tailscale/util/set"
"github.com/sagernet/tailscale/util/slicesx"
"github.com/sagernet/tailscale/wgengine/filter"
)
// mapSession holds the state over a long-polled "map" request to the

View File

@@ -9,8 +9,8 @@ import (
"fmt"
"time"
"tailscale.com/tailcfg"
"tailscale.com/types/key"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/types/key"
)
var (
@@ -23,7 +23,8 @@ var (
// tailcfg.RegisterRequest.
func HashRegisterRequest(
version tailcfg.SignatureType, ts time.Time, serverURL string, deviceCert []byte,
serverPubKey, machinePubKey key.MachinePublic) ([]byte, error) {
serverPubKey, machinePubKey key.MachinePublic,
) ([]byte, error) {
h := crypto.SHA256.New()
// hash.Hash.Write never returns an error, so we don't check for one here.

View File

@@ -15,11 +15,11 @@ import (
"fmt"
"time"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/util/syspolicy/pkey"
"github.com/sagernet/tailscale/util/syspolicy/policyclient"
"github.com/tailscale/certstore"
"tailscale.com/tailcfg"
"tailscale.com/types/key"
"tailscale.com/util/syspolicy/pkey"
"tailscale.com/util/syspolicy/policyclient"
)
// getMachineCertificateSubject returns the exact name of a Subject that needs

View File

@@ -6,9 +6,9 @@
package controlclient
import (
"tailscale.com/tailcfg"
"tailscale.com/types/key"
"tailscale.com/util/syspolicy/policyclient"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/util/syspolicy/policyclient"
)
// signRegisterRequest on non-supported platforms always returns errNoCertStore.

View File

@@ -6,9 +6,9 @@ package controlclient
import (
"reflect"
"tailscale.com/types/netmap"
"tailscale.com/types/persist"
"tailscale.com/types/structs"
"github.com/sagernet/tailscale/types/netmap"
"github.com/sagernet/tailscale/types/persist"
"github.com/sagernet/tailscale/types/structs"
)
type Status struct {

View File

@@ -36,21 +36,21 @@ import (
"sync/atomic"
"time"
"tailscale.com/control/controlbase"
"tailscale.com/control/controlhttp/controlhttpcommon"
"tailscale.com/envknob"
"tailscale.com/feature"
"tailscale.com/feature/buildfeatures"
"tailscale.com/health"
"tailscale.com/net/dnscache"
"tailscale.com/net/dnsfallback"
"tailscale.com/net/netutil"
"tailscale.com/net/netx"
"tailscale.com/net/sockstats"
"tailscale.com/net/tlsdial"
"tailscale.com/syncs"
"tailscale.com/tailcfg"
"tailscale.com/tstime"
"github.com/sagernet/tailscale/control/controlbase"
"github.com/sagernet/tailscale/control/controlhttp/controlhttpcommon"
"github.com/sagernet/tailscale/envknob"
"github.com/sagernet/tailscale/feature"
"github.com/sagernet/tailscale/feature/buildfeatures"
"github.com/sagernet/tailscale/health"
"github.com/sagernet/tailscale/net/dnscache"
"github.com/sagernet/tailscale/net/dnsfallback"
"github.com/sagernet/tailscale/net/netutil"
"github.com/sagernet/tailscale/net/netx"
"github.com/sagernet/tailscale/net/sockstats"
"github.com/sagernet/tailscale/net/tlsdial"
"github.com/sagernet/tailscale/syncs"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/tstime"
)
var stdDialer net.Dialer
@@ -96,7 +96,6 @@ func (a *Dialer) httpsFallbackDelay() time.Duration {
var _ = envknob.RegisterBool("TS_USE_CONTROL_DIAL_PLAN") // to record at init time whether it's in use
func (a *Dialer) dial(ctx context.Context) (*ClientConn, error) {
a.logPort80Failure.Store(true)
// If we don't have a dial plan, just fall back to dialing the single

View File

@@ -4,7 +4,7 @@
package controlhttp
import (
"tailscale.com/control/controlbase"
"github.com/sagernet/tailscale/control/controlbase"
)
// ClientConn is a Tailscale control client as returned by the Dialer.

View File

@@ -11,9 +11,9 @@ import (
"net/url"
"github.com/coder/websocket"
"tailscale.com/control/controlbase"
"tailscale.com/control/controlhttp/controlhttpcommon"
"tailscale.com/net/wsconn"
"github.com/sagernet/tailscale/control/controlbase"
"github.com/sagernet/tailscale/control/controlhttp/controlhttpcommon"
"github.com/sagernet/tailscale/net/wsconn"
)
// Variant of Dial that tunnels the request over WebSockets, since we cannot do

View File

@@ -9,14 +9,14 @@ import (
"sync/atomic"
"time"
"tailscale.com/health"
"tailscale.com/net/dnscache"
"tailscale.com/net/netmon"
"tailscale.com/net/netx"
"tailscale.com/tailcfg"
"tailscale.com/tstime"
"tailscale.com/types/key"
"tailscale.com/types/logger"
"github.com/sagernet/tailscale/health"
"github.com/sagernet/tailscale/net/dnscache"
"github.com/sagernet/tailscale/net/netmon"
"github.com/sagernet/tailscale/net/netx"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/tstime"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/types/logger"
)
const (

View File

@@ -18,11 +18,11 @@ import (
"time"
"github.com/coder/websocket"
"tailscale.com/control/controlbase"
"tailscale.com/control/controlhttp/controlhttpcommon"
"tailscale.com/net/netutil"
"tailscale.com/net/wsconn"
"tailscale.com/types/key"
"github.com/sagernet/tailscale/control/controlbase"
"github.com/sagernet/tailscale/control/controlhttp/controlhttpcommon"
"github.com/sagernet/tailscale/net/netutil"
"github.com/sagernet/tailscale/net/wsconn"
"github.com/sagernet/tailscale/types/key"
)
// AcceptHTTP upgrades the HTTP request given by w and r into a Tailscale

View File

@@ -10,9 +10,9 @@ import (
"reflect"
"sync/atomic"
"tailscale.com/syncs"
"tailscale.com/tailcfg"
"tailscale.com/types/opt"
"github.com/sagernet/tailscale/syncs"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/types/opt"
)
// Knobs is the set of knobs that the control plane's coordination server can

View File

@@ -19,17 +19,17 @@ import (
"sync"
"time"
"tailscale.com/control/controlhttp"
"tailscale.com/health"
"tailscale.com/net/dnscache"
"tailscale.com/net/netmon"
"tailscale.com/net/tsdial"
"tailscale.com/tailcfg"
"tailscale.com/tstime"
"tailscale.com/types/key"
"tailscale.com/types/logger"
"tailscale.com/util/mak"
"tailscale.com/util/set"
"github.com/sagernet/tailscale/control/controlhttp"
"github.com/sagernet/tailscale/health"
"github.com/sagernet/tailscale/net/dnscache"
"github.com/sagernet/tailscale/net/netmon"
"github.com/sagernet/tailscale/net/tsdial"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/tstime"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/types/logger"
"github.com/sagernet/tailscale/util/mak"
"github.com/sagernet/tailscale/util/set"
)
// Client provides a http.Client to connect to tailcontrol over

View File

@@ -15,8 +15,8 @@ import (
"io"
"sync"
"tailscale.com/control/controlbase"
"tailscale.com/tailcfg"
"github.com/sagernet/tailscale/control/controlbase"
"github.com/sagernet/tailscale/tailcfg"
)
// Conn is a wrapper around controlbase.Conn.

View File

@@ -14,12 +14,12 @@ import (
"sync"
"time"
"github.com/sagernet/tailscale/syncs"
"github.com/sagernet/tailscale/tstime"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/types/logger"
"go4.org/mem"
"golang.org/x/time/rate"
"tailscale.com/syncs"
"tailscale.com/tstime"
"tailscale.com/types/key"
"tailscale.com/types/logger"
)
// Client is a DERP client.

View File

@@ -28,24 +28,24 @@ import (
"sync"
"time"
"github.com/sagernet/tailscale/derp"
"github.com/sagernet/tailscale/derp/derpconst"
"github.com/sagernet/tailscale/envknob"
"github.com/sagernet/tailscale/feature"
"github.com/sagernet/tailscale/feature/buildfeatures"
"github.com/sagernet/tailscale/health"
"github.com/sagernet/tailscale/net/dnscache"
"github.com/sagernet/tailscale/net/netmon"
"github.com/sagernet/tailscale/net/netns"
"github.com/sagernet/tailscale/net/netx"
"github.com/sagernet/tailscale/net/sockstats"
"github.com/sagernet/tailscale/net/tlsdial"
"github.com/sagernet/tailscale/syncs"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/tstime"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/types/logger"
"go4.org/mem"
"tailscale.com/derp"
"tailscale.com/derp/derpconst"
"tailscale.com/envknob"
"tailscale.com/feature"
"tailscale.com/feature/buildfeatures"
"tailscale.com/health"
"tailscale.com/net/dnscache"
"tailscale.com/net/netmon"
"tailscale.com/net/netns"
"tailscale.com/net/netx"
"tailscale.com/net/sockstats"
"tailscale.com/net/tlsdial"
"tailscale.com/syncs"
"tailscale.com/tailcfg"
"tailscale.com/tstime"
"tailscale.com/types/key"
"tailscale.com/types/logger"
)
// Client is a DERP-over-HTTP client.

View File

@@ -8,9 +8,9 @@ import (
"sync"
"time"
"tailscale.com/derp"
"tailscale.com/types/key"
"tailscale.com/types/logger"
"github.com/sagernet/tailscale/derp"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/types/logger"
)
var retryInterval = 5 * time.Second
@@ -49,7 +49,8 @@ var testHookWatchLookConnectResult func(connectError error, wasSelfConnect bool)
// clients are likely still connected and their add message will appear after
// reconnect.
func (c *Client) RunWatchConnectionLoop(ctx context.Context, ignoreServerKey key.NodePublic, infoLogf logger.Logf,
add func(derp.PeerPresentMessage), remove func(derp.PeerGoneMessage), notifyError func(error)) {
add func(derp.PeerPresentMessage), remove func(derp.PeerGoneMessage), notifyError func(error),
) {
if !c.WatchConnectionChanges {
if c.isStarted() {
panic("invalid use of RunWatchConnectionLoop on already-started Client without setting Client.RunWatchConnectionLoop")

View File

@@ -11,7 +11,7 @@ import (
"net"
"github.com/coder/websocket"
"tailscale.com/net/wsconn"
"github.com/sagernet/tailscale/net/wsconn"
)
const canWebsockets = true

View File

@@ -36,25 +36,25 @@ import (
"sync/atomic"
"time"
"github.com/sagernet/tailscale/client/local"
"github.com/sagernet/tailscale/derp"
"github.com/sagernet/tailscale/derp/derpconst"
"github.com/sagernet/tailscale/disco"
"github.com/sagernet/tailscale/envknob"
"github.com/sagernet/tailscale/metrics"
"github.com/sagernet/tailscale/syncs"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/tstime"
"github.com/sagernet/tailscale/tstime/rate"
"github.com/sagernet/tailscale/types/key"
"github.com/sagernet/tailscale/types/logger"
"github.com/sagernet/tailscale/util/ctxkey"
"github.com/sagernet/tailscale/util/mak"
"github.com/sagernet/tailscale/util/set"
"github.com/sagernet/tailscale/util/slicesx"
"github.com/sagernet/tailscale/version"
"go4.org/mem"
"golang.org/x/sync/errgroup"
"tailscale.com/client/local"
"tailscale.com/derp"
"tailscale.com/derp/derpconst"
"tailscale.com/disco"
"tailscale.com/envknob"
"tailscale.com/metrics"
"tailscale.com/syncs"
"tailscale.com/tailcfg"
"tailscale.com/tstime"
"tailscale.com/tstime/rate"
"tailscale.com/types/key"
"tailscale.com/types/logger"
"tailscale.com/util/ctxkey"
"tailscale.com/util/mak"
"tailscale.com/util/set"
"tailscale.com/util/slicesx"
"tailscale.com/version"
)
// verboseDropKeys is the set of destination public keys that should
@@ -1772,7 +1772,6 @@ func (c *sclient) onSendLoopDone() {
return
}
}
}
func (c *sclient) sendLoop(ctx context.Context) error {

View File

@@ -11,7 +11,7 @@ import (
"net"
"time"
"tailscale.com/net/tcpinfo"
"github.com/sagernet/tailscale/net/tcpinfo"
)
func (c *sclient) startStatsLoop(ctx context.Context) {

View File

@@ -9,7 +9,7 @@ import (
"net/http"
"strings"
"tailscale.com/derp"
"github.com/sagernet/tailscale/derp"
)
// Handler returns an http.Handler to be mounted at /derp, serving s.

View File

@@ -23,19 +23,15 @@ const (
prefix = "libbpf-" + libbpfVersion
)
var (
filesToExtract = map[string]struct{}{
prefix + "/LICENSE.BSD-2-Clause": {},
prefix + "/src/bpf_endian.h": {},
prefix + "/src/bpf_helper_defs.h": {},
prefix + "/src/bpf_helpers.h": {},
prefix + "/src/bpf_tracing.h": {},
}
)
var filesToExtract = map[string]struct{}{
prefix + "/LICENSE.BSD-2-Clause": {},
prefix + "/src/bpf_endian.h": {},
prefix + "/src/bpf_helper_defs.h": {},
prefix + "/src/bpf_helpers.h": {},
prefix + "/src/bpf_tracing.h": {},
}
var (
flagDest = flag.String("dest", ".", "destination directory")
)
var flagDest = flag.String("dest", ".", "destination directory")
// TODO(jwhited): go generate strategy for derp/xdp
func main() {

View File

@@ -12,8 +12,7 @@ import (
)
// STUNServer is unimplemented on these platforms, see xdp_linux.go.
type STUNServer struct {
}
type STUNServer struct{}
func NewSTUNServer(config *STUNServerConfig, opts ...STUNServerOption) (*STUNServer, error) {
return nil, errors.New("unimplemented on this GOOS")

View File

@@ -27,8 +27,8 @@ import (
"net/netip"
"time"
"github.com/sagernet/tailscale/types/key"
"go4.org/mem"
"tailscale.com/types/key"
)
// Magic is the 6 byte header of all discovery messages.

View File

@@ -8,8 +8,8 @@ import (
"encoding/binary"
"net/netip"
"tailscale.com/tailcfg"
"tailscale.com/types/key"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/types/key"
)
// ToPCAPFrame marshals the bytes for a pcap record that describe a disco frame.

View File

@@ -9,7 +9,7 @@ import (
"context"
"sync"
"tailscale.com/types/logger"
"github.com/sagernet/tailscale/types/logger"
)
// Check is the interface defining a singular check.

View File

@@ -8,7 +8,7 @@ package ethtool
import (
"context"
"tailscale.com/types/logger"
"github.com/sagernet/tailscale/types/logger"
)
// Check implements the doctor.Check interface.

View File

@@ -10,9 +10,9 @@ import (
"sort"
"github.com/safchain/ethtool"
"tailscale.com/net/netmon"
"tailscale.com/types/logger"
"tailscale.com/util/set"
"github.com/sagernet/tailscale/net/netmon"
"github.com/sagernet/tailscale/types/logger"
"github.com/sagernet/tailscale/util/set"
)
func ethtoolImpl(logf logger.Logf) error {

View File

@@ -8,7 +8,7 @@ package ethtool
import (
"runtime"
"tailscale.com/types/logger"
"github.com/sagernet/tailscale/types/logger"
)
func ethtoolImpl(logf logger.Logf) error {

View File

@@ -11,8 +11,8 @@ import (
"os/user"
"strings"
"github.com/sagernet/tailscale/types/logger"
"golang.org/x/exp/constraints"
"tailscale.com/types/logger"
)
// Check implements the doctor.Check interface.

View File

@@ -6,8 +6,8 @@
package permissions
import (
"github.com/sagernet/tailscale/types/logger"
"golang.org/x/sys/unix"
"tailscale.com/types/logger"
)
func permissionsImpl(logf logger.Logf) error {

View File

@@ -10,8 +10,8 @@ import (
"strings"
"unsafe"
"github.com/sagernet/tailscale/types/logger"
"golang.org/x/sys/unix"
"tailscale.com/types/logger"
)
func permissionsImpl(logf logger.Logf) error {

View File

@@ -8,7 +8,7 @@ package permissions
import (
"runtime"
"tailscale.com/types/logger"
"github.com/sagernet/tailscale/types/logger"
)
func permissionsImpl(logf logger.Logf) error {

View File

@@ -8,8 +8,8 @@ package routetable
import (
"context"
"tailscale.com/net/routetable"
"tailscale.com/types/logger"
"github.com/sagernet/tailscale/net/routetable"
"github.com/sagernet/tailscale/types/logger"
)
// MaxRoutes is the maximum number of routes that will be displayed.

View File

@@ -11,7 +11,7 @@ import (
jsonv2 "github.com/go-json-experiment/json"
"github.com/go-json-experiment/json/jsontext"
"tailscale.com/types/views"
"github.com/sagernet/tailscale/types/views"
)
//go:generate go run tailscale.com/cmd/cloner -clonefunc=true -type=Share

View File

@@ -16,11 +16,11 @@ import (
"strings"
"sync"
"github.com/sagernet/tailscale/drive/driveimpl/dirfs"
"github.com/sagernet/tailscale/drive/driveimpl/shared"
"github.com/sagernet/tailscale/tstime"
"github.com/sagernet/tailscale/types/logger"
"github.com/tailscale/xnet/webdav"
"tailscale.com/drive/driveimpl/dirfs"
"tailscale.com/drive/driveimpl/shared"
"tailscale.com/tstime"
"tailscale.com/types/logger"
)
// Child is a child folder of this compositedav.

View File

@@ -11,7 +11,7 @@ import (
"regexp"
"strings"
"tailscale.com/drive/driveimpl/shared"
"github.com/sagernet/tailscale/drive/driveimpl/shared"
)
var (

View File

@@ -13,12 +13,10 @@ import (
"time"
"github.com/jellydator/ttlcache/v3"
"tailscale.com/drive/driveimpl/shared"
"github.com/sagernet/tailscale/drive/driveimpl/shared"
)
var (
notFound = newCacheEntry(http.StatusNotFound, nil)
)
var notFound = newCacheEntry(http.StatusNotFound, nil)
// StatCache provides a cache for directory listings and file metadata.
// Especially when used from the command-line, mapped WebDAV drives can

View File

@@ -10,8 +10,8 @@ import (
"strings"
"time"
"tailscale.com/drive/driveimpl/shared"
"tailscale.com/tstime"
"github.com/sagernet/tailscale/drive/driveimpl/shared"
"github.com/sagernet/tailscale/tstime"
)
// Child is subdirectory of an FS.

View File

@@ -7,7 +7,7 @@ import (
"context"
"os"
"tailscale.com/drive/driveimpl/shared"
"github.com/sagernet/tailscale/drive/driveimpl/shared"
)
// Mkdir implements webdav.FileSystem. All attempts to Mkdir a directory that

View File

@@ -8,8 +8,8 @@ import (
"io/fs"
"os"
"github.com/sagernet/tailscale/drive/driveimpl/shared"
"github.com/tailscale/xnet/webdav"
"tailscale.com/drive/driveimpl/shared"
)
// OpenFile implements interface webdav.Filesystem.

View File

@@ -8,7 +8,7 @@ import (
"io/fs"
"os"
"tailscale.com/drive/driveimpl/shared"
"github.com/sagernet/tailscale/drive/driveimpl/shared"
)
// Stat implements webdav.FileSystem.

View File

@@ -12,8 +12,8 @@ import (
"net/http"
"sync"
"github.com/sagernet/tailscale/drive/driveimpl/shared"
"github.com/tailscale/xnet/webdav"
"tailscale.com/drive/driveimpl/shared"
)
// FileServer is a standalone WebDAV server that dynamically serves up shares.

View File

@@ -10,10 +10,10 @@ import (
"net/http"
"time"
"tailscale.com/drive"
"tailscale.com/drive/driveimpl/compositedav"
"tailscale.com/drive/driveimpl/dirfs"
"tailscale.com/types/logger"
"github.com/sagernet/tailscale/drive"
"github.com/sagernet/tailscale/drive/driveimpl/compositedav"
"github.com/sagernet/tailscale/drive/driveimpl/dirfs"
"github.com/sagernet/tailscale/types/logger"
)
const (

View File

@@ -22,13 +22,13 @@ import (
"sync"
"time"
"github.com/sagernet/tailscale/drive"
"github.com/sagernet/tailscale/drive/driveimpl/compositedav"
"github.com/sagernet/tailscale/drive/driveimpl/dirfs"
"github.com/sagernet/tailscale/drive/driveimpl/shared"
"github.com/sagernet/tailscale/safesocket"
"github.com/sagernet/tailscale/types/logger"
"github.com/tailscale/xnet/webdav"
"tailscale.com/drive"
"tailscale.com/drive/driveimpl/compositedav"
"tailscale.com/drive/driveimpl/dirfs"
"tailscale.com/drive/driveimpl/shared"
"tailscale.com/safesocket"
"tailscale.com/types/logger"
)
func NewFileSystemForRemote(logf logger.Logf) *FileSystemForRemote {

View File

@@ -65,7 +65,7 @@ func ReadOnlyDirInfo(name string, ts time.Time) *StaticFileInfo {
return &StaticFileInfo{
Named: Base(name),
Sized: 0,
Moded: 0555,
Moded: 0o555,
BirthedTime: ts,
ModdedTime: ts,
Dir: true,

View File

@@ -5,7 +5,7 @@
package drive
import "tailscale.com/version"
import "github.com/sagernet/tailscale/version"
func doAllowShareAs() bool {
// All UNIX platforms use user servers (sub-processes) to access the OS

View File

@@ -31,12 +31,12 @@ import (
"sync/atomic"
"time"
"tailscale.com/feature/buildfeatures"
"tailscale.com/kube/kubetypes"
"tailscale.com/syncs"
"tailscale.com/types/opt"
"tailscale.com/version"
"tailscale.com/version/distro"
"github.com/sagernet/tailscale/feature/buildfeatures"
"github.com/sagernet/tailscale/kube/kubetypes"
"github.com/sagernet/tailscale/syncs"
"github.com/sagernet/tailscale/types/opt"
"github.com/sagernet/tailscale/version"
"github.com/sagernet/tailscale/version/distro"
)
var (

View File

@@ -9,9 +9,9 @@ import (
"errors"
"runtime"
"tailscale.com/envknob"
"tailscale.com/version"
"tailscale.com/version/distro"
"github.com/sagernet/tailscale/envknob"
"github.com/sagernet/tailscale/version"
"github.com/sagernet/tailscale/version/distro"
)
// CanRunTailscaleSSH reports whether serving a Tailscale SSH server is

View File

@@ -8,9 +8,9 @@ package logknob
import (
"sync/atomic"
"tailscale.com/envknob"
"tailscale.com/tailcfg"
"tailscale.com/types/logger"
"github.com/sagernet/tailscale/envknob"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/types/logger"
)
// TODO(andrew-d): should we have a package-global registry of logknobs? It

View File

@@ -7,9 +7,9 @@ package ace
import (
"net/netip"
"tailscale.com/control/controlhttp"
"tailscale.com/net/ace"
"tailscale.com/net/netx"
"github.com/sagernet/tailscale/control/controlhttp"
"github.com/sagernet/tailscale/net/ace"
"github.com/sagernet/tailscale/net/netx"
)
func init() {

View File

@@ -8,8 +8,8 @@ import (
"encoding/json"
"net/http"
"tailscale.com/ipn/ipnlocal"
"tailscale.com/tailcfg"
"github.com/sagernet/tailscale/ipn/ipnlocal"
"github.com/sagernet/tailscale/tailcfg"
)
func init() {

View File

@@ -13,8 +13,8 @@ import (
"os"
"strings"
"tailscale.com/feature/featuretags"
"tailscale.com/util/must"
"github.com/sagernet/tailscale/feature/featuretags"
"github.com/sagernet/tailscale/util/must"
)
const header = `// Copyright (c) Tailscale Inc & AUTHORS
@@ -42,7 +42,7 @@ func main() {
"// Specifically, it's whether the binary was NOT built with the %q build tag.\n"+
"// It's a const so it can be used for dead code elimination.\n"+
"const %s = %t\n",
header, bang, k.OmitTag(), sym, m.Desc, k.OmitTag(), sym, suf == "enabled"), 0644))
header, bang, k.OmitTag(), sym, m.Desc, k.OmitTag(), sym, suf == "enabled"), 0o644))
}
}

View File

@@ -11,10 +11,10 @@ import (
"net/http"
"time"
"tailscale.com/control/controlclient"
"tailscale.com/tailcfg"
"tailscale.com/tempfork/httprec"
"tailscale.com/types/logger"
"github.com/sagernet/tailscale/control/controlclient"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/tempfork/httprec"
"github.com/sagernet/tailscale/types/logger"
)
func init() {

View File

@@ -13,10 +13,10 @@ import (
"sync"
"time"
"tailscale.com/feature"
"tailscale.com/ipn/localapi"
"tailscale.com/net/packet"
"tailscale.com/util/set"
"github.com/sagernet/tailscale/feature"
"github.com/sagernet/tailscale/ipn/localapi"
"github.com/sagernet/tailscale/net/packet"
"github.com/sagernet/tailscale/util/set"
)
func init() {

View File

@@ -20,19 +20,19 @@ import (
"sync"
"time"
"tailscale.com/clientupdate"
"tailscale.com/envknob"
"tailscale.com/feature"
"tailscale.com/ipn"
"tailscale.com/ipn/ipnext"
"tailscale.com/ipn/ipnlocal"
"tailscale.com/ipn/ipnstate"
"tailscale.com/ipn/localapi"
"tailscale.com/tailcfg"
"tailscale.com/types/logger"
"tailscale.com/util/httpm"
"tailscale.com/version"
"tailscale.com/version/distro"
"github.com/sagernet/tailscale/clientupdate"
"github.com/sagernet/tailscale/envknob"
"github.com/sagernet/tailscale/feature"
"github.com/sagernet/tailscale/ipn"
"github.com/sagernet/tailscale/ipn/ipnext"
"github.com/sagernet/tailscale/ipn/ipnlocal"
"github.com/sagernet/tailscale/ipn/ipnstate"
"github.com/sagernet/tailscale/ipn/localapi"
"github.com/sagernet/tailscale/tailcfg"
"github.com/sagernet/tailscale/types/logger"
"github.com/sagernet/tailscale/util/httpm"
"github.com/sagernet/tailscale/version"
"github.com/sagernet/tailscale/version/distro"
)
func init() {
@@ -82,7 +82,6 @@ type extension struct {
func (e *extension) Name() string { return "clientupdate" }
func (e *extension) Init(h ipnext.Host) error {
h.Hooks().ProfileStateChange.Add(e.onChangeProfile)
h.Hooks().BackendStateChange.Add(e.onBackendStateChange)

View File

@@ -10,9 +10,8 @@ import (
// Portmapper is special in that the CLI also needs to link it in,
// so it's pulled out into its own package, rather than using a maybe_*.go
// file in condregister.
_ "tailscale.com/feature/condregister/portmapper"
_ "github.com/sagernet/tailscale/feature/condregister/portmapper"
// HTTP proxy support is also needed by the CLI, and tsnet, so it's its
// own package too.
_ "tailscale.com/feature/condregister/useproxy"
_ "github.com/sagernet/tailscale/feature/condregister/useproxy"
)

View File

@@ -5,4 +5,4 @@
package identityfederation
import _ "tailscale.com/feature/identityfederation"
import _ "github.com/sagernet/tailscale/feature/identityfederation"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/ace"
import _ "github.com/sagernet/tailscale/feature/ace"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/appconnectors"
import _ "github.com/sagernet/tailscale/feature/appconnectors"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/c2n"
import _ "github.com/sagernet/tailscale/feature/c2n"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/capture"
import _ "github.com/sagernet/tailscale/feature/capture"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/clientupdate"
import _ "github.com/sagernet/tailscale/feature/clientupdate"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/debugportmapper"
import _ "github.com/sagernet/tailscale/feature/debugportmapper"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/doctor"
import _ "github.com/sagernet/tailscale/feature/doctor"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/drive"
import _ "github.com/sagernet/tailscale/feature/drive"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/linkspeed"
import _ "github.com/sagernet/tailscale/feature/linkspeed"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/linuxdnsfight"
import _ "github.com/sagernet/tailscale/feature/linuxdnsfight"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/wgengine/router/osrouter"
import _ "github.com/sagernet/tailscale/wgengine/router/osrouter"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/portlist"
import _ "github.com/sagernet/tailscale/feature/portlist"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/posture"
import _ "github.com/sagernet/tailscale/feature/posture"

View File

@@ -5,4 +5,4 @@
package condregister
import _ "tailscale.com/feature/relayserver"
import _ "github.com/sagernet/tailscale/feature/relayserver"

Some files were not shown because too many files have changed in this diff Show More