Skip to content

Commit 64798ec

Browse files
authored
Merge pull request #5 from coder/colin/update-ts-real
2 parents 2d6503f + 990f985 commit 64798ec

File tree

886 files changed

+25487
-9856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

886 files changed

+25487
-9856
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ body:
1212
attributes:
1313
label: What is the issue?
1414
description: What happened? What did you expect to happen?
15-
placeholder: oh no
1615
validations:
1716
required: true
1817
- type: textarea
@@ -61,6 +60,13 @@ body:
6160
placeholder: e.g., 1.14.4
6261
validations:
6362
required: false
63+
- type: textarea
64+
id: other-software
65+
attributes:
66+
label: Other software
67+
description: What [other software](https://github.com/tailscale/tailscale/wiki/OtherSoftwareInterop) (networking, security, etc) are you running?
68+
validations:
69+
required: false
6470
- type: input
6571
id: bug-report
6672
attributes:

.github/workflows/cifuzz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: CIFuzz
2-
on: [pull_request]
2+
on: [] # was: [pull_request], but disabled in https://github.com/tailscale/tailscale/pull/7156
33

44
concurrency:
55
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
# Initializes the CodeQL tools for scanning.
4949
- name: Initialize CodeQL
50-
uses: github/codeql-action/init@v1
50+
uses: github/codeql-action/init@v2
5151
with:
5252
languages: ${{ matrix.language }}
5353
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
5858
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below)
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@v1
61+
uses: github/codeql-action/autobuild@v2
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 https://git.io/JvXDl
@@ -72,4 +72,4 @@ jobs:
7272
# make release
7373

7474
- name: Perform CodeQL Analysis
75-
uses: github/codeql-action/analyze@v1
75+
uses: github/codeql-action/analyze@v2

.github/workflows/cross-loong64.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Loongnix-Cross
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '*'
10+
- 'release-branch/*'
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
21+
22+
steps:
23+
- name: Check out code into the Go module directory
24+
uses: actions/checkout@v3
25+
26+
- name: Set up Go
27+
uses: actions/setup-go@v3
28+
with:
29+
go-version-file: go.mod
30+
id: go
31+
32+
- name: Loongnix build cmd
33+
env:
34+
GOOS: linux
35+
GOARCH: loong64
36+
run: go build ./cmd/...
37+
38+
- name: Loongnix build tests
39+
env:
40+
GOOS: linux
41+
GOARCH: loong64
42+
run: for d in $(go list -f '{{if .TestGoFiles}}{{.Dir}}{{end}}' ./... ); do (echo $d; cd $d && go test -c ); done
43+
44+
- uses: k0kubun/action-slack@v2.0.0
45+
with:
46+
payload: |
47+
{
48+
"attachments": [{
49+
"text": "${{ job.status }}: ${{ github.workflow }} <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ env.COMMIT_DATE }} #${{ env.COMMIT_NUMBER_OF_DAY }}> " +
50+
"(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
51+
"of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
52+
"color": "danger"
53+
}]
54+
}
55+
env:
56+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
57+
if: failure() && github.event_name == 'push'

.github/workflows/linux-race.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ jobs:
2929
go-version-file: go.mod
3030
id: go
3131

32+
- name: Build test wrapper
33+
run: ./tool/go build -o /tmp/testwrapper ./cmd/testwrapper
34+
3235
- name: Basic build
3336
run: go build ./cmd/...
3437

3538
- name: Run tests and benchmarks with -race flag on linux
36-
run: go test -race -bench=. -benchtime=1x ./...
39+
run: go test -exec=/tmp/testwrapper -race -bench=. -benchtime=1x ./...
3740

3841
- name: Check that no tracked files in the repo have been modified
3942
run: git diff --no-ext-diff --name-only --exit-code || (echo "Build/test modified the files above."; exit 1)

.github/workflows/linux.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515

1616
jobs:
1717
build:
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-22.04
1919

2020
if: "!contains(github.event.head_commit.message, '[ci skip]')"
2121

@@ -32,22 +32,21 @@ jobs:
3232
- name: Basic build
3333
run: go build ./cmd/...
3434

35+
- name: Build test wrapper
36+
run: ./tool/go build -o /tmp/testwrapper ./cmd/testwrapper
37+
3538
- name: Build variants
3639
run: |
3740
go install --tags=ts_include_cli ./cmd/tailscaled
3841
go install --tags=ts_omit_aws ./cmd/tailscaled
3942
4043
- name: Get QEMU
4144
run: |
42-
# The qemu in Ubuntu 20.04 (Focal) is too old; we need 5.x something
43-
# to run Go binaries. 5.2.0 (Debian bullseye) empirically works, and
44-
# use this PPA which brings in a modern qemu.
45-
sudo add-apt-repository -y ppa:jacob/virtualisation
4645
sudo apt-get -y update
4746
sudo apt-get -y install qemu-user
4847
4948
- name: Run tests on linux
50-
run: go test -bench=. -benchtime=1x ./...
49+
run: go test -exec=/tmp/testwrapper -bench=. -benchtime=1x ./...
5150

