Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 authored and nblock committed Jan 9, 2025
1 parent fa641e3 commit ede4f97
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ This will also affect the way you

### Changes

- Improved compatibilty of built-in DERP server with clients connecting over
- Improved compatibility of built-in DERP server with clients connecting over
WebSocket [#2132](https://github.com/juanfont/headscale/pull/2132)
- Allow nodes to use SSH agent forwarding
[#2145](https://github.com/juanfont/headscale/pull/2145)
Expand Down Expand Up @@ -262,7 +262,7 @@ part of adopting [#1460](https://github.com/juanfont/headscale/pull/1460).
- `prefixes.allocation` can be set to assign IPs at `sequential` or `random`.
[#1869](https://github.com/juanfont/headscale/pull/1869)
- MagicDNS domains no longer contain usernames []()
- This is in preperation to fix Headscales implementation of tags which
- This is in preparation to fix Headscales implementation of tags which
currently does not correctly remove the link between a tagged device and a
user. As tagged devices will not have a user, this will require a change to
the DNS generation, removing the username, see
Expand Down
4 changes: 2 additions & 2 deletions docs/ref/dns.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# DNS

Headscale supports [most DNS features](../about/features.md) from Tailscale. DNS releated settings can be configured
Headscale supports [most DNS features](../about/features.md) from Tailscale. DNS related settings can be configured
within `dns` section of the [configuration file](./configuration.md).

## Setting extra DNS records

Headscale allows to set extra DNS records which are made available via
[MagicDNS](https://tailscale.com/kb/1081/magicdns). Extra DNS records can be configured either via static entries in the
[configuration file](./configuration.md) or from a JSON file that Headscale continously watches for changes:
[configuration file](./configuration.md) or from a JSON file that Headscale continuously watches for changes:

* Use the `dns.extra_records` option in the [configuration file](./configuration.md) for entries that are static and
don't change while Headscale is running. Those entries are processed when Headscale is starting up and changes to the
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/integration/web-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Headscale doesn't provide a built-in web interface but users may pick one from t
| --------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| headscale-webui | [Github](https://github.com/ifargle/headscale-webui) | A simple headscale web UI for small-scale deployments. |
| headscale-ui | [Github](https://github.com/gurucomputing/headscale-ui) | A web frontend for the headscale Tailscale-compatible coordination server |
| HeadscaleUi | [GitHub](https://github.com/simcu/headscale-ui) | A static headscale admin ui, no backend enviroment required |
| HeadscaleUi | [GitHub](https://github.com/simcu/headscale-ui) | A static headscale admin ui, no backend environment required |
| Headplane | [GitHub](https://github.com/tale/headplane) | An advanced Tailscale inspired frontend for headscale |
| headscale-admin | [Github](https://github.com/GoodiesHQ/headscale-admin) | Headscale-Admin is meant to be a simple, modern web interface for headscale |
| ouroboros | [Github](https://github.com/yellowsink/ouroboros) | Ouroboros is designed for users to manage their own devices, rather than for admins |
Expand Down
4 changes: 2 additions & 2 deletions docs/setup/install/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ README](https://github.com/juanfont/headscale#contributing) for more information
### Install from source

```shell
# Install prerequistes
# Install prerequisites
pkg_add go

git clone https://github.com/juanfont/headscale.git
Expand All @@ -42,7 +42,7 @@ cp headscale /usr/local/sbin
### Install from source via cross compile

```shell
# Install prerequistes
# Install prerequisites
# 1. go v1.20+: headscale newer than 0.21 needs go 1.20+ to compile
# 2. gmake: Makefile in the headscale repo is written in GNU make syntax

Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
checkFlags = ["-short"];

# When updating go.mod or go.sum, a new sha will need to be calculated,
# update this if you have a mismatch after doing a change to thos files.
# update this if you have a mismatch after doing a change to those files.
vendorHash = "sha256-SBfeixT8DQOrK2SWmHHSOBtzRdSZs+pwomHpw6Jd+qc=";

subPackages = ["cmd/headscale"];
Expand Down
6 changes: 3 additions & 3 deletions hscontrol/db/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func RenameNode(tx *gorm.DB,
return fmt.Errorf("renaming node: %w", err)
}

uniq, err := isUnqiueName(tx, newName)
uniq, err := isUniqueName(tx, newName)
if err != nil {
return fmt.Errorf("checking if name is unique: %w", err)
}
Expand Down Expand Up @@ -630,7 +630,7 @@ func generateGivenName(suppliedName string, randomSuffix bool) (string, error) {
return suppliedName, nil
}

func isUnqiueName(tx *gorm.DB, name string) (bool, error) {
func isUniqueName(tx *gorm.DB, name string) (bool, error) {
nodes := types.Nodes{}
if err := tx.
Where("given_name = ?", name).Find(&nodes).Error; err != nil {
Expand All @@ -649,7 +649,7 @@ func ensureUniqueGivenName(
return "", err
}

unique, err := isUnqiueName(tx, givenName)
unique, err := isUniqueName(tx, givenName)
if err != nil {
return "", err
}
Expand Down
6 changes: 3 additions & 3 deletions hscontrol/db/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,10 @@ func SaveNodeRoutes(tx *gorm.DB, node *types.Node) (bool, error) {
return sendUpdate, nil
}

// FailoverNodeRoutesIfNeccessary takes a node and checks if the node's route
// FailoverNodeRoutesIfNecessary takes a node and checks if the node's route
// need to be failed over to another host.
// If needed, the failover will be attempted.
func FailoverNodeRoutesIfNeccessary(
func FailoverNodeRoutesIfNecessary(
tx *gorm.DB,
isLikelyConnected *xsync.MapOf[types.NodeID, bool],
node *types.Node,
Expand Down Expand Up @@ -473,7 +473,7 @@ nodeRouteLoop:
return &types.StateUpdate{
Type: types.StatePeerChanged,
ChangeNodes: chng,
Message: "called from db.FailoverNodeRoutesIfNeccessary",
Message: "called from db.FailoverNodeRoutesIfNecessary",
}, nil
}

Expand Down
4 changes: 2 additions & 2 deletions hscontrol/db/routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func dbForTest(t *testing.T, testName string) *HSDatabase {
return db
}

func TestFailoverNodeRoutesIfNeccessary(t *testing.T) {
func TestFailoverNodeRoutesIfNecessary(t *testing.T) {
su := func(nids ...types.NodeID) *types.StateUpdate {
return &types.StateUpdate{
ChangeNodes: nids,
Expand Down Expand Up @@ -648,7 +648,7 @@ func TestFailoverNodeRoutesIfNeccessary(t *testing.T) {
want := tt.want[step]

got, err := Write(db.DB, func(tx *gorm.DB) (*types.StateUpdate, error) {
return FailoverNodeRoutesIfNeccessary(tx, smap(isConnected), node)
return FailoverNodeRoutesIfNecessary(tx, smap(isConnected), node)
})

if (err != nil) != tt.wantErr {
Expand Down
2 changes: 1 addition & 1 deletion hscontrol/notifier/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (n *Notifier) sendAll(update types.StateUpdate) {
// has shut down the channel and is waiting for the lock held here in RemoveNode.
// This means that there is potential for a deadlock which would stop all updates
// going out to clients. This timeout prevents that from happening by moving on to the
// next node if the context is cancelled. Afther sendAll releases the lock, the add/remove
// next node if the context is cancelled. After sendAll releases the lock, the add/remove
// call will succeed and the update will go to the correct nodes on the next call.
ctx, cancel := context.WithTimeout(context.Background(), n.cfg.Tuning.NotifierSendTimeout)
defer cancel()
Expand Down
2 changes: 1 addition & 1 deletion hscontrol/policy/acls.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func theInternet() *netipx.IPSet {
internetBuilder.RemovePrefix(tsaddr.CGNATRange())

// Delete "cant find DHCP networks"
internetBuilder.RemovePrefix(netip.MustParsePrefix("fe80::/10")) // link-loca
internetBuilder.RemovePrefix(netip.MustParsePrefix("fe80::/10")) // link-local
internetBuilder.RemovePrefix(netip.MustParsePrefix("169.254.0.0/16"))

theInternetSet, _ := internetBuilder.IPSet()
Expand Down
4 changes: 2 additions & 2 deletions hscontrol/poll.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ func (m *mapSession) serveLongPoll() {

func (m *mapSession) pollFailoverRoutes(where string, node *types.Node) {
update, err := db.Write(m.h.db.DB, func(tx *gorm.DB) (*types.StateUpdate, error) {
return db.FailoverNodeRoutesIfNeccessary(tx, m.h.nodeNotifier.LikelyConnectedMap(), node)
return db.FailoverNodeRoutesIfNecessary(tx, m.h.nodeNotifier.LikelyConnectedMap(), node)
})
if err != nil {
m.errf(err, fmt.Sprintf("failed to ensure failover routes, %s", where))
Expand Down Expand Up @@ -453,7 +453,7 @@ func (m *mapSession) handleEndpointUpdate() {
// If there is no NetInfo, keep the previous one.
// From 1.66 the client only sends it if changed:
// https://github.com/tailscale/tailscale/commit/e1011f138737286ecf5123ff887a7a5800d129a2
// TODO(kradalby): evaulate if we need better comparing of hostinfo
// TODO(kradalby): evaluate if we need better comparing of hostinfo
// before we take the changes.
if m.req.Hostinfo.NetInfo == nil && m.node.Hostinfo != nil {
m.req.Hostinfo.NetInfo = m.node.Hostinfo.NetInfo
Expand Down
4 changes: 2 additions & 2 deletions hscontrol/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ func dns() (DNSConfig, error) {
// UnmarshalKey is compatible with Environment Variables.
// err := viper.UnmarshalKey("dns", &dns)
// if err != nil {
// return DNSConfig{}, fmt.Errorf("unmarshaling dns config: %w", err)
// return DNSConfig{}, fmt.Errorf("unmarshalling dns config: %w", err)
// }

dns.MagicDNS = viper.GetBool("dns.magic_dns")
Expand All @@ -632,7 +632,7 @@ func dns() (DNSConfig, error) {

err := viper.UnmarshalKey("dns.extra_records", &extraRecords)
if err != nil {
return DNSConfig{}, fmt.Errorf("unmarshaling dns extra records: %w", err)
return DNSConfig{}, fmt.Errorf("unmarshalling dns extra records: %w", err)
}
dns.ExtraRecords = extraRecords
}
Expand Down

0 comments on commit ede4f97

Please sign in to comment.