From 22277d1fc7fc6ebcc50635b3dc781e14c027fb5b Mon Sep 17 00:00:00 2001 From: Nbelles Date: Wed, 5 Feb 2025 16:10:18 +0100 Subject: [PATCH] Spell check --- CHANGELOG.md | 2 +- docs/about/clients.md | 2 +- hscontrol/db/db.go | 6 +++--- hscontrol/notifier/notifier.go | 2 +- hscontrol/notifier/notifier_test.go | 2 +- hscontrol/policy/acls.go | 6 +++--- hscontrol/poll.go | 4 ++-- hscontrol/types/node.go | 4 ++-- hscontrol/util/dns.go | 2 +- integration/acl_test.go | 2 +- integration/auth_oidc_test.go | 2 +- integration/cli_test.go | 2 +- integration/dns_test.go | 2 +- integration/dockertestutil/network.go | 2 +- integration/dsic/dsic.go | 4 ++-- integration/hsic/config.go | 2 +- integration/hsic/hsic.go | 4 ++-- integration/ssh_test.go | 2 +- integration/tsic/tsic.go | 4 ++-- integration/utils.go | 2 +- 20 files changed, 29 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57b3c8ee..e6fd4eaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -407,7 +407,7 @@ part of adopting [#1460](https://github.com/juanfont/headscale/pull/1460). [#1391](https://github.com/juanfont/headscale/pull/1391) - Improvements on Noise implementation [#1379](https://github.com/juanfont/headscale/pull/1379) -- Replace node filter logic, ensuring nodes with access can see eachother +- Replace node filter logic, ensuring nodes with access can see each other [#1381](https://github.com/juanfont/headscale/pull/1381) - Disable (or delete) both exit routes at the same time [#1428](https://github.com/juanfont/headscale/pull/1428) diff --git a/docs/about/clients.md b/docs/about/clients.md index cb8e4b6d..7cbe6a1b 100644 --- a/docs/about/clients.md +++ b/docs/about/clients.md @@ -10,7 +10,7 @@ headscale. | OpenBSD | Yes | | FreeBSD | Yes | | Windows | Yes (see [docs](../usage/connect/windows.md) and `/windows` on your headscale for more information) | -| Android | Yes (see [docs](../usage/connect/android.md)) | +| Android | Yes (see [docs](../usage/connect/android.md) for more information) | | macOS | Yes (see [docs](../usage/connect/apple.md#macos) and `/apple` on your headscale for more information) | | iOS | Yes (see [docs](../usage/connect/apple.md#ios) and `/apple` on your headscale for more information) | | tvOS | Yes (see [docs](../usage/connect/apple.md#tvos) and `/apple` on your headscale for more information) | diff --git a/hscontrol/db/db.go b/hscontrol/db/db.go index c84ac3f6..591c1c92 100644 --- a/hscontrol/db/db.go +++ b/hscontrol/db/db.go @@ -103,7 +103,7 @@ func NewHeadscaleDatabase( dbConn.Model(&types.Node{}).Where("auth_key_id = ?", 0).Update("auth_key_id", nil) // If the Node table has a column for registered, - // find all occourences of "false" and drop them. Then + // find all occurrences of "false" and drop them. Then // remove the column. if tx.Migrator().HasColumn(&types.Node{}, "registered") { log.Info(). @@ -667,7 +667,7 @@ func openDB(cfg types.DatabaseConfig) (*gorm.DB, error) { } // The pure Go SQLite library does not handle locking in - // the same way as the C based one and we cant use the gorm + // the same way as the C based one and we can't use the gorm // connection pool as of 2022/02/23. sqlDB, _ := db.DB() sqlDB.SetMaxIdleConns(1) @@ -730,7 +730,7 @@ func openDB(cfg types.DatabaseConfig) (*gorm.DB, error) { } func runMigrations(cfg types.DatabaseConfig, dbConn *gorm.DB, migrations *gormigrate.Gormigrate) error { - // Turn off foreign keys for the duration of the migration if using sqllite to + // Turn off foreign keys for the duration of the migration if using sqlite to // prevent data loss due to the way the GORM migrator handles certain schema // changes. if cfg.Type == types.DatabaseSqlite { diff --git a/hscontrol/notifier/notifier.go b/hscontrol/notifier/notifier.go index eb1df73a..166d572d 100644 --- a/hscontrol/notifier/notifier.go +++ b/hscontrol/notifier/notifier.go @@ -153,7 +153,7 @@ func (n *Notifier) IsConnected(nodeID types.NodeID) bool { } // IsLikelyConnected reports if a node is connected to headscale and has a -// poll session open, but doesnt lock, so might be wrong. +// poll session open, but doesn't lock, so might be wrong. func (n *Notifier) IsLikelyConnected(nodeID types.NodeID) bool { if val, ok := n.connected.Load(nodeID); ok { return val diff --git a/hscontrol/notifier/notifier_test.go b/hscontrol/notifier/notifier_test.go index c41e0039..d11bc26c 100644 --- a/hscontrol/notifier/notifier_test.go +++ b/hscontrol/notifier/notifier_test.go @@ -223,7 +223,7 @@ func TestBatcher(t *testing.T) { // so do not run the worker. BatchChangeDelay: time.Hour, - // Since we do not load the config, we wont get the + // Since we do not load the config, we won't get the // default, so set it manually so we dont time out // and have flakes. NotifierSendTimeout: time.Second, diff --git a/hscontrol/policy/acls.go b/hscontrol/policy/acls.go index 9029f63d..3841ec0a 100644 --- a/hscontrol/policy/acls.go +++ b/hscontrol/policy/acls.go @@ -61,7 +61,7 @@ func theInternet() *netipx.IPSet { internetBuilder.RemovePrefix(tsaddr.TailscaleULARange()) internetBuilder.RemovePrefix(tsaddr.CGNATRange()) - // Delete "cant find DHCP networks" + // Delete "can't find DHCP networks" internetBuilder.RemovePrefix(netip.MustParsePrefix("fe80::/10")) // link-local internetBuilder.RemovePrefix(netip.MustParsePrefix("169.254.0.0/16")) @@ -251,7 +251,7 @@ func ReduceFilterRules(node *types.Node, rules []tailcfg.FilterRule) []tailcfg.F DEST_LOOP: for _, dest := range rule.DstPorts { expanded, err := util.ParseIPSet(dest.IP, nil) - // Fail closed, if we cant parse it, then we should not allow + // Fail closed, if we can't parse it, then we should not allow // access. if err != nil { continue DEST_LOOP @@ -934,7 +934,7 @@ func (pol *ACLPolicy) expandIPsFromIPPrefix( build.AddPrefix(prefix) // This is suboptimal and quite expensive, but if we only add the prefix, we will miss all the relevant IPv6 - // addresses for the hosts that belong to tailscale. This doesnt really affect stuff like subnet routers. + // addresses for the hosts that belong to tailscale. This doesn't really affect stuff like subnet routers. for _, node := range nodes { for _, ip := range node.IPs() { // log.Trace(). diff --git a/hscontrol/poll.go b/hscontrol/poll.go index 1eaa4803..88c6288b 100644 --- a/hscontrol/poll.go +++ b/hscontrol/poll.go @@ -156,7 +156,7 @@ func (m *mapSession) serve() { // current configuration. // // If OmitPeers is true, Stream is false, and ReadOnly is false, - // then te server will let clients update their endpoints without + // then the server will let clients update their endpoints without // breaking existing long-polling (Stream == true) connections. // In this case, the server can omit the entire response; the client // only checks the HTTP response status code. @@ -691,7 +691,7 @@ func hostInfoChanged(old, new *tailcfg.Hostinfo) (bool, bool) { } // Services is mostly useful for discovery and not critical, - // except for peerapi, which is how nodes talk to eachother. + // except for peerapi, which is how nodes talk to each other. // If peerapi was not part of the initial mapresponse, we // need to make sure its sent out later as it is needed for // Taildrop. diff --git a/hscontrol/types/node.go b/hscontrol/types/node.go index 62e1fb13..6443ba7d 100644 --- a/hscontrol/types/node.go +++ b/hscontrol/types/node.go @@ -108,7 +108,7 @@ func (node *Node) GivenNameHasBeenChanged() bool { // IsExpired returns whether the node registration has expired. func (node Node) IsExpired() bool { // If Expiry is not set, the client has not indicated that - // it wants an expiry time, it is therefor considered + // it wants an expiry time, it is therefore considered // to mean "not expired" if node.Expiry == nil || node.Expiry.IsZero() { return false @@ -183,7 +183,7 @@ func (node *Node) CanAccess(filter []tailcfg.FilterRule, node2 *Node) bool { src := node.IPs() allowedIPs := node2.IPs() - // TODO(kradalby): Regenerate this everytime the filter change, instead of + // TODO(kradalby): Regenerate this every time the filter change, instead of // every time we use it. matchers := make([]matcher.Match, len(filter)) for i, rule := range filter { diff --git a/hscontrol/util/dns.go b/hscontrol/util/dns.go index 54a9452d..6c4e8a37 100644 --- a/hscontrol/util/dns.go +++ b/hscontrol/util/dns.go @@ -86,7 +86,7 @@ func CheckForFQDNRules(name string) error { } if invalidDNSRegex.MatchString(name) { return fmt.Errorf( - "DNS segment should only be composed of lowercase ASCII letters numbers, hyphen and dots. %v doesn't comply with theses rules: %w", + "DNS segment should only be composed of lowercase ASCII letters numbers, hyphen and dots. %v doesn't comply with these rules: %w", name, ErrInvalidUserName, ) diff --git a/integration/acl_test.go b/integration/acl_test.go index 888110ac..fb6fef93 100644 --- a/integration/acl_test.go +++ b/integration/acl_test.go @@ -124,7 +124,7 @@ func TestACLHostsInNetMapTable(t *testing.T) { }, }, // Test that when we have two users, which cannot see - // eachother, each node has only the number of pairs from + // each other, each node has only the number of pairs from // their own user. "two-isolated-users": { users: map[string]int{ diff --git a/integration/auth_oidc_test.go b/integration/auth_oidc_test.go index f75539be..0c757a2d 100644 --- a/integration/auth_oidc_test.go +++ b/integration/auth_oidc_test.go @@ -218,7 +218,7 @@ func TestOIDCExpireNodesBasedOnTokenExpiry(t *testing.T) { // This is not great, but this sadly is a time dependent test, so the // safe thing to do is wait out the whole TTL time before checking if - // the clients have logged out. The Wait function cant do it itself + // the clients have logged out. The Wait function can't do it itself // as it has an upper bound of 1 min. time.Sleep(shortAccessTTL) diff --git a/integration/cli_test.go b/integration/cli_test.go index e5e93c3c..17c8870d 100644 --- a/integration/cli_test.go +++ b/integration/cli_test.go @@ -1827,7 +1827,7 @@ func TestPolicyBrokenConfigCommand(t *testing.T) { { // This is an unknown action, so it will return an error // and the config will not be applied. - Action: "acccept", + Action: "unknown-action", Sources: []string{"*"}, Destinations: []string{"*:*"}, }, diff --git a/integration/dns_test.go b/integration/dns_test.go index 1ab9370e..1a8b69aa 100644 --- a/integration/dns_test.go +++ b/integration/dns_test.go @@ -348,7 +348,7 @@ func TestValidateResolvConf(t *testing.T) { "HEADSCALE_DNS_BASE_DOMAIN": "all-of.it", "HEADSCALE_DNS_NAMESERVERS_GLOBAL": `8.8.8.8`, "HEADSCALE_DNS_SEARCH_DOMAINS": "test1.no test2.no", - // TODO(kradalby): this currently isnt working, need to fix it + // TODO(kradalby): this currently isn't working, need to fix it // "HEADSCALE_DNS_NAMESERVERS_SPLIT": `{foo.bar.com: ["1.1.1.1"]}`, // "HEADSCALE_DNS_EXTRA_RECORDS": `[{ name: "prometheus.myvpn.example.com", type: "A", value: "100.64.0.4" }]`, }, diff --git a/integration/dockertestutil/network.go b/integration/dockertestutil/network.go index a1e2c627..fbf57fc9 100644 --- a/integration/dockertestutil/network.go +++ b/integration/dockertestutil/network.go @@ -56,7 +56,7 @@ func AddContainerToNetwork( return err } - // TODO(kradalby): This doesnt work reliably, but calling the exact same functions + // TODO(kradalby): This doesn't work reliably, but calling the exact same functions // seem to work fine... // if container, ok := pool.ContainerByName("/" + testContainer); ok { // err := container.ConnectToNetwork(network) diff --git a/integration/dsic/dsic.go b/integration/dsic/dsic.go index f8bb85a9..a3dee180 100644 --- a/integration/dsic/dsic.go +++ b/integration/dsic/dsic.go @@ -163,8 +163,8 @@ func New( runOptions.WorkingDir = dsic.workdir } - // dockertest isnt very good at handling containers that has already - // been created, this is an attempt to make sure this container isnt + // dockertest isn't very good at handling containers that has already + // been created, this is an attempt to make sure this container isn't // present. err = pool.RemoveContainerByName(hostname) if err != nil { diff --git a/integration/hsic/config.go b/integration/hsic/config.go index cf62e3a6..256fbd76 100644 --- a/integration/hsic/config.go +++ b/integration/hsic/config.go @@ -31,7 +31,7 @@ func DefaultConfigEnv() map[string]string { "HEADSCALE_DERP_AUTO_UPDATE_ENABLED": "false", "HEADSCALE_DERP_UPDATE_FREQUENCY": "1m", - // a bunch of tests (ACL/Policy) rely on predicable IP alloc, + // a bunch of tests (ACL/Policy) rely on predictable IP alloc, // so ensure the sequential alloc is used by default. "HEADSCALE_PREFIXES_ALLOCATION": string(types.IPAllocationStrategySequential), } diff --git a/integration/hsic/hsic.go b/integration/hsic/hsic.go index cff703ac..8c888092 100644 --- a/integration/hsic/hsic.go +++ b/integration/hsic/hsic.go @@ -366,8 +366,8 @@ func New( } } - // dockertest isnt very good at handling containers that has already - // been created, this is an attempt to make sure this container isnt + // dockertest isn't very good at handling containers that has already + // been created, this is an attempt to make sure this container isn't // present. err = pool.RemoveContainerByName(hsic.hostname) if err != nil { diff --git a/integration/ssh_test.go b/integration/ssh_test.go index fd45d884..d060831d 100644 --- a/integration/ssh_test.go +++ b/integration/ssh_test.go @@ -37,7 +37,7 @@ var retry = func(times int, sleepInterval time.Duration, } // If we get a permission denied error, we can fail immediately - // since that is something we wont recover from by retrying. + // since that is something we won-t recover from by retrying. if err != nil && isSSHNoAccessStdError(stderr) { return result, stderr, err } diff --git a/integration/tsic/tsic.go b/integration/tsic/tsic.go index c2cb8515..c5a558cb 100644 --- a/integration/tsic/tsic.go +++ b/integration/tsic/tsic.go @@ -263,8 +263,8 @@ func New( tailscaleOptions.WorkingDir = tsic.workdir } - // dockertest isnt very good at handling containers that has already - // been created, this is an attempt to make sure this container isnt + // dockertest isn't very good at handling containers that has already + // been created, this is an attempt to make sure this container isn't // present. err = pool.RemoveContainerByName(hostname) if err != nil { diff --git a/integration/utils.go b/integration/utils.go index 7eee4bf7..1fcdf6c7 100644 --- a/integration/utils.go +++ b/integration/utils.go @@ -261,7 +261,7 @@ func assertValidStatus(t *testing.T, client TailscaleClient) { assert.Truef(t, status.Self.InNetworkMap, "%q is not in network map", client.Hostname()) - // This isnt really relevant for Self as it wont be in its own socket/wireguard. + // This isn't really relevant for Self as it won't be in its own socket/wireguard. // assert.Truef(t, status.Self.InMagicSock, "%q is not tracked by magicsock", client.Hostname()) // assert.Truef(t, status.Self.InEngine, "%q is not in in wireguard engine", client.Hostname())