5251
- name: Check that no tracked files in the repo have been modified
5352
run: git diff --no-ext-diff --name-only --exit-code || (echo "Build/test modified the files above."; exit 1)

.github/workflows/static-analysis.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
with:
2525
go-version-file: go.mod
2626
- name: Run gofmt (goimports)
27-
run: go run golang.org/x/tools/cmd/goimports -d --format-only .
27+
run: |
28+
OUT=$(go run golang.org/x/tools/cmd/goimports -d --format-only .)
29+
[ -z "$OUT" ] || (echo "Not gofmt'ed: $OUT" && exit 1)
2830
- uses: k0kubun/action-slack@v2.0.0
2931
with:
3032
payload: |
@@ -43,14 +45,17 @@ jobs:
4345
vet:
4446
runs-on: ubuntu-latest
4547
steps:
48+
- name: Check out code
49+
uses: actions/checkout@v3
50+
4651
- name: Set up Go
4752
uses: actions/setup-go@v3
4853
with:
49-
go-version: 1.19
50-
- name: Check out code
51-
uses: actions/checkout@v3
54+
go-version-file: go.mod
55+
5256
- name: Run go vet
5357
run: go vet ./...
58+
5459
- uses: k0kubun/action-slack@v2.0.0
5560
with:
5661
payload: |
@@ -77,13 +82,14 @@ jobs:
7782
goarch: 386
7883

7984
steps:
85+
- name: Check out code
86+
uses: actions/checkout@v3
87+
8088
- name: Set up Go
8189
uses: actions/setup-go@v3
8290
with:
83-
go-version: 1.19
91+
go-version-file: go.mod
8492

85-
- name: Check out code
86-
uses: actions/checkout@v3
8793

8894
- name: Install staticcheck
8995
run: "GOBIN=~/.local/bin go install honnef.co/go/tools/cmd/staticcheck"

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ cmd/tailscaled/tailscaled
2222
# direnv config, this may be different for other people so it's probably safer
2323
# to make this nonspecific.
2424
.envrc
25+
26+
# Ignore personal VS Code settings
27+
.vscode/
28+
29+
# Ignore direnv nix-shell environment cache
30+
.direnv/

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved.
2-
# Use of this source code is governed by a BSD-style
3-
# license that can be found in the LICENSE file.
1+
# Copyright (c) Tailscale Inc & AUTHORS
2+
# SPDX-License-Identifier: BSD-3-Clause
43

54
############################################################################
65
#
@@ -32,7 +31,7 @@
3231
# $ docker exec tailscaled tailscale status
3332

3433

35-
FROM golang:1.19-alpine AS build-env
34+
FROM golang:1.20-alpine AS build-env
3635

3736
WORKDIR /go/src/tailscale
3837

Dockerfile.base

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
2-
# Use of this source code is governed by a BSD-style
3-
# license that can be found in the LICENSE file.
1+
# Copyright (c) Tailscale Inc & AUTHORS
2+
# SPDX-License-Identifier: BSD-3-Clause
43

54
FROM alpine:3.16
65
RUN apk add --no-cache ca-certificates iptables iproute2 ip6tables

LICENSE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2020 Tailscale & AUTHORS.
4-
All rights reserved.
3+
Copyright (c) 2020 Tailscale Inc & AUTHORS.
54

65
Redistribution and use in source and binary forms, with or without
76
modification, are permitted provided that the following conditions are met:

Makefile

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ tidy:
1212
./tool/go mod tidy
1313

1414
updatedeps:
15-
./tool/go run github.com/tailscale/depaware --update \
15+
# depaware (via x/tools/go/packages) shells back to "go", so make sure the "go"
16+
# it finds in its $$PATH is the right one.
17+
PATH="$$(./tool/go env GOROOT)/bin:$$PATH" ./tool/go run github.com/tailscale/depaware --update \
1618
tailscale.com/cmd/tailscaled \
1719
tailscale.com/cmd/tailscale \
1820
tailscale.com/cmd/derper
1921

2022
depaware:
21-
./tool/go run github.com/tailscale/depaware --check \
23+
# depaware (via x/tools/go/packages) shells back to "go", so make sure the "go"
24+
# it finds in its $$PATH is the right one.
25+
PATH="$$(./tool/go env GOROOT)/bin:$$PATH" ./tool/go run github.com/tailscale/depaware --check \
2226
tailscale.com/cmd/tailscaled \
2327
tailscale.com/cmd/tailscale \
2428
tailscale.com/cmd/derper
@@ -35,6 +39,9 @@ buildlinuxarm:
3539
buildwasm:
3640
GOOS=js GOARCH=wasm ./tool/go install ./cmd/tsconnect/wasm ./cmd/tailscale/cli
3741

42+
buildlinuxloong64:
43+
GOOS=linux GOARCH=loong64 ./tool/go install tailscale.com/cmd/tailscale tailscale.com/cmd/tailscaled
44+
3845
buildmultiarchimage:
3946
./build_docker.sh
4047

@@ -59,4 +66,14 @@ publishdevimage:
5966
@test -n "${REPO}" || (echo "REPO=... required; e.g. REPO=ghcr.io/${USER}/tailscale" && exit 1)
6067
@test "${REPO}" != "tailscale/tailscale" || (echo "REPO=... must not be tailscale/tailscale" && exit 1)
6168
@test "${REPO}" != "ghcr.io/tailscale/tailscale" || (echo "REPO=... must not be ghcr.io/tailscale/tailscale" && exit 1)
62-
TAGS=latest REPOS=${REPO} PUSH=true ./build_docker.sh
69+
@test "${REPO}" != "tailscale/k8s-operator" || (echo "REPO=... must not be tailscale/k8s-operator" && exit 1)
70+
@test "${REPO}" != "ghcr.io/tailscale/k8s-operator" || (echo "REPO=... must not be ghcr.io/tailscale/k8s-operator" && exit 1)
71+
TAGS=latest REPOS=${REPO} PUSH=true TARGET=client ./build_docker.sh
72+
73+
publishdevoperator:
74+
@test -n "${REPO}" || (echo "REPO=... required; e.g. REPO=ghcr.io/${USER}/tailscale" && exit 1)
75+
@test "${REPO}" != "tailscale/tailscale" || (echo "REPO=... must not be tailscale/tailscale" && exit 1)
76+
@test "${REPO}" != "ghcr.io/tailscale/tailscale" || (echo "REPO=... must not be ghcr.io/tailscale/tailscale" && exit 1)
77+
@test "${REPO}" != "tailscale/k8s-operator" || (echo "REPO=... must not be tailscale/k8s-operator" && exit 1)
78+
@test "${REPO}" != "ghcr.io/tailscale/k8s-operator" || (echo "REPO=... must not be ghcr.io/tailscale/k8s-operator" && exit 1)
79+
TAGS=latest REPOS=${REPO} PUSH=true TARGET=operator ./build_docker.sh

README.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,41 @@ Private WireGuard® networks made easy
66

77
## Overview
88

9-
This repository contains all the open source Tailscale client code and
10-
the `tailscaled` daemon and `tailscale` CLI tool. The `tailscaled`
11-
daemon runs on Linux, Windows and [macOS](https://tailscale.com/kb/1065/macos-variants/), and to varying degrees on FreeBSD, OpenBSD, and Darwin. (The Tailscale iOS and Android apps use this repo's code, but this repo doesn't contain the mobile GUI code.)
9+
This repository contains the majority of Tailscale's open source code.
10+
Notably, it includes the `tailscaled` daemon and
11+
the `tailscale` CLI tool. The `tailscaled` daemon runs on Linux, Windows,
12+
[macOS](https://tailscale.com/kb/1065/macos-variants/), and to varying degrees
13+
on FreeBSD and OpenBSD. The Tailscale iOS and Android apps use this repo's
14+
code, but this repo doesn't contain the mobile GUI code.
1215

13-
The Android app is at https://github.com/tailscale/tailscale-android
16+
Other [Tailscale repos](https://github.com/orgs/tailscale/repositories) of note:
1417

15-
The Synology package is at https://github.com/tailscale/tailscale-synology
18+
* the Android app is at https://github.com/tailscale/tailscale-android
19+
* the Synology package is at https://github.com/tailscale/tailscale-synology
20+
* the QNAP package is at https://github.com/tailscale/tailscale-qpkg
21+
* the Chocolatey packaging is at https://github.com/tailscale/tailscale-chocolatey
22+
23+
For background on which parts of Tailscale are open source and why,
24+
see [https://tailscale.com/opensource/](https://tailscale.com/opensource/).
1625

1726
## Using
1827

19-
We serve packages for a variety of distros at
20-
https://pkgs.tailscale.com .
28+
We serve packages for a variety of distros and platforms at
29+
[https://pkgs.tailscale.com](https://pkgs.tailscale.com/).
2130

2231
## Other clients
2332

2433
The [macOS, iOS, and Windows clients](https://tailscale.com/download)
2534
use the code in this repository but additionally include small GUI
26-
wrappers that are not open source.
35+
wrappers. The GUI wrappers on non-open source platforms are themselves
36+
not open source.
2737

2838
## Building
2939

40+
We always require the latest Go release, currently Go 1.20. (While we build
41+
releases with our [Go fork](https://github.com/tailscale/go/), its use is not
42+
required.)
43+
3044
```
3145
go install tailscale.com/cmd/tailscale{,d}
3246
```
@@ -43,8 +57,6 @@ If your distro has conventions that preclude the use of
4357
`build_dist.sh`, please do the equivalent of what it does in your
4458
distro's way, so that bug reports contain useful version information.
4559

46-
We require the latest Go release, currently Go 1.19.
47-
4860
## Bugs
4961

5062
Please file any issues about this code or the hosted service on
@@ -59,6 +71,9 @@ We require [Developer Certificate of
5971
Origin](https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin)
6072
`Signed-off-by` lines in commits.
6173

74+
See `git log` for our commit message style. It's basically the same as
75+
[Go's style](https://github.com/golang/go/wiki/CommitMessage).
76+
6277
## About Us
6378

6479
[Tailscale](https://tailscale.com/) is primarily developed by the

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.33.0
1+
1.37.0

0 commit comments

Comments
 (0)