├── ALPINE.txt ├── VERSION.txt ├── tool ├── binaryen.rev ├── helm.rev ├── node.rev ├── yarn.rev ├── gocross │ ├── exec_unix.go │ └── gocross_test.go └── go ├── cmd ├── nginx-auth │ ├── rpm │ │ ├── postinst.sh │ │ ├── postrm.sh │ │ └── prerm.sh │ ├── .gitignore │ ├── tailscale.nginx-auth.socket │ ├── tailscale.nginx-auth.service │ └── deb │ │ └── prerm.sh ├── sniproxy │ └── .gitignore ├── get-authkey │ └── .gitignore ├── gitops-pusher │ └── .gitignore ├── tsconnect │ ├── .gitignore │ ├── dist │ │ └── placeholder │ ├── src │ │ ├── pkg │ │ │ └── pkg.css │ │ ├── types │ │ │ └── esbuild.d.ts │ │ ├── lib │ │ │ └── js-state-store.ts │ │ └── app │ │ │ └── go-panic-display.tsx │ ├── tailwind.config.js │ ├── README.pkg.md │ ├── dev.go │ ├── dev-pkg.go │ ├── tsconfig.json │ └── package.json.tmpl ├── k8s-operator │ └── deploy │ │ ├── manifests │ │ ├── nameserver │ │ │ ├── cm.yaml │ │ │ ├── sa.yaml │ │ │ └── svc.yaml │ │ └── templates │ │ │ ├── 02-namespace.yaml │ │ │ ├── 01-header.yaml │ │ │ └── 03-secret.yaml │ │ ├── examples │ │ ├── dnsconfig.yaml │ │ ├── recorder.yaml │ │ └── proxygroup.yaml │ │ └── chart │ │ ├── templates │ │ ├── .gitignore │ │ ├── oauth-secret.yaml │ │ └── ingressclass.yaml │ │ └── .helmignore ├── tailscale │ ├── manifest_windows_386.syso │ ├── manifest_windows_amd64.syso │ ├── manifest_windows_arm64.syso │ ├── tailscale.rc │ ├── cli │ │ ├── maybe_syspolicy.go │ │ ├── configure_linux-all.go │ │ ├── ssh_exec_js.go │ │ ├── configure-kube_omit.go │ │ ├── configure_apple-all.go │ │ ├── ffcomplete │ │ │ ├── scripts_omit.go │ │ │ └── complete_omit.go │ │ └── ssh_exec.go │ └── generate.go ├── tailscaled │ ├── manifest_windows_386.syso │ ├── manifest_windows_amd64.syso │ ├── manifest_windows_arm64.syso │ ├── required_version.go │ ├── sigpipe.go │ ├── ssh.go │ ├── tailscaled.defaults │ ├── generate.go │ ├── with_cli.go │ ├── tailscaled_bird.go │ ├── tailscaled_notwindows.go │ ├── tailscaledhooks │ │ └── tailscaledhooks.go │ ├── smf │ │ └── vpn-tailscale │ └── webclient.go ├── containerboot │ └── test_tailscale.sh ├── nardump │ └── README.md ├── tsshd │ └── tsshd.go ├── systray │ └── README.md └── connector-gen │ └── advertise-routes.go ├── go.toolchain.version ├── go.toolchain.branch ├── release ├── dist │ ├── qnap │ │ └── files │ │ │ └── Tailscale │ │ │ ├── icons │ │ │ ├── .gitkeep │ │ │ ├── Tailscale.gif │ │ │ ├── Tailscale_80.gif │ │ │ └── Tailscale_gray.gif │ │ │ ├── config │ │ │ └── .gitkeep │ │ │ ├── build_sign.csv │ │ │ └── shared │ │ │ └── ui │ │ │ ├── .htaccess │ │ │ └── index.cgi │ └── synology │ │ └── files │ │ ├── scripts │ │ ├── postupgrade │ │ └── preupgrade │ │ ├── PACKAGE_ICON.PNG │ │ ├── PACKAGE_ICON_256.PNG │ │ ├── index.cgi │ │ ├── Tailscale.sc │ │ ├── privilege-dsm6 │ │ ├── privilege-dsm7 │ │ ├── logrotate-dsm6 │ │ ├── logrotate-dsm7 │ │ ├── resource │ │ ├── config │ │ └── privilege-dsm7.for-package-center ├── deb │ ├── debian.prerm.sh │ └── debian.postrm.sh └── rpm │ ├── rpm.postrm.sh │ └── rpm.prerm.sh ├── gokrazy ├── .gitignore ├── tsapp │ ├── builddir │ │ ├── github.com │ │ │ ├── gokrazy │ │ │ │ ├── rpi-eeprom │ │ │ │ │ ├── go.mod │ │ │ │ │ └── go.sum │ │ │ │ ├── gokrazy │ │ │ │ │ └── cmd │ │ │ │ │ │ └── ntp │ │ │ │ │ │ └── go.mod │ │ │ │ └── serial-busybox │ │ │ │ │ └── go.mod │ │ │ └── tailscale │ │ │ │ └── gokrazy-kernel │ │ │ │ ├── go.mod │ │ │ │ └── go.sum │ │ └── tailscale.com │ │ │ └── go.mod │ └── README.md ├── natlabapp │ ├── builddir │ │ ├── github.com │ │ │ ├── gokrazy │ │ │ │ └── serial-busybox │ │ │ │ │ └── go.mod │ │ │ └── tailscale │ │ │ │ └── gokrazy-kernel │ │ │ │ ├── go.mod │ │ │ │ └── go.sum │ │ └── tailscale.com │ │ │ └── go.mod │ └── README.md ├── natlabapp.arm64 │ ├── builddir │ │ ├── github.com │ │ │ ├── gokrazy │ │ │ │ ├── serial-busybox │ │ │ │ │ └── go.mod │ │ │ │ └── kernel.arm64 │ │ │ │ │ ├── go.mod │ │ │ │ │ └── go.sum │ │ │ └── tailscale │ │ │ │ └── gokrazy-kernel │ │ │ │ ├── go.mod │ │ │ │ └── go.sum │ │ └── tailscale.com │ │ │ └── go.mod │ └── README.md ├── gok ├── tidy-deps.go └── Makefile ├── .bencher └── config.yaml ├── .gitattributes ├── CODEOWNERS ├── go.toolchain.rev ├── go.mod.sri ├── go.toolchain.rev.sri ├── derp ├── xdp │ ├── bpf_bpfeb.o │ └── bpf_bpfel.o ├── derphttp │ └── websocket_stub.go ├── export_test.go ├── derpserver │ └── derpserver_default.go └── derpconst │ └── derpconst.go ├── header.txt ├── api.md ├── tempfork ├── spf13 │ └── cobra │ │ ├── comp.ps1.gz │ │ ├── comp.zsh.gz │ │ ├── comp.bash.gz │ │ ├── comp.fish.gz │ │ └── README.md ├── gliderlabs │ └── ssh │ │ └── ssh_test.go └── sshtest │ └── README.md ├── docs ├── bird │ ├── tailscale_bird.conf │ └── sample_bird.conf └── k8s │ ├── sa.yaml │ └── rolebinding.yaml ├── tstest ├── tailmac │ ├── Swift │ │ ├── TailMac │ │ │ └── main │ │ ├── Host │ │ │ ├── Assets.xcassets │ │ │ │ ├── Contents.json │ │ │ │ └── AccentColor.colorset │ │ │ │ │ └── Contents.json │ │ │ └── Info.plist │ │ └── Common │ │ │ └── Notifications.swift │ ├── Host.entitlements │ ├── TailMac.entitlements │ └── TailMac.xcodeproj │ │ └── project.xcworkspace │ │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ ├── WorkspaceSettings.xcsettings │ │ └── swiftpm │ │ └── Package.resolved ├── integration │ └── vms │ │ ├── doc.go │ │ └── distros_test.go ├── deptest │ └── deptest_test.go ├── kernel_other.go ├── tools │ └── tools.go └── tlstest │ └── tlstest_test.go ├── util ├── eventbus │ ├── assets │ │ ├── htmx.min.js.gz │ │ ├── htmx-websocket.min.js.gz │ │ ├── monitor.html │ │ └── event.html │ └── debughttp_off.go ├── racebuild │ ├── on.go │ ├── off.go │ └── racebuild.go ├── osdiag │ └── osdiag_notwindows.go ├── pidowner │ └── pidowner_noimpl.go ├── sysresources │ ├── sysresources.go │ ├── memory_unsupported.go │ ├── memory.go │ ├── memory_darwin.go │ ├── memory_bsd.go │ └── memory_linux.go ├── quarantine │ ├── quarantine_default.go │ └── quarantine.go ├── osshare │ └── filesharingstatus_noop.go ├── rands │ └── rands_test.go ├── deephash │ ├── pointer_norace.go │ └── testtype │ │ └── testtype.go ├── linuxfw │ ├── linuxfwtest │ │ └── linuxfwtest_unsupported.go │ └── iptables_disabled.go ├── winutil │ └── testdata │ │ └── testrestartableprocesses │ │ └── restartableprocess_windows.go └── cibuild │ └── cibuild.go ├── logtail ├── .gitignore ├── README.md └── filch │ └── filch_stub.go ├── client ├── web │ ├── src │ │ ├── assets │ │ │ ├── fonts │ │ │ │ └── Inter.var.latin.woff2 │ │ │ └── icons │ │ │ │ ├── chevron-down.svg │ │ │ │ ├── check.svg │ │ │ │ ├── x.svg │ │ │ │ ├── arrow-right.svg │ │ │ │ ├── plus.svg │ │ │ │ ├── search.svg │ │ │ │ ├── x-circle.svg │ │ │ │ └── arrow-up-circle.svg │ │ ├── ui │ │ │ └── portal-container-context.tsx │ │ └── hooks │ │ │ └── toaster.ts │ └── tsconfig.json ├── systray │ └── tailscale-systray.service └── tailscale │ └── required_version.go ├── clientupdate ├── distsign │ ├── roots │ │ ├── crawshaw-root.pem │ │ └── distsign-prod-root-1-pub.pem │ └── roots_test.go ├── clientupdate_notwindows.go ├── clientupdate_not_downloads.go └── clientupdate_downloads.go ├── k8s-operator ├── api-docs-config.yaml ├── apis │ ├── v1alpha1 │ │ └── doc.go │ └── doc.go └── api-proxy │ └── doc.go ├── version ├── .gitignore ├── race.go ├── race_off.go ├── distro │ └── distro_test.go ├── export_test.go ├── cmdname_ios.go └── version_checkformat.go ├── feature ├── drive │ └── drive.go ├── taildrop │ └── doc.go ├── condregister │ ├── maybe_ace.go │ ├── maybe_c2n.go │ ├── maybe_drive.go │ ├── maybe_doctor.go │ ├── maybe_tap.go │ ├── maybe_tpm.go │ ├── maybe_portlist.go │ ├── maybe_posture.go │ ├── maybe_taildrop.go │ ├── useproxy │ │ ├── useproxy.go │ │ └── doc.go │ ├── maybe_capture.go │ ├── maybe_syspolicy.go │ ├── maybe_wakeonlan.go │ ├── oauthkey │ │ ├── maybe_oauthkey.go │ │ └── doc.go │ ├── maybe_osrouter.go │ ├── maybe_sdnotify.go │ ├── maybe_appconnectors.go │ ├── maybe_clientupdate.go │ ├── portmapper │ │ ├── maybe_portmapper.go │ │ └── doc.go │ ├── maybe_debugportmapper.go │ ├── maybe_relayserver.go │ ├── maybe_linkspeed.go │ ├── maybe_linuxdnsfight.go │ ├── identityfederation │ │ ├── maybe_identityfederation.go │ │ └── doc.go │ ├── maybe_store_aws.go │ └── maybe_store_kube.go ├── linkspeed │ └── doc.go ├── syspolicy │ └── syspolicy.go ├── capture │ └── dissector │ │ └── dissector.go ├── condlite │ └── expvar │ │ ├── omit.go │ │ └── expvar.go ├── tpm │ ├── tpm_windows.go │ └── tpm_other.go ├── buildfeatures │ ├── buildfeatures.go │ ├── feature_aws_enabled.go │ ├── feature_tpm_disabled.go │ ├── feature_tpm_enabled.go │ ├── feature_aws_disabled.go │ ├── feature_bird_enabled.go │ ├── feature_dbus_disabled.go │ ├── feature_dbus_enabled.go │ ├── feature_ssh_disabled.go │ ├── feature_ssh_enabled.go │ ├── feature_bird_disabled.go │ ├── feature_c2n_disabled.go │ ├── feature_c2n_enabled.go │ ├── feature_kube_disabled.go │ ├── feature_kube_enabled.go │ ├── feature_ace_disabled.go │ ├── feature_ace_enabled.go │ ├── feature_capture_disabled.go │ ├── feature_capture_enabled.go │ ├── feature_serve_disabled.go │ ├── feature_serve_enabled.go │ ├── feature_acme_disabled.go │ ├── feature_acme_enabled.go │ ├── feature_health_disabled.go │ ├── feature_health_enabled.go │ ├── feature_systray_disabled.go │ ├── feature_systray_enabled.go │ ├── feature_tap_disabled.go │ ├── feature_tap_enabled.go │ ├── feature_dns_enabled.go │ ├── feature_gro_enabled.go │ ├── feature_netlog_disabled.go │ ├── feature_netlog_enabled.go │ ├── feature_dns_disabled.go │ ├── feature_drive_disabled.go │ ├── feature_drive_enabled.go │ ├── feature_gro_disabled.go │ ├── feature_iptables_disabled.go │ ├── feature_iptables_enabled.go │ ├── feature_wakeonlan_disabled.go │ ├── feature_wakeonlan_enabled.go │ ├── feature_webclient_disabled.go │ ├── feature_webclient_enabled.go │ ├── feature_completion_enabled.go │ ├── feature_posture_disabled.go │ ├── feature_posture_enabled.go │ ├── feature_relayserver_disabled.go │ ├── feature_relayserver_enabled.go │ ├── feature_sdnotify_disabled.go │ ├── feature_sdnotify_enabled.go │ ├── feature_useexitnode_disabled.go │ ├── feature_useexitnode_enabled.go │ ├── feature_completion_disabled.go │ ├── feature_resolved_disabled.go │ ├── feature_resolved_enabled.go │ ├── feature_taildrop_disabled.go │ ├── feature_taildrop_enabled.go │ ├── feature_tailnetlock_enabled.go │ ├── feature_hujsonconf_disabled.go │ ├── feature_hujsonconf_enabled.go │ ├── feature_tailnetlock_disabled.go │ ├── feature_oauthkey_disabled.go │ ├── feature_oauthkey_enabled.go │ ├── feature_portlist_disabled.go │ ├── feature_portlist_enabled.go │ ├── feature_useroutes_disabled.go │ ├── feature_useroutes_enabled.go │ ├── feature_appconnectors_disabled.go │ ├── feature_appconnectors_enabled.go │ ├── feature_captiveportal_disabled.go │ ├── feature_captiveportal_enabled.go │ ├── feature_cliconndiag_disabled.go │ ├── feature_cliconndiag_enabled.go │ ├── feature_clientmetrics_disabled.go │ ├── feature_clientmetrics_enabled.go │ ├── feature_clientupdate_disabled.go │ ├── feature_clientupdate_enabled.go │ ├── feature_cloud_disabled.go │ ├── feature_cloud_enabled.go │ ├── feature_debugeventbus_disabled.go │ ├── feature_debugeventbus_enabled.go │ ├── feature_netstack_disabled.go │ ├── feature_netstack_enabled.go │ ├── feature_peerapiclient_disabled.go │ ├── feature_peerapiclient_enabled.go │ ├── feature_peerapiserver_disabled.go │ ├── feature_peerapiserver_enabled.go │ ├── feature_portmapper_disabled.go │ └── feature_portmapper_enabled.go └── sdnotify │ └── sdnotify.go ├── metrics └── fds_notlinux.go ├── net ├── tlsdial │ └── deps_test.go ├── dns │ ├── flush_default.go │ ├── resolvconfpath_default.go │ ├── resolvconfpath_gokrazy.go │ ├── manager_solaris.go │ └── noop.go ├── netkernelconf │ └── netkernelconf.go ├── tstun │ ├── wrap_noop.go │ ├── tun_notwindows.go │ ├── ifstatus_noop.go │ ├── tstun_stub.go │ └── netstack_enabled.go ├── stun │ └── stun_fuzzer.go ├── tcpinfo │ └── tcpinfo_other.go ├── ktimeout │ ├── ktimeout_default.go │ ├── ktimeout_linux.go │ └── ktimeout_test.go ├── neterror │ └── neterror_windows.go ├── netmon │ ├── interfaces_windows_test.go │ ├── interfaces_defaultrouteif_todo.go │ └── interfaces_default_route_test.go ├── sockopts │ └── sockopts_notwindows.go ├── netns │ ├── netns_linux_test.go │ ├── socks.go │ └── mksyscall.go ├── netstat │ ├── netstat_noimpl.go │ └── netstat_test.go ├── art │ └── art_test.go ├── routetable │ └── routetable_other.go ├── memnet │ └── conn_test.go ├── batching │ └── conn_default.go └── captivedetection │ └── rawconn.go ├── logpolicy └── maybe_syspolicy.go ├── posture ├── doc.go └── serialnumber_test.go ├── types ├── key │ └── doc.go ├── geo │ └── doc.go ├── ptr │ └── ptr.go ├── logger │ └── rusage_stub.go ├── netlogfunc │ └── netlogfunc.go └── empty │ └── message.go ├── wgengine ├── watchdog_omit.go ├── netstack │ ├── gro │ │ ├── netstack_disabled.go │ │ └── gro_disabled.go │ ├── netstack_linux.go │ └── netstack_tcpbuf_default.go ├── magicsock │ ├── magicsock_plan9.go │ ├── endpoint_stub.go │ ├── derp_test.go │ ├── magicsock_default.go │ └── cloudinfo_nocloud.go ├── router │ └── osrouter │ │ ├── osrouter_test.go │ │ └── router_windows_test.go └── netlog │ └── netlog_omit.go ├── health └── usermetrics_omit.go ├── appc └── observe_disabled.go ├── omit ├── aws_def.go ├── aws_omit.go └── omit.go ├── hostinfo ├── packagetype_container.go ├── hostinfo_darwin.go └── hostinfo_container_linux_test.go ├── SECURITY.md ├── ipn ├── desktop │ ├── doc.go │ └── sessions_notwindows.go ├── ipnserver │ └── proxyconnect_js.go └── localapi │ └── disabled_stubs.go ├── tsweb └── pprof_js.go ├── atomicfile ├── atomicfile_notwindows.go └── mksyscall.go ├── doctor ├── permissions │ ├── permissions_test.go │ └── permissions_other.go └── ethtool │ └── ethtool_other.go ├── .github ├── ISSUE_TEMPLATE │ └── config.yml └── workflows │ └── docker-file-build.yml ├── tsconst └── webclient.go ├── syncs ├── mutex_debug.go └── mutex.go ├── disco └── disco_fuzzer.go ├── safesocket ├── safesocket_test.go ├── safesocket_plan9.go └── safesocket_js.go ├── prober └── tun_default.go ├── drive ├── driveimpl │ ├── shared │ │ └── xml.go │ └── dirfs │ │ ├── removeall.go │ │ └── rename.go └── remote_nonunix.go ├── tstime └── jitter.go ├── internal └── tooldeps │ └── tooldeps.go ├── control └── controlhttp │ └── client_common.go ├── tsconsensus ├── bolt_store.go └── bolt_store_no_bolt.go ├── envknob └── envknob_nottest.go ├── tka └── verify_disabled.go └── gomod_test.go /ALPINE.txt: -------------------------------------------------------------------------------- 1 | 3.22 -------------------------------------------------------------------------------- /VERSION.txt: -------------------------------------------------------------------------------- 1 | 1.92.4 2 | -------------------------------------------------------------------------------- /tool/binaryen.rev: -------------------------------------------------------------------------------- 1 | 111 2 | -------------------------------------------------------------------------------- /tool/helm.rev: -------------------------------------------------------------------------------- 1 | 3.13.1 2 | -------------------------------------------------------------------------------- /tool/node.rev: -------------------------------------------------------------------------------- 1 | 22.14.0 2 | -------------------------------------------------------------------------------- /tool/yarn.rev: -------------------------------------------------------------------------------- 1 | 1.22.19 2 | -------------------------------------------------------------------------------- /cmd/nginx-auth/rpm/postinst.sh: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go.toolchain.version: -------------------------------------------------------------------------------- 1 | 1.25.5 2 | -------------------------------------------------------------------------------- /cmd/sniproxy/.gitignore: -------------------------------------------------------------------------------- 1 | sniproxy 2 | -------------------------------------------------------------------------------- /cmd/get-authkey/.gitignore: -------------------------------------------------------------------------------- 1 | get-authkey 2 | -------------------------------------------------------------------------------- /go.toolchain.branch: -------------------------------------------------------------------------------- 1 | tailscale.go1.25 2 | -------------------------------------------------------------------------------- /release/dist/qnap/files/Tailscale/icons/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cmd/gitops-pusher/.gitignore: -------------------------------------------------------------------------------- 1 | version-cache.json 2 | -------------------------------------------------------------------------------- /gokrazy/.gitignore: -------------------------------------------------------------------------------- 1 | *.qcow2 2 | *.img 3 | go.work 4 | -------------------------------------------------------------------------------- /release/dist/qnap/files/Tailscale/config/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.bencher/config.yaml: -------------------------------------------------------------------------------- 1 | suppress_failure_on_regression: true 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | go.mod filter=go-mod 2 | *.go diff=golang 3 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | /tailcfg/ @tailscale/control-protocol-owners 2 | -------------------------------------------------------------------------------- /cmd/tsconnect/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | /dist 3 | /pkg 4 | -------------------------------------------------------------------------------- /go.toolchain.rev: -------------------------------------------------------------------------------- 1 | 0bab982699fa5903259ba9b4cba3e5fd6cb3baf2 2 | -------------------------------------------------------------------------------- /go.mod.sri: -------------------------------------------------------------------------------- 1 | sha256-jJSSXMyUqcJoZuqfSlBsKDQezyqS+jDkRglMMjG1K8g= 2 | -------------------------------------------------------------------------------- /release/dist/qnap/files/Tailscale/build_sign.csv: -------------------------------------------------------------------------------- 1 | ,/Tailscale.sh, 2 | -------------------------------------------------------------------------------- /release/dist/synology/files/scripts/postupgrade: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exit 0 -------------------------------------------------------------------------------- /release/dist/synology/files/scripts/preupgrade: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exit 0 -------------------------------------------------------------------------------- /go.toolchain.rev.sri: -------------------------------------------------------------------------------- 1 | sha256-fBezkBGRHCnfJiOUmMMqBCPCqjlGC4F6KEt5h1JhsCg= 2 | -------------------------------------------------------------------------------- /cmd/nginx-auth/.gitignore: -------------------------------------------------------------------------------- 1 | nga.sock 2 | *.deb 3 | *.rpm 4 | tailscale.nginx-auth 5 | -------------------------------------------------------------------------------- /derp/xdp/bpf_bpfeb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/derp/xdp/bpf_bpfeb.o -------------------------------------------------------------------------------- /derp/xdp/bpf_bpfel.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/derp/xdp/bpf_bpfel.o -------------------------------------------------------------------------------- /header.txt: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause -------------------------------------------------------------------------------- /api.md: -------------------------------------------------------------------------------- 1 | > [!IMPORTANT] 2 | > The Tailscale API documentation has moved to https://tailscale.com/api 3 | -------------------------------------------------------------------------------- /release/dist/qnap/files/Tailscale/shared/ui/.htaccess: -------------------------------------------------------------------------------- 1 | Options +ExecCGI 2 | AddHandler cgi-script .cgi 3 | -------------------------------------------------------------------------------- /tempfork/spf13/cobra/comp.ps1.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/tempfork/spf13/cobra/comp.ps1.gz -------------------------------------------------------------------------------- /tempfork/spf13/cobra/comp.zsh.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/tempfork/spf13/cobra/comp.zsh.gz -------------------------------------------------------------------------------- /docs/bird/tailscale_bird.conf: -------------------------------------------------------------------------------- 1 | protocol static tailscale { 2 | ipv4; 3 | route 100.64.0.0/10 via "tailscale0"; 4 | } 5 | -------------------------------------------------------------------------------- /tempfork/spf13/cobra/comp.bash.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/tempfork/spf13/cobra/comp.bash.gz -------------------------------------------------------------------------------- /tempfork/spf13/cobra/comp.fish.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/tempfork/spf13/cobra/comp.fish.gz -------------------------------------------------------------------------------- /tstest/tailmac/Swift/TailMac/main: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/tstest/tailmac/Swift/TailMac/main -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/manifests/nameserver/cm.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: dnsrecords 5 | -------------------------------------------------------------------------------- /util/eventbus/assets/htmx.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/util/eventbus/assets/htmx.min.js.gz -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/manifests/nameserver/sa.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: nameserver 5 | -------------------------------------------------------------------------------- /cmd/tailscale/manifest_windows_386.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/cmd/tailscale/manifest_windows_386.syso -------------------------------------------------------------------------------- /cmd/tsconnect/dist/placeholder: -------------------------------------------------------------------------------- 1 | This is here to make sure the dist/ directory exists for the go:embed command 2 | in serve.go. 3 | -------------------------------------------------------------------------------- /cmd/tailscale/manifest_windows_amd64.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/cmd/tailscale/manifest_windows_amd64.syso -------------------------------------------------------------------------------- /cmd/tailscale/manifest_windows_arm64.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/cmd/tailscale/manifest_windows_arm64.syso -------------------------------------------------------------------------------- /cmd/tailscaled/manifest_windows_386.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/cmd/tailscaled/manifest_windows_386.syso -------------------------------------------------------------------------------- /cmd/tailscaled/manifest_windows_amd64.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/cmd/tailscaled/manifest_windows_amd64.syso -------------------------------------------------------------------------------- /cmd/tailscaled/manifest_windows_arm64.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/cmd/tailscaled/manifest_windows_arm64.syso -------------------------------------------------------------------------------- /release/dist/synology/files/PACKAGE_ICON.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/release/dist/synology/files/PACKAGE_ICON.PNG -------------------------------------------------------------------------------- /tstest/tailmac/Swift/Host/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/manifests/templates/02-namespace.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Namespace 3 | metadata: 4 | name: tailscale 5 | --- 6 | -------------------------------------------------------------------------------- /logtail/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.out 3 | /example/logadopt/logadopt 4 | /example/logreprocess/logreprocess 5 | /example/logtail/logtail 6 | /logtail 7 | -------------------------------------------------------------------------------- /util/eventbus/assets/htmx-websocket.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/util/eventbus/assets/htmx-websocket.min.js.gz -------------------------------------------------------------------------------- /client/web/src/assets/fonts/Inter.var.latin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/client/web/src/assets/fonts/Inter.var.latin.woff2 -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/manifests/templates/01-header.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Tailscale Inc & AUTHORS 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | -------------------------------------------------------------------------------- /cmd/tailscale/tailscale.rc: -------------------------------------------------------------------------------- 1 | #!/bin/rc 2 | # Plan 9 cmd/tailscale wrapper script to run cmd/tailscaled's embedded CLI. 3 | TS_BE_CLI=1 tailscaled $* 4 | -------------------------------------------------------------------------------- /release/dist/synology/files/PACKAGE_ICON_256.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/release/dist/synology/files/PACKAGE_ICON_256.PNG -------------------------------------------------------------------------------- /release/dist/qnap/files/Tailscale/icons/Tailscale.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/release/dist/qnap/files/Tailscale/icons/Tailscale.gif -------------------------------------------------------------------------------- /release/dist/synology/files/index.cgi: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | exec /var/packages/Tailscale/target/bin/tailscale web -cgi -prefix="/webman/3rdparty/Tailscale/index.cgi/" 3 | -------------------------------------------------------------------------------- /clientupdate/distsign/roots/crawshaw-root.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN ROOT PUBLIC KEY----- 2 | Psrabv2YNiEDhPlnLVSMtB5EKACm7zxvKxfvYD4i7X8= 3 | -----END ROOT PUBLIC KEY----- 4 | -------------------------------------------------------------------------------- /release/dist/qnap/files/Tailscale/icons/Tailscale_80.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/release/dist/qnap/files/Tailscale/icons/Tailscale_80.gif -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/examples/dnsconfig.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tailscale.com/v1alpha1 2 | kind: DNSConfig 3 | metadata: 4 | name: ts-dns 5 | spec: 6 | nameserver: {} 7 | -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/examples/recorder.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tailscale.com/v1alpha1 2 | kind: Recorder 3 | metadata: 4 | name: recorder 5 | spec: 6 | enableUI: true 7 | -------------------------------------------------------------------------------- /release/dist/qnap/files/Tailscale/icons/Tailscale_gray.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nshalman/tailscale/HEAD/release/dist/qnap/files/Tailscale/icons/Tailscale_gray.gif -------------------------------------------------------------------------------- /release/dist/synology/files/Tailscale.sc: -------------------------------------------------------------------------------- 1 | [Tailscale] 2 | title="Tailscale" 3 | desc="Tailscale VPN" 4 | port_forward="no" 5 | src.ports="41641/udp" 6 | dst.ports="41641/udp" -------------------------------------------------------------------------------- /release/dist/synology/files/privilege-dsm6: -------------------------------------------------------------------------------- 1 | { 2 | "defaults":{ 3 | "run-as": "root" 4 | }, 5 | "username": "tailscale", 6 | "groupname": "tailscale" 7 | } 8 | -------------------------------------------------------------------------------- /release/dist/synology/files/privilege-dsm7: -------------------------------------------------------------------------------- 1 | { 2 | "defaults":{ 3 | "run-as": "package" 4 | }, 5 | "username": "tailscale", 6 | "groupname": "tailscale" 7 | } 8 | -------------------------------------------------------------------------------- /clientupdate/distsign/roots/distsign-prod-root-1-pub.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN ROOT PUBLIC KEY----- 2 | ZjjKhUHBtLNRSO1dhOTjrXJGJ8lDe1594WM2XDuheVQ= 3 | -----END ROOT PUBLIC KEY----- 4 | -------------------------------------------------------------------------------- /util/eventbus/assets/monitor.html: -------------------------------------------------------------------------------- 1 |
2 | 4 | 5 |
6 | -------------------------------------------------------------------------------- /docs/k8s/sa.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Tailscale Inc & AUTHORS 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | apiVersion: v1 4 | kind: ServiceAccount 5 | metadata: 6 | name: {{SA_NAME}} 7 | -------------------------------------------------------------------------------- /k8s-operator/api-docs-config.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Tailscale Inc & AUTHORS 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | processor: {} 5 | render: 6 | kubernetesVersion: 1.30 7 | -------------------------------------------------------------------------------- /util/racebuild/on.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build race 5 | 6 | package racebuild 7 | 8 | const On = true 9 | -------------------------------------------------------------------------------- /util/racebuild/off.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !race 5 | 6 | package racebuild 7 | 8 | const On = false 9 | -------------------------------------------------------------------------------- /version/.gitignore: -------------------------------------------------------------------------------- 1 | describe.txt 2 | long.txt 3 | short.txt 4 | gitcommit.txt 5 | extragitcommit.txt 6 | version-info.sh 7 | version.h 8 | version.xcconfig 9 | ver.go 10 | version 11 | -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/examples/proxygroup.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tailscale.com/v1alpha1 2 | kind: ProxyGroup 3 | metadata: 4 | name: egress-proxies 5 | spec: 6 | type: egress 7 | replicas: 3 8 | -------------------------------------------------------------------------------- /feature/drive/drive.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package drive registers the Taildrive (file server) feature. 5 | package drive 6 | -------------------------------------------------------------------------------- /gokrazy/tsapp/builddir/github.com/gokrazy/rpi-eeprom/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/tsapp 2 | 3 | go 1.22.2 4 | 5 | require github.com/gokrazy/rpi-eeprom v0.0.0-20240518032756-37da22ee9608 // indirect 6 | -------------------------------------------------------------------------------- /release/dist/synology/files/logrotate-dsm6: -------------------------------------------------------------------------------- 1 | /var/packages/Tailscale/etc/tailscaled.stdout.log { 2 | size 10M 3 | rotate 3 4 | missingok 5 | copytruncate 6 | compress 7 | notifempty 8 | } 9 | -------------------------------------------------------------------------------- /release/dist/synology/files/logrotate-dsm7: -------------------------------------------------------------------------------- 1 | /var/packages/Tailscale/var/tailscaled.stdout.log { 2 | size 10M 3 | rotate 3 4 | missingok 5 | copytruncate 6 | compress 7 | notifempty 8 | } 9 | -------------------------------------------------------------------------------- /gokrazy/tsapp/builddir/github.com/gokrazy/gokrazy/cmd/ntp/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/tsapp 2 | 3 | go 1.22.2 4 | 5 | require github.com/gokrazy/gokrazy v0.0.0-20240525065858-dedadaf38803 // indirect 6 | -------------------------------------------------------------------------------- /feature/taildrop/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package taildrop registers the taildrop (file sending) feature. 5 | package taildrop 6 | -------------------------------------------------------------------------------- /gokrazy/tsapp/builddir/github.com/gokrazy/serial-busybox/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/tsapp 2 | 3 | go 1.22.2 4 | 5 | require github.com/gokrazy/serial-busybox v0.0.0-20220918193710-d728912733ca // indirect 6 | -------------------------------------------------------------------------------- /metrics/fds_notlinux.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux 5 | 6 | package metrics 7 | 8 | func currentFDs() int { return 0 } 9 | -------------------------------------------------------------------------------- /release/deb/debian.prerm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | if [ "$1" = "remove" ]; then 4 | if [ -d /run/systemd/system ]; then 5 | deb-systemd-invoke stop 'tailscaled.service' >/dev/null || true 6 | fi 7 | fi 8 | -------------------------------------------------------------------------------- /gokrazy/natlabapp/builddir/github.com/gokrazy/serial-busybox/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/tsapp 2 | 3 | go 1.22.2 4 | 5 | require github.com/gokrazy/serial-busybox v0.0.0-20220918193710-d728912733ca // indirect 6 | -------------------------------------------------------------------------------- /gokrazy/tsapp/builddir/github.com/tailscale/gokrazy-kernel/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/tsapp 2 | 3 | go 1.22.2 4 | 5 | require github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e // indirect 6 | -------------------------------------------------------------------------------- /gokrazy/tsapp/builddir/tailscale.com/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/tsapp 2 | 3 | go 1.23.1 4 | 5 | replace tailscale.com => ../../../.. 6 | 7 | require tailscale.com v0.0.0-00010101000000-000000000000 // indirect 8 | -------------------------------------------------------------------------------- /net/tlsdial/deps_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build for_go_mod_tidy_only 5 | 6 | package tlsdial 7 | 8 | import _ "filippo.io/mkcert" 9 | -------------------------------------------------------------------------------- /gokrazy/natlabapp.arm64/builddir/github.com/gokrazy/serial-busybox/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/tsapp 2 | 3 | go 1.22.2 4 | 5 | require github.com/gokrazy/serial-busybox v0.0.0-20220918193710-d728912733ca // indirect 6 | -------------------------------------------------------------------------------- /gokrazy/natlabapp/builddir/github.com/tailscale/gokrazy-kernel/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/tsapp 2 | 3 | go 1.22.2 4 | 5 | require github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e // indirect 6 | -------------------------------------------------------------------------------- /gokrazy/natlabapp/builddir/tailscale.com/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/tsapp 2 | 3 | go 1.23.1 4 | 5 | replace tailscale.com => ../../../.. 6 | 7 | require tailscale.com v0.0.0-00010101000000-000000000000 // indirect 8 | -------------------------------------------------------------------------------- /gokrazy/natlabapp.arm64/builddir/github.com/gokrazy/kernel.arm64/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/natlabapp.arm64 2 | 3 | go 1.23.1 4 | 5 | require github.com/gokrazy/kernel.arm64 v0.0.0-20240830035047-cdba87a9eb0e // indirect 6 | -------------------------------------------------------------------------------- /gokrazy/natlabapp.arm64/builddir/github.com/tailscale/gokrazy-kernel/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/tsapp 2 | 3 | go 1.22.2 4 | 5 | require github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e // indirect 6 | -------------------------------------------------------------------------------- /gokrazy/natlabapp.arm64/builddir/tailscale.com/go.mod: -------------------------------------------------------------------------------- 1 | module gokrazy/build/tsapp 2 | 3 | go 1.23.1 4 | 5 | replace tailscale.com => ../../../.. 6 | 7 | require tailscale.com v0.0.0-00010101000000-000000000000 // indirect 8 | -------------------------------------------------------------------------------- /feature/condregister/maybe_ace.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_ace 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/ace" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_c2n.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_c2n 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/c2n" 9 | -------------------------------------------------------------------------------- /net/dns/flush_default.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows 5 | 6 | package dns 7 | 8 | func flushCaches() error { 9 | return nil 10 | } 11 | -------------------------------------------------------------------------------- /net/netkernelconf/netkernelconf.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package netkernelconf contains code for checking kernel netdev config. 5 | package netkernelconf 6 | -------------------------------------------------------------------------------- /net/tstun/wrap_noop.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux || ts_omit_gro 5 | 6 | package tstun 7 | 8 | func (t *Wrapper) SetLinkFeaturesPostUp() {} 9 | -------------------------------------------------------------------------------- /cmd/tailscale/cli/maybe_syspolicy.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_syspolicy 5 | 6 | package cli 7 | 8 | import _ "tailscale.com/feature/syspolicy" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_drive.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_drive 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/drive" 9 | -------------------------------------------------------------------------------- /logpolicy/maybe_syspolicy.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_syspolicy 5 | 6 | package logpolicy 7 | 8 | import _ "tailscale.com/feature/syspolicy" 9 | -------------------------------------------------------------------------------- /posture/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package posture contains functions to query the local system 5 | // state for managed posture checks. 6 | package posture 7 | -------------------------------------------------------------------------------- /tstest/tailmac/Swift/Host/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /types/key/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package key contains types for different types of public and private keys 5 | // used by Tailscale. 6 | package key 7 | -------------------------------------------------------------------------------- /wgengine/watchdog_omit.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build js || ts_omit_debug 5 | 6 | package wgengine 7 | 8 | func NewWatchdog(e Engine) Engine { return e } 9 | -------------------------------------------------------------------------------- /cmd/tsconnect/src/pkg/pkg.css: -------------------------------------------------------------------------------- 1 | /* Copyright (c) Tailscale Inc & AUTHORS */ 2 | /* SPDX-License-Identifier: BSD-3-Clause */ 3 | 4 | @import "xterm/css/xterm.css"; 5 | 6 | @tailwind base; 7 | @tailwind components; 8 | @tailwind utilities; 9 | -------------------------------------------------------------------------------- /cmd/tsconnect/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./index.html", "./src/**/*.ts", "./src/**/*.tsx"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | } 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_doctor.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_doctor 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/doctor" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_tap.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build linux && !ts_omit_tap 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/tap" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_tpm.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ios && !ts_omit_tpm 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/tpm" 9 | -------------------------------------------------------------------------------- /gokrazy/gok: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This is a wrapper around gok that sets --parent_dir. 4 | 5 | dir=$(dirname "${BASH_SOURCE[0]}") 6 | 7 | cd $dir 8 | $dir/../tool/go run github.com/gokrazy/tools/cmd/gok --parent_dir="$dir" "$@" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_portlist.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_portlist 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/portlist" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_posture.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_posture 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/posture" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_taildrop.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_taildrop 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/taildrop" 9 | -------------------------------------------------------------------------------- /feature/condregister/useproxy/useproxy.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_useproxy 5 | 6 | package useproxy 7 | 8 | import _ "tailscale.com/feature/useproxy" 9 | -------------------------------------------------------------------------------- /gokrazy/tidy-deps.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build for_go_mod_tidy 5 | 6 | package gokrazy 7 | 8 | import ( 9 | _ "github.com/gokrazy/tools/cmd/gok" 10 | ) 11 | -------------------------------------------------------------------------------- /types/geo/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package geo provides functionality to represent and process geographical 5 | // locations on a spherical Earth. 6 | package geo 7 | -------------------------------------------------------------------------------- /client/systray/tailscale-systray.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Tailscale System Tray 3 | After=systemd.service 4 | 5 | [Service] 6 | Type=simple 7 | ExecStart=/usr/bin/tailscale systray 8 | 9 | [Install] 10 | WantedBy=default.target 11 | -------------------------------------------------------------------------------- /feature/condregister/maybe_capture.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ios && !ts_omit_capture 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/capture" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_syspolicy.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_syspolicy 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/syspolicy" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_wakeonlan.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_wakeonlan 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/wakeonlan" 9 | -------------------------------------------------------------------------------- /feature/condregister/oauthkey/maybe_oauthkey.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_oauthkey 5 | 6 | package oauthkey 7 | 8 | import _ "tailscale.com/feature/oauthkey" 9 | -------------------------------------------------------------------------------- /health/usermetrics_omit.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ts_omit_health || ts_omit_usermetrics 5 | 6 | package health 7 | 8 | func (t *Tracker) SetMetricsRegistry(any) {} 9 | -------------------------------------------------------------------------------- /k8s-operator/apis/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !plan9 5 | 6 | // +kubebuilder:object:generate=true 7 | // +groupName=tailscale.com 8 | package v1alpha1 9 | -------------------------------------------------------------------------------- /derp/derphttp/websocket_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !(js || ((linux || darwin) && ts_debug_websockets)) 5 | 6 | package derphttp 7 | 8 | const canWebsockets = false 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_osrouter.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_osrouter 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/wgengine/router/osrouter" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_sdnotify.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build linux && !ts_omit_sdnotify 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/sdnotify" 9 | -------------------------------------------------------------------------------- /gokrazy/natlabapp/README.md: -------------------------------------------------------------------------------- 1 | # NATLab Linux test Appliance 2 | 3 | This is the definition of the NATLab Linux test appliance image. 4 | It's similar to ../tsapp, but optimized for running in qemu in NATLab. 5 | 6 | See ../tsapp/README.md for more info. 7 | -------------------------------------------------------------------------------- /tstest/integration/vms/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package vms does VM-based integration/functional tests by using 5 | // qemu and a bank of pre-made VM images. 6 | package vms 7 | -------------------------------------------------------------------------------- /tstest/tailmac/Swift/Host/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /appc/observe_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ts_omit_appconnectors 5 | 6 | package appc 7 | 8 | func (e *AppConnector) ObserveDNSResponse(res []byte) error { return nil } 9 | -------------------------------------------------------------------------------- /client/web/src/assets/icons/chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /cmd/nginx-auth/tailscale.nginx-auth.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Tailscale NGINX Authentication socket 3 | PartOf=tailscale.nginx-auth.service 4 | 5 | [Socket] 6 | ListenStream=/var/run/tailscale.nginx-auth.sock 7 | 8 | [Install] 9 | WantedBy=sockets.target -------------------------------------------------------------------------------- /cmd/tailscaled/required_version.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !go1.23 5 | 6 | package main 7 | 8 | func init() { 9 | you_need_Go_1_23_to_compile_Tailscale() 10 | } 11 | -------------------------------------------------------------------------------- /feature/condregister/maybe_appconnectors.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_appconnectors 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/appconnectors" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_clientupdate.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_clientupdate 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/clientupdate" 9 | -------------------------------------------------------------------------------- /feature/condregister/portmapper/maybe_portmapper.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_portmapper 5 | 6 | package portmapper 7 | 8 | import _ "tailscale.com/feature/portmapper" 9 | -------------------------------------------------------------------------------- /gokrazy/natlabapp.arm64/README.md: -------------------------------------------------------------------------------- 1 | # NATLab Linux test Appliance 2 | 3 | This is the definition of the NATLab Linux test appliance image. 4 | It's similar to ../tsapp, but optimized for running in qemu in NATLab. 5 | 6 | See ../tsapp/README.md for more info. 7 | -------------------------------------------------------------------------------- /util/eventbus/assets/event.html: -------------------------------------------------------------------------------- 1 |
  • 2 |
    3 | {{.Count}}: {{.Type}} from {{.Event.From.Name}}, {{len .Event.To}} recipients 4 | {{.Event.Event}} 5 |
    6 |
  • 7 | -------------------------------------------------------------------------------- /util/racebuild/racebuild.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package racebuild exports a constant about whether the current binary 5 | // was built with the race detector. 6 | package racebuild 7 | -------------------------------------------------------------------------------- /client/tailscale/required_version.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !go1.23 5 | 6 | package tailscale 7 | 8 | func init() { 9 | you_need_Go_1_23_to_compile_Tailscale() 10 | } 11 | -------------------------------------------------------------------------------- /feature/condregister/maybe_debugportmapper.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_debugportmapper 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/debugportmapper" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_relayserver.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ios && !ts_omit_relayserver 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/relayserver" 9 | -------------------------------------------------------------------------------- /omit/aws_def.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_aws 5 | 6 | package omit 7 | 8 | // AWS is whether AWS support should be omitted from the build. 9 | const AWS = false 10 | -------------------------------------------------------------------------------- /omit/aws_omit.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ts_omit_aws 5 | 6 | package omit 7 | 8 | // AWS is whether AWS support should be omitted from the build. 9 | const AWS = true 10 | -------------------------------------------------------------------------------- /tstest/deptest/deptest_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package deptest 5 | 6 | import "testing" 7 | 8 | func TestImports(t *testing.T) { 9 | ImportAliasCheck(t, "../../") 10 | } 11 | -------------------------------------------------------------------------------- /cmd/tailscaled/sigpipe.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build go1.21 && !plan9 5 | 6 | package main 7 | 8 | import "syscall" 9 | 10 | func init() { 11 | sigPipe = syscall.SIGPIPE 12 | } 13 | -------------------------------------------------------------------------------- /feature/condregister/maybe_linkspeed.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build linux && !android && !ts_omit_linkspeed 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/linkspeed" 9 | -------------------------------------------------------------------------------- /release/dist/synology/files/resource: -------------------------------------------------------------------------------- 1 | { 2 | "port-config": { 3 | "protocol-file": "conf/Tailscale.sc" 4 | }, 5 | "usr-local-linker": { 6 | "bin": ["bin/tailscale"] 7 | }, 8 | "syslog-config": { 9 | "logrotate-relpath": "conf/logrotate.conf" 10 | } 11 | } -------------------------------------------------------------------------------- /util/osdiag/osdiag_notwindows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows 5 | 6 | package osdiag 7 | 8 | func supportInfo(LogSupportInfoReason) map[string]any { 9 | return nil 10 | } 11 | -------------------------------------------------------------------------------- /feature/condregister/useproxy/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package useproxy registers support for using proxies 5 | // if it's not disabled via the ts_omit_useproxy build tag. 6 | package useproxy 7 | -------------------------------------------------------------------------------- /wgengine/netstack/gro/netstack_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ts_omit_netstack 5 | 6 | package gro 7 | 8 | func RXChecksumOffload(any) any { 9 | panic("unreachable") 10 | } 11 | -------------------------------------------------------------------------------- /clientupdate/clientupdate_notwindows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows 5 | 6 | package clientupdate 7 | 8 | func (up *Updater) updateWindows() error { 9 | panic("unreachable") 10 | } 11 | -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/manifests/templates/03-secret.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: operator-oauth 5 | namespace: tailscale 6 | stringData: 7 | client_id: # SET CLIENT ID HERE 8 | client_secret: # SET CLIENT SECRET HERE 9 | --- 10 | -------------------------------------------------------------------------------- /feature/condregister/maybe_linuxdnsfight.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build linux && !android && !ts_omit_linuxdnsfight 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/feature/linuxdnsfight" 9 | -------------------------------------------------------------------------------- /feature/condregister/portmapper/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package portmapper registers support for portmapper 5 | // if it's not disabled via the ts_omit_portmapper build tag. 6 | package portmapper 7 | -------------------------------------------------------------------------------- /feature/linkspeed/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package linkspeed registers support for setting the TUN link speed on Linux, 5 | // to better integrate with system monitoring tools. 6 | package linkspeed 7 | -------------------------------------------------------------------------------- /hostinfo/packagetype_container.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build linux && ts_package_container 5 | 6 | package hostinfo 7 | 8 | func init() { 9 | linuxBuildTagPackageType = "container" 10 | } 11 | -------------------------------------------------------------------------------- /util/pidowner/pidowner_noimpl.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows && !linux 5 | 6 | package pidowner 7 | 8 | func ownerOfPID(pid int) (userID string, err error) { return "", ErrNotImplemented } 9 | -------------------------------------------------------------------------------- /util/sysresources/sysresources.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package sysresources provides OS-independent methods of determining the 5 | // resources available to the current system. 6 | package sysresources 7 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | You can report vulnerabilities privately to 6 | [security@tailscale.com](mailto:security@tailscale.com). Tailscale 7 | staff will triage the issue, and work with you on a coordinated 8 | disclosure timeline. 9 | -------------------------------------------------------------------------------- /client/web/src/assets/icons/check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /cmd/tsconnect/README.pkg.md: -------------------------------------------------------------------------------- 1 | # @tailscale/connect 2 | 3 | NPM package that contains a WebAssembly-based Tailscale client, see [the `cmd/tsconnect` directory in the tailscale repo](https://github.com/tailscale/tailscale/tree/main/cmd/tsconnect#library--npm-package) for more details. 4 | -------------------------------------------------------------------------------- /k8s-operator/api-proxy/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !plan9 5 | 6 | // Package apiproxy contains the Kubernetes API Proxy implementation used by 7 | // k8s-operator and k8s-proxy. 8 | package apiproxy 9 | -------------------------------------------------------------------------------- /ipn/desktop/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package desktop facilitates interaction with the desktop environment 5 | // and user sessions. As of 2025-02-06, it is only implemented for Windows. 6 | package desktop 7 | -------------------------------------------------------------------------------- /types/ptr/ptr.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package ptr contains the ptr.To function. 5 | package ptr 6 | 7 | // To returns a pointer to a shallow copy of v. 8 | func To[T any](v T) *T { 9 | return &v 10 | } 11 | -------------------------------------------------------------------------------- /util/sysresources/memory_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !(linux || darwin || freebsd || openbsd || dragonfly || netbsd) 5 | 6 | package sysresources 7 | 8 | func totalMemoryImpl() uint64 { return 0 } 9 | -------------------------------------------------------------------------------- /cmd/nginx-auth/tailscale.nginx-auth.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Tailscale NGINX Authentication service 3 | After=nginx.service 4 | Wants=nginx.service 5 | 6 | [Service] 7 | ExecStart=/usr/sbin/tailscale.nginx-auth 8 | DynamicUser=yes 9 | 10 | [Install] 11 | WantedBy=default.target 12 | -------------------------------------------------------------------------------- /feature/condregister/identityfederation/maybe_identityfederation.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_identityfederation 5 | 6 | package identityfederation 7 | 8 | import _ "tailscale.com/feature/identityfederation" 9 | -------------------------------------------------------------------------------- /feature/condregister/maybe_store_aws.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build (ts_aws || (linux && (arm64 || amd64) && !android)) && !ts_omit_aws 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/ipn/store/awsstore" 9 | -------------------------------------------------------------------------------- /net/dns/resolvconfpath_default.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !gokrazy 5 | 6 | package dns 7 | 8 | const ( 9 | resolvConf = "/etc/resolv.conf" 10 | backupConf = "/etc/resolv.pre-tailscale-backup.conf" 11 | ) 12 | -------------------------------------------------------------------------------- /net/dns/resolvconfpath_gokrazy.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build gokrazy 5 | 6 | package dns 7 | 8 | const ( 9 | resolvConf = "/tmp/resolv.conf" 10 | backupConf = "/tmp/resolv.pre-tailscale-backup.conf" 11 | ) 12 | -------------------------------------------------------------------------------- /release/dist/synology/files/config: -------------------------------------------------------------------------------- 1 | { 2 | ".url": { 3 | "SYNO.SDS.Tailscale": { 4 | "type": "url", 5 | "title": "Tailscale", 6 | "icon": "PACKAGE_ICON_256.PNG", 7 | "url": "webman/3rdparty/Tailscale/index.cgi/", 8 | "urlTarget": "_syno_tailscale" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /cmd/tailscale/cli/configure_linux-all.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package cli 5 | 6 | import "github.com/peterbourgon/ff/v3/ffcli" 7 | 8 | var maybeSystrayCmd func() *ffcli.Command // non-nil only on Linux, see configure_linux.go 9 | -------------------------------------------------------------------------------- /derp/export_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package derp 5 | 6 | import "time" 7 | 8 | func (c *Client) RecvTimeoutForTest(timeout time.Duration) (m ReceivedMessage, err error) { 9 | return c.recvTimeout(timeout) 10 | } 11 | -------------------------------------------------------------------------------- /docs/bird/sample_bird.conf: -------------------------------------------------------------------------------- 1 | log syslog all; 2 | 3 | protocol device { 4 | scan time 10; 5 | } 6 | 7 | protocol bgp { 8 | local as 64001; 9 | neighbor 10.40.2.101 as 64002; 10 | ipv4 { 11 | import none; 12 | export all; 13 | }; 14 | } 15 | 16 | include "tailscale_bird.conf"; 17 | -------------------------------------------------------------------------------- /feature/condregister/maybe_store_kube.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build (ts_kube || (linux && (arm64 || amd64) && !android)) && !ts_omit_kube 5 | 6 | package condregister 7 | 8 | import _ "tailscale.com/ipn/store/kubestore" 9 | -------------------------------------------------------------------------------- /tstest/tailmac/Host.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.virtualization 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tsweb/pprof_js.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build js && wasm 5 | 6 | package tsweb 7 | 8 | func addProfilingHandlers(d *DebugHandler) { 9 | // No pprof in js builds, pprof doesn't work and bloats the build. 10 | } 11 | -------------------------------------------------------------------------------- /cmd/containerboot/test_tailscale.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This is a fake tailscale CLI (and also iptables and ip6tables) that 4 | # records its arguments and exits successfully. 5 | # 6 | # It is used by main_test.go to test the behavior of containerboot. 7 | 8 | echo $0 $@ >>$TS_TEST_RECORD_ARGS 9 | -------------------------------------------------------------------------------- /cmd/nginx-auth/deb/prerm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | if [ "$1" = "remove" ]; then 4 | if [ -d /run/systemd/system ]; then 5 | deb-systemd-invoke stop 'tailscale.nginx-auth.service' >/dev/null || true 6 | deb-systemd-invoke stop 'tailscale.nginx-auth.socket' >/dev/null || true 7 | fi 8 | fi 9 | -------------------------------------------------------------------------------- /ipn/ipnserver/proxyconnect_js.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package ipnserver 5 | 6 | import "net/http" 7 | 8 | func (s *Server) handleProxyConnectConn(w http.ResponseWriter, r *http.Request) { 9 | panic("unreachable") 10 | } 11 | -------------------------------------------------------------------------------- /tstest/tailmac/TailMac.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.virtualization 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /version/race.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build race 5 | 6 | package version 7 | 8 | // IsRace reports whether the current binary was built with the Go 9 | // race detector enabled. 10 | func IsRace() bool { return true } 11 | -------------------------------------------------------------------------------- /feature/syspolicy/syspolicy.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package syspolicy provides an interface for system-wide policy management. 5 | package syspolicy 6 | 7 | import _ "tailscale.com/util/syspolicy" // for its registration side effects 8 | -------------------------------------------------------------------------------- /gokrazy/natlabapp.arm64/builddir/github.com/gokrazy/kernel.arm64/go.sum: -------------------------------------------------------------------------------- 1 | github.com/gokrazy/kernel.arm64 v0.0.0-20240830035047-cdba87a9eb0e h1:D9QYleJ7CI4p7gpgUT1mPgAlWMi5au6yOiE8/qC5PhE= 2 | github.com/gokrazy/kernel.arm64 v0.0.0-20240830035047-cdba87a9eb0e/go.mod h1:WWx72LXHEesuJxbopusRfSoKJQ6ffdwkT0DZditdrLo= 3 | -------------------------------------------------------------------------------- /k8s-operator/apis/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !plan9 5 | 6 | // Package apis contains a constant to name the Tailscale Kubernetes Operator's schema group. 7 | package apis 8 | 9 | const GroupName = "tailscale.com" 10 | -------------------------------------------------------------------------------- /net/stun/stun_fuzzer.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | //go:build gofuzz 4 | 5 | package stun 6 | 7 | func FuzzStunParser(data []byte) int { 8 | _, _, _ = ParseResponse(data) 9 | 10 | _, _ = ParseBindingRequest(data) 11 | return 1 12 | } 13 | -------------------------------------------------------------------------------- /util/quarantine/quarantine_default.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !darwin && !windows 5 | 6 | package quarantine 7 | 8 | import ( 9 | "os" 10 | ) 11 | 12 | func setQuarantineAttr(f *os.File) error { 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /version/race_off.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !race 5 | 6 | package version 7 | 8 | // IsRace reports whether the current binary was built with the Go 9 | // race detector enabled. 10 | func IsRace() bool { return false } 11 | -------------------------------------------------------------------------------- /client/web/src/assets/icons/x.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /release/dist/qnap/files/Tailscale/shared/ui/index.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | CONF=/etc/config/qpkg.conf 3 | QPKG_NAME="Tailscale" 4 | QPKG_ROOT=$(/sbin/getcfg ${QPKG_NAME} Install_Path -f ${CONF} -d"") 5 | exec "${QPKG_ROOT}/tailscale" --socket=/tmp/tailscale/tailscaled.sock web --cgi --prefix="/cgi-bin/qpkg/Tailscale/index.cgi/" 6 | -------------------------------------------------------------------------------- /release/rpm/rpm.postrm.sh: -------------------------------------------------------------------------------- 1 | # $1 == 0 for uninstallation. 2 | # $1 == 1 for removing old package during upgrade. 3 | 4 | systemctl daemon-reload >/dev/null 2>&1 || : 5 | if [ $1 -ge 1 ] ; then 6 | # Package upgrade, not uninstall 7 | systemctl try-restart tailscaled.service >/dev/null 2>&1 || : 8 | fi 9 | -------------------------------------------------------------------------------- /tstest/kernel_other.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux 5 | 6 | package tstest 7 | 8 | // KernelVersion returns (0, 0, 0) on unsupported platforms. 9 | func KernelVersion() (major, minor, patch int) { 10 | return 0, 0, 0 11 | } 12 | -------------------------------------------------------------------------------- /util/osshare/filesharingstatus_noop.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows 5 | 6 | package osshare 7 | 8 | import ( 9 | "tailscale.com/types/logger" 10 | ) 11 | 12 | func SetFileSharingEnabled(enabled bool, logf logger.Logf) {} 13 | -------------------------------------------------------------------------------- /atomicfile/atomicfile_notwindows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows 5 | 6 | package atomicfile 7 | 8 | import ( 9 | "os" 10 | ) 11 | 12 | func rename(srcFile, destFile string) error { 13 | return os.Rename(srcFile, destFile) 14 | } 15 | -------------------------------------------------------------------------------- /client/web/src/ui/portal-container-context.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | import React from "react" 5 | 6 | const PortalContainerContext = React.createContext( 7 | undefined 8 | ) 9 | export default PortalContainerContext 10 | -------------------------------------------------------------------------------- /cmd/nardump/README.md: -------------------------------------------------------------------------------- 1 | # nardump 2 | 3 | nardump is like nix-store --dump, but in Go, writing a NAR file (tar-like, 4 | but focused on being reproducible) to stdout or to a hash with the --sri flag. 5 | 6 | It lets us calculate the Nix sha256 in shell.nix without the person running 7 | git-pull-oss.sh having Nix available. 8 | -------------------------------------------------------------------------------- /cmd/tailscaled/ssh.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build (linux || darwin || freebsd || openbsd || plan9) && !ts_omit_ssh 5 | 6 | package main 7 | 8 | // Force registration of tailssh with LocalBackend. 9 | import _ "tailscale.com/ssh/tailssh" 10 | -------------------------------------------------------------------------------- /doctor/permissions/permissions_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package permissions 5 | 6 | import "testing" 7 | 8 | func TestPermissionsImpl(t *testing.T) { 9 | if err := permissionsImpl(t.Logf); err != nil { 10 | t.Error(err) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /net/tstun/tun_notwindows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows 5 | 6 | package tstun 7 | 8 | import "github.com/tailscale/wireguard-go/tun" 9 | 10 | func interfaceName(dev tun.Device) (string, error) { 11 | return dev.Name() 12 | } 13 | -------------------------------------------------------------------------------- /tool/gocross/exec_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build unix 5 | 6 | package main 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | func doExec(cmd string, args []string, env []string) error { 11 | return unix.Exec(cmd, args, env) 12 | } 13 | -------------------------------------------------------------------------------- /version/distro/distro_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package distro 5 | 6 | import "testing" 7 | 8 | func BenchmarkGet(b *testing.B) { 9 | b.ReportAllocs() 10 | var d Distro 11 | for range b.N { 12 | d = Get() 13 | } 14 | _ = d 15 | } 16 | -------------------------------------------------------------------------------- /derp/derpserver/derpserver_default.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux || android 5 | 6 | package derpserver 7 | 8 | import "context" 9 | 10 | func (c *sclient) startStatsLoop(ctx context.Context) { 11 | // Nothing to do 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /feature/capture/dissector/dissector.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package dissector contains the Lua dissector for Tailscale packets. 5 | package dissector 6 | 7 | import ( 8 | _ "embed" 9 | ) 10 | 11 | //go:embed ts-dissector.lua 12 | var Lua string 13 | -------------------------------------------------------------------------------- /tstest/integration/vms/distros_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package vms 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDistrosGotLoaded(t *testing.T) { 11 | if len(Distros) == 0 { 12 | t.Fatal("no distros were loaded") 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /version/export_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package version 5 | 6 | var ( 7 | ExportParse = parse 8 | ExportFindModuleInfo = findModuleInfo 9 | ExportCmdName = cmdName 10 | ) 11 | 12 | type ( 13 | ExportParsed = parsed 14 | ) 15 | -------------------------------------------------------------------------------- /feature/condlite/expvar/omit.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ts_omit_debug && ts_omit_clientmetrics && ts_omit_usermetrics 5 | 6 | // excluding the package from builds. 7 | package expvar 8 | 9 | type Int int64 10 | 11 | func (*Int) Add(int64) {} 12 | -------------------------------------------------------------------------------- /types/logger/rusage_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build windows || wasm || plan9 || tamago 5 | 6 | package logger 7 | 8 | func rusageMaxRSS() float64 { 9 | // TODO(apenwarr): Substitute Windows equivalent of Getrusage() here. 10 | return 0 11 | } 12 | -------------------------------------------------------------------------------- /clientupdate/clientupdate_not_downloads.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !((linux && !android) || windows) 5 | 6 | package clientupdate 7 | 8 | func (up *Updater) downloadURLToFile(pathSrc, fileDst string) (ret error) { 9 | panic("unreachable") 10 | } 11 | -------------------------------------------------------------------------------- /net/tcpinfo/tcpinfo_other.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux && !darwin 5 | 6 | package tcpinfo 7 | 8 | import ( 9 | "net" 10 | "time" 11 | ) 12 | 13 | func rttImpl(conn *net.TCPConn) (time.Duration, error) { 14 | return 0, ErrUnimplemented 15 | } 16 | -------------------------------------------------------------------------------- /version/cmdname_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ios 5 | 6 | package version 7 | 8 | import ( 9 | "os" 10 | ) 11 | 12 | func CmdName() string { 13 | e, err := os.Executable() 14 | if err != nil { 15 | return "cmd" 16 | } 17 | return e 18 | } 19 | -------------------------------------------------------------------------------- /cmd/tailscaled/tailscaled.defaults: -------------------------------------------------------------------------------- 1 | # Set the port to listen on for incoming VPN packets. 2 | # Remote nodes will automatically be informed about the new port number, 3 | # but you might want to configure this in order to set external firewall 4 | # settings. 5 | PORT="41641" 6 | 7 | # Extra flags you might want to pass to tailscaled. 8 | FLAGS="" 9 | -------------------------------------------------------------------------------- /feature/condregister/identityfederation/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package identityfederation registers support for authkey resolution 5 | // via identity federation if it's not disabled by the 6 | // ts_omit_identityfederation build tag. 7 | package identityfederation 8 | -------------------------------------------------------------------------------- /release/rpm/rpm.prerm.sh: -------------------------------------------------------------------------------- 1 | # $1 == 0 for uninstallation. 2 | # $1 == 1 for removing old package during upgrade. 3 | 4 | if [ $1 -eq 0 ] ; then 5 | # Package removal, not upgrade 6 | systemctl --no-reload disable tailscaled.service > /dev/null 2>&1 || : 7 | systemctl stop tailscaled.service > /dev/null 2>&1 || : 8 | fi 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Support 4 | url: https://tailscale.com/contact/support/ 5 | about: Contact us for support 6 | - name: Troubleshooting 7 | url: https://tailscale.com/kb/1023/troubleshooting 8 | about: See the troubleshooting guide for help addressing common issues -------------------------------------------------------------------------------- /tsconst/webclient.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package tsconst 5 | 6 | // WebListenPort is the static port used for the web client when run inside 7 | // tailscaled. (5252 are the numbers above the letters "TSTS" on a qwerty 8 | // keyboard.) 9 | const WebListenPort = 5252 10 | -------------------------------------------------------------------------------- /tstest/tailmac/TailMac.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /feature/tpm/tpm_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package tpm 5 | 6 | import ( 7 | "github.com/google/go-tpm/tpm2/transport" 8 | "github.com/google/go-tpm/tpm2/transport/windowstpm" 9 | ) 10 | 11 | func open() (transport.TPMCloser, error) { 12 | return windowstpm.Open() 13 | } 14 | -------------------------------------------------------------------------------- /tempfork/gliderlabs/ssh/ssh_test.go: -------------------------------------------------------------------------------- 1 | package ssh 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestKeysEqual(t *testing.T) { 8 | defer func() { 9 | if r := recover(); r != nil { 10 | t.Errorf("The code did panic") 11 | } 12 | }() 13 | 14 | if KeysEqual(nil, nil) { 15 | t.Error("two nil keys should not return true") 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tstest/tailmac/TailMac.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/chart/templates/.gitignore: -------------------------------------------------------------------------------- 1 | # Don't add helm chart CRDs to git. Canonical CRD files live in 2 | # cmd/k8s-operator/deploy/crds. 3 | # 4 | # Generate for local usage with: 5 | # go run tailscale.com/cmd/k8s-operator/generate helmcrd 6 | /connector.yaml 7 | /dnsconfig.yaml 8 | /proxyclass.yaml 9 | /proxygroup.yaml 10 | /recorder.yaml 11 | -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/manifests/nameserver/svc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: nameserver 5 | spec: 6 | selector: 7 | app: nameserver 8 | ports: 9 | - name: udp 10 | targetPort: 1053 11 | port: 53 12 | protocol: UDP 13 | - name: tcp 14 | targetPort: 1053 15 | port: 53 16 | protocol: TCP 17 | -------------------------------------------------------------------------------- /net/ktimeout/ktimeout_default.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux 5 | 6 | package ktimeout 7 | 8 | import ( 9 | "time" 10 | ) 11 | 12 | // SetUserTimeout is a no-op on this platform. 13 | func SetUserTimeout(fd uintptr, timeout time.Duration) error { 14 | return nil 15 | } 16 | -------------------------------------------------------------------------------- /tool/go: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This script acts like the "go" command, but uses Tailscale's 4 | # currently-desired version from https://github.com/tailscale/go, 5 | # downloading it first if necessary. 6 | 7 | case $(uname -s) in 8 | SunOS) 9 | exec go "$@" 10 | ;; 11 | esac 12 | 13 | exec "$(dirname "$0")/../tool/gocross/gocross-wrapper.sh" "$@" 14 | -------------------------------------------------------------------------------- /util/sysresources/memory.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package sysresources 5 | 6 | // TotalMemory returns the total accessible system memory, in bytes. If the 7 | // value cannot be determined, then 0 will be returned. 8 | func TotalMemory() uint64 { 9 | return totalMemoryImpl() 10 | } 11 | -------------------------------------------------------------------------------- /.github/workflows/docker-file-build.yml: -------------------------------------------------------------------------------- 1 | name: "Dockerfile build" 2 | on: 3 | push: 4 | branches: 5 | - main 6 | pull_request: 7 | jobs: 8 | deploy: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 12 | - name: "Build Docker image" 13 | run: docker build . 14 | -------------------------------------------------------------------------------- /net/neterror/neterror_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package neterror 5 | 6 | import ( 7 | "errors" 8 | 9 | "golang.org/x/sys/windows" 10 | ) 11 | 12 | func init() { 13 | packetWasTruncated = func(err error) bool { 14 | return errors.Is(err, windows.WSAEMSGSIZE) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tempfork/sshtest/README.md: -------------------------------------------------------------------------------- 1 | # sshtest 2 | 3 | This contains packages that are forked & locally hacked up for use 4 | in tests. 5 | 6 | Notably, `golang.org/x/crypto/ssh` was copied to 7 | `tailscale.com/tempfork/sshtest/ssh` to permit adding behaviors specific 8 | to testing (for testing Tailscale SSH) that aren't necessarily desirable 9 | to have upstream. 10 | -------------------------------------------------------------------------------- /client/web/src/assets/icons/arrow-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /client/web/src/assets/icons/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /cmd/tsconnect/src/types/esbuild.d.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | /** 5 | * @fileoverview Type definitions for types generated by the esbuild build 6 | * process. 7 | */ 8 | 9 | declare module "*.wasm" { 10 | const path: string 11 | export default path 12 | } 13 | 14 | declare const DEBUG: boolean 15 | -------------------------------------------------------------------------------- /release/dist/synology/files/privilege-dsm7.for-package-center: -------------------------------------------------------------------------------- 1 | { 2 | "defaults":{ 3 | "run-as": "package" 4 | }, 5 | "username": "tailscale", 6 | "groupname": "tailscale", 7 | "tool": [{ 8 | "relpath": "bin/tailscaled", 9 | "user": "package", 10 | "group": "package", 11 | "capabilities": "cap_net_admin,cap_chown,cap_net_raw" 12 | }] 13 | } 14 | -------------------------------------------------------------------------------- /syncs/mutex_debug.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ts_mutex_debug 5 | 6 | package syncs 7 | 8 | import "sync" 9 | 10 | type Mutex struct { 11 | sync.Mutex 12 | } 13 | 14 | type RWMutex struct { 15 | sync.RWMutex 16 | } 17 | 18 | // TODO(bradfitz): actually track stuff when in debug mode. 19 | -------------------------------------------------------------------------------- /docs/k8s/rolebinding.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Tailscale Inc & AUTHORS 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | apiVersion: rbac.authorization.k8s.io/v1 4 | kind: RoleBinding 5 | metadata: 6 | name: tailscale 7 | subjects: 8 | - kind: ServiceAccount 9 | name: "{{SA_NAME}}" 10 | roleRef: 11 | kind: Role 12 | name: tailscale 13 | apiGroup: rbac.authorization.k8s.io 14 | -------------------------------------------------------------------------------- /net/netmon/interfaces_windows_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package netmon 5 | 6 | import "testing" 7 | 8 | func BenchmarkGetPACWindows(b *testing.B) { 9 | b.ReportAllocs() 10 | for i := range b.N { 11 | v := getPACWindows() 12 | if i == 0 { 13 | b.Logf("Got: %q", v) 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /util/sysresources/memory_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build darwin 5 | 6 | package sysresources 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | func totalMemoryImpl() uint64 { 11 | val, err := unix.SysctlUint64("hw.memsize") 12 | if err != nil { 13 | return 0 14 | } 15 | return val 16 | } 17 | -------------------------------------------------------------------------------- /cmd/tailscale/cli/ssh_exec_js.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package cli 5 | 6 | import ( 7 | "errors" 8 | ) 9 | 10 | func findSSH() (string, error) { 11 | return "", errors.New("Not implemented") 12 | } 13 | 14 | func execSSH(ssh string, argv []string) error { 15 | return errors.New("Not implemented") 16 | } 17 | -------------------------------------------------------------------------------- /cmd/tsconnect/dev.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !plan9 5 | 6 | package main 7 | 8 | import ( 9 | "log" 10 | ) 11 | 12 | func runDev() { 13 | buildOptions, err := commonSetup(devMode) 14 | if err != nil { 15 | log.Fatalf("Cannot setup: %v", err) 16 | } 17 | runEsbuildServe(*buildOptions) 18 | } 19 | -------------------------------------------------------------------------------- /net/sockopts/sockopts_notwindows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows 5 | 6 | package sockopts 7 | 8 | import ( 9 | "tailscale.com/types/nettype" 10 | ) 11 | 12 | // SetICMPErrImmunity is no-op on non-Windows. 13 | func SetICMPErrImmunity(pconn nettype.PacketConn) error { 14 | return nil 15 | } 16 | -------------------------------------------------------------------------------- /util/rands/rands_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package rands 5 | 6 | import "testing" 7 | 8 | func TestHexString(t *testing.T) { 9 | for i := 0; i <= 8; i++ { 10 | s := HexString(i) 11 | if len(s) != i { 12 | t.Errorf("HexString(%v) = %q; want len %v, not %v", i, s, i, len(s)) 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /cmd/tailscale/cli/configure-kube_omit.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ts_omit_kube 5 | 6 | package cli 7 | 8 | import "github.com/peterbourgon/ff/v3/ffcli" 9 | 10 | func configureKubeconfigCmd() *ffcli.Command { 11 | // omitted from the build when the ts_omit_kube build tag is set 12 | return nil 13 | } 14 | -------------------------------------------------------------------------------- /clientupdate/distsign/roots_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package distsign 5 | 6 | import "testing" 7 | 8 | func TestParseRoots(t *testing.T) { 9 | roots, err := parseRoots() 10 | if err != nil { 11 | t.Fatal(err) 12 | } 13 | if len(roots) == 0 { 14 | t.Error("parseRoots returned no root keys") 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /cmd/nginx-auth/rpm/postrm.sh: -------------------------------------------------------------------------------- 1 | # $1 == 0 for uninstallation. 2 | # $1 == 1 for removing old package during upgrade. 3 | 4 | systemctl daemon-reload >/dev/null 2>&1 || : 5 | if [ $1 -ge 1 ] ; then 6 | # Package upgrade, not uninstall 7 | systemctl stop tailscale.nginx-auth.service >/dev/null 2>&1 || : 8 | systemctl try-restart tailscale.nginx-auth.socket >/dev/null 2>&1 || : 9 | fi 10 | -------------------------------------------------------------------------------- /cmd/tsconnect/dev-pkg.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !plan9 5 | 6 | package main 7 | 8 | import ( 9 | "log" 10 | ) 11 | 12 | func runDevPkg() { 13 | buildOptions, err := commonPkgSetup(devMode) 14 | if err != nil { 15 | log.Fatalf("Cannot setup: %v", err) 16 | } 17 | runEsbuildServe(*buildOptions) 18 | } 19 | -------------------------------------------------------------------------------- /feature/tpm/tpm_other.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux && !windows 5 | 6 | package tpm 7 | 8 | import ( 9 | "errors" 10 | 11 | "github.com/google/go-tpm/tpm2/transport" 12 | ) 13 | 14 | func open() (transport.TPMCloser, error) { 15 | return nil, errors.New("TPM not supported on this platform") 16 | } 17 | -------------------------------------------------------------------------------- /util/deephash/pointer_norace.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !race 5 | 6 | package deephash 7 | 8 | import "reflect" 9 | 10 | type pointer = unsafePointer 11 | 12 | // pointerOf returns a pointer from v, which must be a reflect.Pointer. 13 | func pointerOf(v reflect.Value) pointer { return unsafePointerOf(v) } 14 | -------------------------------------------------------------------------------- /util/eventbus/debughttp_off.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ios || android || ts_omit_debugeventbus 5 | 6 | package eventbus 7 | 8 | type tswebDebugHandler = any // actually *tsweb.DebugHandler; any to avoid import tsweb with ts_omit_debugeventbus 9 | 10 | func (*Debugger) RegisterHTTP(td tswebDebugHandler) {} 11 | -------------------------------------------------------------------------------- /gokrazy/tsapp/builddir/github.com/gokrazy/rpi-eeprom/go.sum: -------------------------------------------------------------------------------- 1 | github.com/gokrazy/rpi-eeprom v0.0.0-20240518032756-37da22ee9608 h1:8uderKR+8eXR0nRcyBugql1YPoJQjpjoltHqX9yl2DI= 2 | github.com/gokrazy/rpi-eeprom v0.0.0-20240518032756-37da22ee9608/go.mod h1:vabxV1M+i6S3rGuWoFieHxCJW3jlob3rqe0KV82j+0o= 3 | golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 4 | -------------------------------------------------------------------------------- /ipn/localapi/disabled_stubs.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ios || android || js 5 | 6 | package localapi 7 | 8 | import ( 9 | "net/http" 10 | "runtime" 11 | ) 12 | 13 | func (h *Handler) serveCert(w http.ResponseWriter, r *http.Request) { 14 | http.Error(w, "disabled on "+runtime.GOOS, http.StatusNotFound) 15 | } 16 | -------------------------------------------------------------------------------- /disco/disco_fuzzer.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | //go:build gofuzz 4 | 5 | package disco 6 | 7 | func Fuzz(data []byte) int { 8 | m, _ := Parse(data) 9 | 10 | newBytes := m.AppendMarshal(data) 11 | parsedMarshall, _ := Parse(newBytes) 12 | 13 | if m != parsedMarshall { 14 | panic("Parsing error") 15 | } 16 | return 1 17 | } 18 | -------------------------------------------------------------------------------- /doctor/ethtool/ethtool_other.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux || android 5 | 6 | package ethtool 7 | 8 | import ( 9 | "runtime" 10 | 11 | "tailscale.com/types/logger" 12 | ) 13 | 14 | func ethtoolImpl(logf logger.Logf) error { 15 | logf("unsupported on %s/%s", runtime.GOOS, runtime.GOARCH) 16 | return nil 17 | } 18 | -------------------------------------------------------------------------------- /net/netmon/interfaces_defaultrouteif_todo.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux && !windows && !darwin && !freebsd && !android 5 | 6 | package netmon 7 | 8 | import "errors" 9 | 10 | var errTODO = errors.New("TODO") 11 | 12 | func defaultRoute() (DefaultRouteDetails, error) { 13 | return DefaultRouteDetails{}, errTODO 14 | } 15 | -------------------------------------------------------------------------------- /safesocket/safesocket_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package safesocket 5 | 6 | import "testing" 7 | 8 | func TestLocalTCPPortAndToken(t *testing.T) { 9 | // Just test that it compiles for now (is available on all platforms). 10 | port, token, err := LocalTCPPortAndToken() 11 | t.Logf("got %v, %s, %v", port, token, err) 12 | } 13 | -------------------------------------------------------------------------------- /cmd/tailscale/cli/configure_apple-all.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package cli 5 | 6 | import "github.com/peterbourgon/ff/v3/ffcli" 7 | 8 | var ( 9 | maybeSysExtCmd func() *ffcli.Command // non-nil only on macOS, see configure_apple.go 10 | maybeVPNConfigCmd func() *ffcli.Command // non-nil only on macOS, see configure_apple.go 11 | ) 12 | -------------------------------------------------------------------------------- /cmd/tsshd/tsshd.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ignore 5 | 6 | // The tsshd binary was an experimental SSH server that accepts connections 7 | // from anybody on the same Tailscale network. 8 | // 9 | // Its functionality moved into tailscaled. 10 | // 11 | // See https://github.com/tailscale/tailscale/issues/3802 12 | package main 13 | -------------------------------------------------------------------------------- /feature/condlite/expvar/expvar.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !(ts_omit_debug && ts_omit_clientmetrics && ts_omit_usermetrics) 5 | 6 | // Package expvar contains type aliases for expvar types, to allow conditionally 7 | // excluding the package from builds. 8 | package expvar 9 | 10 | import "expvar" 11 | 12 | type Int = expvar.Int 13 | -------------------------------------------------------------------------------- /util/sysresources/memory_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build freebsd || openbsd || dragonfly || netbsd 5 | 6 | package sysresources 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | func totalMemoryImpl() uint64 { 11 | val, err := unix.SysctlUint64("hw.physmem") 12 | if err != nil { 13 | return 0 14 | } 15 | return val 16 | } 17 | -------------------------------------------------------------------------------- /logtail/README.md: -------------------------------------------------------------------------------- 1 | # Tailscale Logs Service 2 | 3 | This github repository contains libraries, documentation, and examples 4 | for working with the public API of the tailscale logs service. 5 | 6 | For a very quick introduction to the core features, read the 7 | [API docs](api.md) and peruse the 8 | [logs reprocessing](./example/logreprocess/demo.sh) example. 9 | 10 | For more information, write to info@tailscale.io. -------------------------------------------------------------------------------- /prober/tun_default.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux && !darwin 5 | 6 | package prober 7 | 8 | import ( 9 | "fmt" 10 | "net/netip" 11 | "runtime" 12 | ) 13 | 14 | const tunName = "unused" 15 | 16 | func configureTUN(addr netip.Prefix, tunname string) error { 17 | return fmt.Errorf("not implemented on " + runtime.GOOS) 18 | } 19 | -------------------------------------------------------------------------------- /util/linuxfw/linuxfwtest/linuxfwtest_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !cgo || !linux 5 | 6 | package linuxfwtest 7 | 8 | import ( 9 | "testing" 10 | ) 11 | 12 | type SizeInfo struct { 13 | SizeofSocklen uintptr 14 | } 15 | 16 | func TestSizes(t *testing.T, si *SizeInfo) { 17 | t.Skip("not supported without cgo") 18 | } 19 | -------------------------------------------------------------------------------- /cmd/tailscale/cli/ffcomplete/scripts_omit.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build go1.19 && !ts_omit_completion && ts_omit_completion_scripts 5 | 6 | package ffcomplete 7 | 8 | import "github.com/peterbourgon/ff/v3/ffcli" 9 | 10 | func scriptCmds(root *ffcli.Command, usageFunc func(*ffcli.Command) string) []*ffcli.Command { 11 | return nil 12 | } 13 | -------------------------------------------------------------------------------- /drive/driveimpl/shared/xml.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package shared 5 | 6 | import ( 7 | "bytes" 8 | "encoding/xml" 9 | ) 10 | 11 | // EscapeForXML escapes the given string for use in XML text. 12 | func EscapeForXML(s string) string { 13 | result := bytes.NewBuffer(nil) 14 | xml.Escape(result, []byte(s)) 15 | return result.String() 16 | } 17 | -------------------------------------------------------------------------------- /net/netns/netns_linux_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package netns 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestSocketMarkWorks(t *testing.T) { 11 | _ = socketMarkWorks() 12 | // we cannot actually assert whether the test runner has SO_MARK available 13 | // or not, as we don't know. We're just checking that it doesn't panic. 14 | } 15 | -------------------------------------------------------------------------------- /net/netstat/netstat_noimpl.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows 5 | 6 | package netstat 7 | 8 | // OSMetadata includes any additional OS-specific information that may be 9 | // obtained during the retrieval of a given Entry. 10 | type OSMetadata struct{} 11 | 12 | func get() (*Table, error) { 13 | return nil, ErrNotImplemented 14 | } 15 | -------------------------------------------------------------------------------- /wgengine/magicsock/magicsock_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build plan9 5 | 6 | package magicsock 7 | 8 | // shouldRebind returns if the error is one that is known to be healed by a 9 | // rebind, and if so also returns a resason string for the rebind. 10 | func shouldRebind(err error) (ok bool, reason string) { 11 | return false, "" 12 | } 13 | -------------------------------------------------------------------------------- /cmd/nginx-auth/rpm/prerm.sh: -------------------------------------------------------------------------------- 1 | # $1 == 0 for uninstallation. 2 | # $1 == 1 for removing old package during upgrade. 3 | 4 | if [ $1 -eq 0 ] ; then 5 | # Package removal, not upgrade 6 | systemctl --no-reload disable tailscale.nginx-auth.socket > /dev/null 2>&1 || : 7 | systemctl stop tailscale.nginx-auth.socket > /dev/null 2>&1 || : 8 | systemctl stop tailscale.nginx-auth.service > /dev/null 2>&1 || : 9 | fi 10 | -------------------------------------------------------------------------------- /cmd/tsconnect/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "module": "ES2020", 5 | "moduleResolution": "node", 6 | "isolatedModules": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "sourceMap": true, 10 | "jsx": "react-jsx", 11 | "jsxImportSource": "preact" 12 | }, 13 | "include": ["src/**/*"], 14 | "exclude": ["node_modules"] 15 | } 16 | -------------------------------------------------------------------------------- /wgengine/magicsock/endpoint_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build wasm || plan9 5 | 6 | package magicsock 7 | 8 | // isBadEndpointErr checks if err is one which is known to report that an 9 | // endpoint can no longer be sent to. It is not exhaustive, but covers known 10 | // cases. 11 | func isBadEndpointErr(err error) bool { 12 | return false 13 | } 14 | -------------------------------------------------------------------------------- /wgengine/netstack/netstack_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package netstack 5 | 6 | import ( 7 | "os/exec" 8 | "syscall" 9 | 10 | "golang.org/x/sys/unix" 11 | ) 12 | 13 | func init() { 14 | setAmbientCapsRaw = func(cmd *exec.Cmd) { 15 | cmd.SysProcAttr = &syscall.SysProcAttr{ 16 | AmbientCaps: []uintptr{unix.CAP_NET_RAW}, 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /wgengine/router/osrouter/osrouter_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package osrouter 5 | 6 | import "net/netip" 7 | 8 | //lint:ignore U1000 used in Windows/Linux tests only 9 | func mustCIDRs(ss ...string) []netip.Prefix { 10 | var ret []netip.Prefix 11 | for _, s := range ss { 12 | ret = append(ret, netip.MustParsePrefix(s)) 13 | } 14 | return ret 15 | } 16 | -------------------------------------------------------------------------------- /gokrazy/Makefile: -------------------------------------------------------------------------------- 1 | help: 2 | echo "See Makefile" 3 | 4 | image: 5 | go run build.go --build 6 | 7 | qemu: image 8 | qemu-system-x86_64 -m 1G -drive file=tsapp.img,format=raw -boot d -netdev user,id=user.0 -device virtio-net-pci,netdev=user.0 -serial mon:stdio -audio none 9 | 10 | # For natlab integration tests: 11 | natlab: 12 | go run build.go --build --app=natlabapp 13 | qemu-img convert -O qcow2 natlabapp.img natlabapp.qcow2 14 | -------------------------------------------------------------------------------- /atomicfile/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package atomicfile 5 | 6 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go mksyscall.go 7 | 8 | //sys replaceFileW(replaced *uint16, replacement *uint16, backup *uint16, flags uint32, exclude unsafe.Pointer, reserved unsafe.Pointer) (err error) [int32(failretval)==0] = kernel32.ReplaceFileW 9 | -------------------------------------------------------------------------------- /doctor/permissions/permissions_other.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !(linux || darwin || freebsd || openbsd) 5 | 6 | package permissions 7 | 8 | import ( 9 | "runtime" 10 | 11 | "tailscale.com/types/logger" 12 | ) 13 | 14 | func permissionsImpl(logf logger.Logf) error { 15 | logf("unsupported on %s/%s", runtime.GOOS, runtime.GOARCH) 16 | return nil 17 | } 18 | -------------------------------------------------------------------------------- /net/art/art_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package art 5 | 6 | import ( 7 | "os" 8 | "testing" 9 | 10 | "tailscale.com/util/cibuild" 11 | ) 12 | 13 | func TestMain(m *testing.M) { 14 | if cibuild.On() { 15 | // Skip CI on GitHub for now 16 | // TODO: https://github.com/tailscale/tailscale/issues/7866 17 | os.Exit(0) 18 | } 19 | os.Exit(m.Run()) 20 | } 21 | -------------------------------------------------------------------------------- /util/deephash/testtype/testtype.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package testtype contains types for testing deephash. 5 | package testtype 6 | 7 | import "time" 8 | 9 | type UnexportedAddressableTime struct { 10 | t time.Time 11 | } 12 | 13 | func NewUnexportedAddressableTime(t time.Time) *UnexportedAddressableTime { 14 | return &UnexportedAddressableTime{t: t} 15 | } 16 | -------------------------------------------------------------------------------- /net/netns/socks.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ios && !js && !android && !ts_omit_useproxy 5 | 6 | package netns 7 | 8 | import "golang.org/x/net/proxy" 9 | 10 | func init() { 11 | wrapDialer = wrapSocks 12 | } 13 | 14 | func wrapSocks(d Dialer) Dialer { 15 | if cd, ok := proxy.FromEnvironmentUsing(d).(Dialer); ok { 16 | return cd 17 | } 18 | return d 19 | } 20 | -------------------------------------------------------------------------------- /cmd/tailscale/generate.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package main 5 | 6 | //go:generate go run tailscale.com/cmd/mkmanifest amd64 windows-manifest.xml manifest_windows_amd64.syso 7 | //go:generate go run tailscale.com/cmd/mkmanifest 386 windows-manifest.xml manifest_windows_386.syso 8 | //go:generate go run tailscale.com/cmd/mkmanifest arm64 windows-manifest.xml manifest_windows_arm64.syso 9 | -------------------------------------------------------------------------------- /cmd/tailscaled/generate.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package main 5 | 6 | //go:generate go run tailscale.com/cmd/mkmanifest amd64 windows-manifest.xml manifest_windows_amd64.syso 7 | //go:generate go run tailscale.com/cmd/mkmanifest 386 windows-manifest.xml manifest_windows_386.syso 8 | //go:generate go run tailscale.com/cmd/mkmanifest arm64 windows-manifest.xml manifest_windows_arm64.syso 9 | -------------------------------------------------------------------------------- /drive/remote_nonunix.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !unix 5 | 6 | package drive 7 | 8 | func doAllowShareAs() bool { 9 | // On non-UNIX platforms, we use the GUI application (e.g. Windows taskbar 10 | // icon) to access the filesystem as whatever unprivileged user is running 11 | // the GUI app, so we cannot allow sharing as a different user. 12 | return false 13 | } 14 | -------------------------------------------------------------------------------- /hostinfo/hostinfo_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build darwin 5 | 6 | package hostinfo 7 | 8 | import ( 9 | "os" 10 | "path/filepath" 11 | ) 12 | 13 | func init() { 14 | packageType = packageTypeDarwin 15 | } 16 | 17 | func packageTypeDarwin() string { 18 | // Using tailscaled or IPNExtension? 19 | exe, _ := os.Executable() 20 | return filepath.Base(exe) 21 | } 22 | -------------------------------------------------------------------------------- /feature/buildfeatures/buildfeatures.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:generate go run gen.go 5 | 6 | // The buildfeatures package contains boolean constants indicating which 7 | // features were included in the binary (via build tags), for use in dead code 8 | // elimination when using separate build tag protected files is impractical 9 | // or undesirable. 10 | package buildfeatures 11 | -------------------------------------------------------------------------------- /net/netns/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package netns 5 | 6 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go mksyscall.go 7 | //go:generate go run golang.org/x/tools/cmd/goimports -w zsyscall_windows.go 8 | 9 | //sys getBestInterfaceEx(sockaddr *winipcfg.RawSockaddrInet, bestIfaceIndex *uint32) (ret error) = iphlpapi.GetBestInterfaceEx 10 | -------------------------------------------------------------------------------- /net/netstat/netstat_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package netstat 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestGet(t *testing.T) { 11 | nt, err := Get() 12 | if err == ErrNotImplemented { 13 | t.Skip("TODO: not implemented") 14 | } 15 | if err != nil { 16 | t.Fatal(err) 17 | } 18 | for _, e := range nt.Entries { 19 | t.Logf("Entry: %+v", e) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /net/routetable/routetable_other.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build android || (!linux && !darwin && !freebsd) 5 | 6 | package routetable 7 | 8 | import ( 9 | "errors" 10 | "runtime" 11 | ) 12 | 13 | var errUnsupported = errors.New("cannot get route table on platform " + runtime.GOOS) 14 | 15 | func Get(max int) ([]RouteEntry, error) { 16 | return nil, errUnsupported 17 | } 18 | -------------------------------------------------------------------------------- /net/tstun/ifstatus_noop.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows 5 | 6 | package tstun 7 | 8 | import ( 9 | "time" 10 | 11 | "github.com/tailscale/wireguard-go/tun" 12 | "tailscale.com/types/logger" 13 | ) 14 | 15 | // Dummy implementation that does nothing. 16 | func waitInterfaceUp(iface tun.Device, timeout time.Duration, logf logger.Logf) error { 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /wgengine/magicsock/derp_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package magicsock 5 | 6 | import ( 7 | "testing" 8 | 9 | "tailscale.com/net/netcheck" 10 | ) 11 | 12 | func CheckDERPHeuristicTimes(t *testing.T) { 13 | if netcheck.PreferredDERPFrameTime <= frameReceiveRecordRate { 14 | t.Errorf("PreferredDERPFrameTime too low; should be at least frameReceiveRecordRate") 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /wgengine/magicsock/magicsock_default.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux || ts_omit_listenrawdisco 5 | 6 | package magicsock 7 | 8 | import ( 9 | "errors" 10 | "fmt" 11 | "io" 12 | ) 13 | 14 | func (c *Conn) listenRawDisco(family string) (io.Closer, error) { 15 | return nil, fmt.Errorf("raw disco listening not supported on this OS: %w", errors.ErrUnsupported) 16 | } 17 | -------------------------------------------------------------------------------- /cmd/tailscaled/with_cli.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ts_include_cli 5 | 6 | package main 7 | 8 | import ( 9 | "fmt" 10 | "os" 11 | 12 | "tailscale.com/cmd/tailscale/cli" 13 | ) 14 | 15 | func init() { 16 | beCLI = func() { 17 | args := os.Args[1:] 18 | if err := cli.Run(args); err != nil { 19 | fmt.Fprintln(os.Stderr, err) 20 | os.Exit(1) 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /hostinfo/hostinfo_container_linux_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build linux && !android && ts_package_container 5 | 6 | package hostinfo 7 | 8 | import ( 9 | "testing" 10 | ) 11 | 12 | func TestInContainer(t *testing.T) { 13 | if got := inContainer(); !got.EqualBool(true) { 14 | t.Errorf("inContainer = %v; want true due to ts_package_container build tag", got) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logtail/filch/filch_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build wasm || plan9 || tamago 5 | 6 | package filch 7 | 8 | import ( 9 | "os" 10 | ) 11 | 12 | func saveStderr() (*os.File, error) { 13 | return os.Stderr, nil 14 | } 15 | 16 | func unsaveStderr(f *os.File) error { 17 | os.Stderr = f 18 | return nil 19 | } 20 | 21 | func dup2Stderr(f *os.File) error { 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /tstest/tools/tools.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build tools 5 | 6 | // This file exists just so `go mod tidy` won't remove 7 | // tool modules from our go.mod. 8 | package tools 9 | 10 | import ( 11 | _ "github.com/elastic/crd-ref-docs" 12 | _ "github.com/tailscale/mkctr" 13 | _ "honnef.co/go/tools/cmd/staticcheck" 14 | _ "sigs.k8s.io/controller-tools/cmd/controller-gen" 15 | ) 16 | -------------------------------------------------------------------------------- /cmd/tailscaled/tailscaled_bird.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build go1.19 && (linux || darwin || freebsd || openbsd) && !ts_omit_bird 5 | 6 | package main 7 | 8 | import ( 9 | "tailscale.com/chirp" 10 | "tailscale.com/wgengine" 11 | ) 12 | 13 | func init() { 14 | createBIRDClient = func(ctlSocket string) (wgengine.BIRDClient, error) { 15 | return chirp.New(ctlSocket) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /cmd/tsconnect/src/lib/js-state-store.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | /** @fileoverview Callbacks used by jsStateStore to persist IPN state. */ 5 | 6 | export const sessionStateStorage: IPNStateStorage = { 7 | setState(id, value) { 8 | window.sessionStorage[`ipn-state-${id}`] = value 9 | }, 10 | getState(id) { 11 | return window.sessionStorage[`ipn-state-${id}`] || "" 12 | }, 13 | } 14 | -------------------------------------------------------------------------------- /drive/driveimpl/dirfs/removeall.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package dirfs 5 | 6 | import ( 7 | "context" 8 | "os" 9 | ) 10 | 11 | // RemoveAll implements webdav.File. No removal is supported and this always 12 | // returns os.ErrPermission. 13 | func (dfs *FS) RemoveAll(ctx context.Context, name string) error { 14 | return &os.PathError{Op: "rm", Path: name, Err: os.ErrPermission} 15 | } 16 | -------------------------------------------------------------------------------- /safesocket/safesocket_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build plan9 5 | 6 | package safesocket 7 | 8 | import ( 9 | "context" 10 | "net" 11 | ) 12 | 13 | func connect(_ context.Context, path string) (net.Conn, error) { 14 | return net.Dial("tcp", "localhost:5252") 15 | } 16 | 17 | func listen(path string) (net.Listener, error) { 18 | return net.Listen("tcp", "localhost:5252") 19 | } 20 | -------------------------------------------------------------------------------- /cmd/tailscaled/tailscaled_notwindows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows && go1.19 5 | 6 | package main // import "tailscale.com/cmd/tailscaled" 7 | 8 | import "tailscale.com/logpolicy" 9 | 10 | func isWindowsService() bool { return false } 11 | 12 | func runWindowsService(pol *logpolicy.Policy) error { panic("unreachable") } 13 | 14 | func beWindowsSubprocess() bool { return false } 15 | -------------------------------------------------------------------------------- /wgengine/router/osrouter/router_windows_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package osrouter 5 | 6 | import ( 7 | "path/filepath" 8 | "testing" 9 | ) 10 | 11 | func TestGetNetshPath(t *testing.T) { 12 | ft := &firewallTweaker{ 13 | logf: t.Logf, 14 | } 15 | path := ft.getNetshPath() 16 | if !filepath.IsAbs(path) { 17 | t.Errorf("expected absolute path for netsh.exe: %q", path) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tstime/jitter.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package tstime 5 | 6 | import ( 7 | "math/rand/v2" 8 | "time" 9 | ) 10 | 11 | // RandomDurationBetween returns a random duration in range [min,max). 12 | // If panics if max < min. 13 | func RandomDurationBetween(min, max time.Duration) time.Duration { 14 | diff := max - min 15 | if diff == 0 { 16 | return min 17 | } 18 | return min + rand.N(max-min) 19 | } 20 | -------------------------------------------------------------------------------- /util/quarantine/quarantine.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package quarantine sets platform specific "quarantine" attributes on files 5 | // that are received from other hosts. 6 | package quarantine 7 | 8 | import "os" 9 | 10 | // SetOnFile sets the platform-specific quarantine attribute (if any) on the 11 | // provided file. 12 | func SetOnFile(f *os.File) error { 13 | return setQuarantineAttr(f) 14 | } 15 | -------------------------------------------------------------------------------- /util/winutil/testdata/testrestartableprocesses/restartableprocess_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // The testrestartableprocesses is a program for a test. 5 | package main 6 | 7 | import ( 8 | "golang.org/x/sys/windows" 9 | ) 10 | 11 | func init() { 12 | register("RestartableProcess", RestartableProcess) 13 | } 14 | 15 | func RestartableProcess() { 16 | windows.SleepEx(windows.INFINITE, false) 17 | } 18 | -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/chart/templates/oauth-secret.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Tailscale Inc & AUTHORS 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | {{ if and .Values.oauth .Values.oauth.clientId (not .Values.oauth.audience) -}} 5 | apiVersion: v1 6 | kind: Secret 7 | metadata: 8 | name: operator-oauth 9 | namespace: {{ .Release.Namespace }} 10 | stringData: 11 | client_id: {{ .Values.oauth.clientId }} 12 | client_secret: {{ .Values.oauth.clientSecret }} 13 | {{- end -}} 14 | -------------------------------------------------------------------------------- /drive/driveimpl/dirfs/rename.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package dirfs 5 | 6 | import ( 7 | "context" 8 | "os" 9 | ) 10 | 11 | // Rename implements interface webdav.FileSystem. No renaming is supported and 12 | // this always returns os.ErrPermission. 13 | func (dfs *FS) Rename(ctx context.Context, oldName, newName string) error { 14 | return &os.PathError{Op: "mv", Path: oldName, Err: os.ErrPermission} 15 | } 16 | -------------------------------------------------------------------------------- /net/ktimeout/ktimeout_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package ktimeout 5 | 6 | import ( 7 | "time" 8 | 9 | "golang.org/x/sys/unix" 10 | ) 11 | 12 | // SetUserTimeout sets the TCP_USER_TIMEOUT option on the given file descriptor. 13 | func SetUserTimeout(fd uintptr, timeout time.Duration) error { 14 | return unix.SetsockoptInt(int(fd), unix.SOL_TCP, unix.TCP_USER_TIMEOUT, int(timeout/time.Millisecond)) 15 | } 16 | -------------------------------------------------------------------------------- /tstest/tailmac/Swift/Common/Notifications.swift: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | import Foundation 5 | 6 | struct Notifications { 7 | // Stops the virtual machine and saves its state 8 | static var stop = Notification.Name("io.tailscale.macvmhost.stop") 9 | 10 | // Pauses the virtual machine and exits without saving its state 11 | static var halt = Notification.Name("io.tailscale.macvmhost.halt") 12 | } 13 | -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/chart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /net/memnet/conn_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package memnet 5 | 6 | import ( 7 | "net" 8 | "testing" 9 | 10 | "golang.org/x/net/nettest" 11 | ) 12 | 13 | func TestConn(t *testing.T) { 14 | nettest.TestConn(t, func() (c1 net.Conn, c2 net.Conn, stop func(), err error) { 15 | c1, c2 = NewConn("test", bufferSize) 16 | return c1, c2, func() { 17 | c1.Close() 18 | c2.Close() 19 | }, nil 20 | }) 21 | } 22 | -------------------------------------------------------------------------------- /net/tstun/tstun_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build aix 5 | 6 | package tstun 7 | 8 | import ( 9 | "github.com/tailscale/wireguard-go/tun" 10 | "tailscale.com/types/logger" 11 | ) 12 | 13 | func New(logf logger.Logf, tunName string) (tun.Device, string, error) { 14 | panic("not implemented") 15 | } 16 | 17 | func Diagnose(logf logger.Logf, tunName string, err error) { 18 | panic("not implemented") 19 | } 20 | -------------------------------------------------------------------------------- /util/linuxfw/iptables_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build linux && ts_omit_iptables 5 | 6 | package linuxfw 7 | 8 | import ( 9 | "errors" 10 | 11 | "tailscale.com/types/logger" 12 | ) 13 | 14 | func detectIptables() (int, error) { 15 | return 0, nil 16 | } 17 | 18 | func newIPTablesRunner(logf logger.Logf) (*iptablesRunner, error) { 19 | return nil, errors.New("iptables disabled in build") 20 | } 21 | -------------------------------------------------------------------------------- /feature/condregister/oauthkey/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package oauthkey registers support for OAuth key resolution 5 | // if it's not disabled via the ts_omit_oauthkey build tag. 6 | // Currently (2025-09-19), tailscaled does not need OAuth key 7 | // resolution, only the CLI and tsnet do, so this package is 8 | // pulled out separately to avoid linking OAuth packages into 9 | // tailscaled. 10 | package oauthkey 11 | -------------------------------------------------------------------------------- /tool/gocross/gocross_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package main 5 | 6 | import ( 7 | "testing" 8 | 9 | "tailscale.com/tstest/deptest" 10 | ) 11 | 12 | func TestDeps(t *testing.T) { 13 | deptest.DepChecker{ 14 | BadDeps: map[string]string{ 15 | "tailscale.com/tailcfg": "circular dependency via go generate", 16 | "tailscale.com/version": "circular dependency via go generate", 17 | }, 18 | }.Check(t) 19 | } 20 | -------------------------------------------------------------------------------- /util/sysresources/memory_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build linux 5 | 6 | package sysresources 7 | 8 | import "golang.org/x/sys/unix" 9 | 10 | func totalMemoryImpl() uint64 { 11 | var info unix.Sysinfo_t 12 | 13 | if err := unix.Sysinfo(&info); err != nil { 14 | return 0 15 | } 16 | 17 | // uint64 casts are required since these might be uint32s 18 | return uint64(info.Totalram) * uint64(info.Unit) 19 | } 20 | -------------------------------------------------------------------------------- /derp/derpconst/derpconst.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package derpconst contains constants used by the DERP client and server. 5 | package derpconst 6 | 7 | // MetaCertCommonNamePrefix is the prefix that the DERP server 8 | // puts on for the common name of its "metacert". The suffix of 9 | // the common name after "derpkey" is the hex key.NodePublic 10 | // of the DERP server. 11 | const MetaCertCommonNamePrefix = "derpkey" 12 | -------------------------------------------------------------------------------- /internal/tooldeps/tooldeps.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build for_go_mod_tidy_only 5 | 6 | // Package tooldeps contains dependencies for tools used in the Tailscale repository, 7 | // so they're not removed by "go mod tidy". 8 | package tooldeps 9 | 10 | import ( 11 | _ "github.com/golangci/golangci-lint/cmd/golangci-lint" 12 | _ "github.com/tailscale/depaware/depaware" 13 | _ "golang.org/x/tools/cmd/goimports" 14 | ) 15 | -------------------------------------------------------------------------------- /posture/serialnumber_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package posture 5 | 6 | import ( 7 | "testing" 8 | 9 | "tailscale.com/types/logger" 10 | "tailscale.com/util/syspolicy/policyclient" 11 | ) 12 | 13 | func TestGetSerialNumber(t *testing.T) { 14 | // ensure GetSerialNumbers is implemented 15 | // or covered by a stub on a given platform. 16 | _, _ = GetSerialNumbers(policyclient.NoPolicyClient{}, logger.Discard) 17 | } 18 | -------------------------------------------------------------------------------- /wgengine/netlog/netlog_omit.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ts_omit_netlog || ts_omit_logtail 5 | 6 | package netlog 7 | 8 | type Logger struct{} 9 | 10 | func (*Logger) Startup(...any) error { return nil } 11 | func (*Logger) Running() bool { return false } 12 | func (*Logger) Shutdown(any) error { return nil } 13 | func (*Logger) ReconfigNetworkMap(any) {} 14 | func (*Logger) ReconfigRoutes(any) {} 15 | -------------------------------------------------------------------------------- /cmd/tailscaled/tailscaledhooks/tailscaledhooks.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package tailscaledhooks provides hooks for optional features 5 | // to add to during init that tailscaled calls at runtime. 6 | package tailscaledhooks 7 | 8 | import "tailscale.com/feature" 9 | 10 | // UninstallSystemDaemonWindows is called when the Windows 11 | // system daemon is uninstalled. 12 | var UninstallSystemDaemonWindows feature.Hooks[func()] 13 | -------------------------------------------------------------------------------- /control/controlhttp/client_common.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package controlhttp 5 | 6 | import ( 7 | "tailscale.com/control/controlbase" 8 | ) 9 | 10 | // ClientConn is a Tailscale control client as returned by the Dialer. 11 | // 12 | // It's effectively just a *controlbase.Conn (which it embeds) with 13 | // optional metadata. 14 | type ClientConn struct { 15 | // Conn is the noise connection. 16 | *controlbase.Conn 17 | } 18 | -------------------------------------------------------------------------------- /omit/omit.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package omit provides consts to access Tailscale ts_omit_FOO build tags. 5 | // They're often more convenient to eliminate some away locally with a const 6 | // rather than using build tags. 7 | package omit 8 | 9 | import "errors" 10 | 11 | // Err is an error that can be returned by functions in this package. 12 | var Err = errors.New("feature not linked into binary per ts_omit build tag") 13 | -------------------------------------------------------------------------------- /tsconsensus/bolt_store.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !loong64 5 | 6 | package tsconsensus 7 | 8 | import ( 9 | "github.com/hashicorp/raft" 10 | raftboltdb "github.com/hashicorp/raft-boltdb/v2" 11 | ) 12 | 13 | func boltStore(path string) (raft.StableStore, raft.LogStore, error) { 14 | store, err := raftboltdb.NewBoltStore(path) 15 | if err != nil { 16 | return nil, nil, err 17 | } 18 | return store, store, nil 19 | } 20 | -------------------------------------------------------------------------------- /types/netlogfunc/netlogfunc.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package netlogfunc defines types for network logging. 5 | package netlogfunc 6 | 7 | import ( 8 | "net/netip" 9 | 10 | "tailscale.com/types/ipproto" 11 | ) 12 | 13 | // ConnectionCounter is a function for counting packets and bytes 14 | // for a particular connection. 15 | type ConnectionCounter func(proto ipproto.Proto, src, dst netip.AddrPort, packets, bytes int, recv bool) 16 | -------------------------------------------------------------------------------- /cmd/systray/README.md: -------------------------------------------------------------------------------- 1 | # systray 2 | 3 | The systray command is a minimal Tailscale systray application for Linux. 4 | It is designed to provide quick access to common operations like profile switching 5 | and exit node selection. 6 | 7 | ## Supported platforms 8 | 9 | The `fyne.io/systray` package we use supports Windows, macOS, Linux, and many BSDs, 10 | so the systray application will likely work for the most part on those platforms. 11 | Notifications currently only work on Linux, as that is the main target. 12 | -------------------------------------------------------------------------------- /tstest/tlstest/tlstest_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package tlstest 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestPrivateKey(t *testing.T) { 11 | a := privateKey("a.tstest") 12 | a2 := privateKey("a.tstest") 13 | b := privateKey("b.tstest") 14 | 15 | if string(a) != string(a2) { 16 | t.Errorf("a and a2 should be equal") 17 | } 18 | if string(a) == string(b) { 19 | t.Errorf("a and b should not be equal") 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /safesocket/safesocket_js.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package safesocket 5 | 6 | import ( 7 | "context" 8 | "net" 9 | 10 | "github.com/akutz/memconn" 11 | ) 12 | 13 | const memName = "Tailscale-IPN" 14 | 15 | func listen(path string) (net.Listener, error) { 16 | return memconn.Listen("memu", memName) 17 | } 18 | 19 | func connect(ctx context.Context, _ string) (net.Conn, error) { 20 | return memconn.DialContext(ctx, "memu", memName) 21 | } 22 | -------------------------------------------------------------------------------- /syncs/mutex.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_mutex_debug 5 | 6 | package syncs 7 | 8 | import "sync" 9 | 10 | // Mutex is an alias for sync.Mutex. 11 | // 12 | // It's only not a sync.Mutex when built with the ts_mutex_debug build tag. 13 | type Mutex = sync.Mutex 14 | 15 | // RWMutex is an alias for sync.RWMutex. 16 | // 17 | // It's only not a sync.RWMutex when built with the ts_mutex_debug build tag. 18 | type RWMutex = sync.RWMutex 19 | -------------------------------------------------------------------------------- /net/ktimeout/ktimeout_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package ktimeout 5 | 6 | import ( 7 | "context" 8 | "fmt" 9 | "net" 10 | "time" 11 | ) 12 | 13 | func ExampleUserTimeout() { 14 | lc := net.ListenConfig{ 15 | Control: UserTimeout(30 * time.Second), 16 | } 17 | ln, err := lc.Listen(context.TODO(), "tcp", "127.0.0.1:0") 18 | if err != nil { 19 | fmt.Printf("error: %v", err) 20 | return 21 | } 22 | ln.Close() 23 | // Output: 24 | } 25 | -------------------------------------------------------------------------------- /version/version_checkformat.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build tailscale_go && android 5 | 6 | package version 7 | 8 | import "fmt" 9 | 10 | func init() { 11 | // For official Android builds using the tailscale_go toolchain, 12 | // panic if the builder is screwed up and we fail to stamp a valid 13 | // version string. 14 | if !isValidLongWithTwoRepos(Long()) { 15 | panic(fmt.Sprintf("malformed version.Long value %q", Long())) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_aws_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_aws 7 | 8 | package buildfeatures 9 | 10 | // HasAWS is whether the binary was built with support for modular feature "AWS integration". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_aws" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasAWS = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_tpm_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_tpm 7 | 8 | package buildfeatures 9 | 10 | // HasTPM is whether the binary was built with support for modular feature "TPM support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_tpm" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasTPM = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_tpm_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_tpm 7 | 8 | package buildfeatures 9 | 10 | // HasTPM is whether the binary was built with support for modular feature "TPM support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_tpm" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasTPM = true 14 | -------------------------------------------------------------------------------- /net/dns/manager_solaris.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package dns 5 | 6 | import ( 7 | "tailscale.com/control/controlknobs" 8 | "tailscale.com/health" 9 | "tailscale.com/types/logger" 10 | "tailscale.com/util/syspolicy/policyclient" 11 | ) 12 | 13 | func NewOSConfigurator(logf logger.Logf, health *health.Tracker, _ policyclient.Client, _ *controlknobs.Knobs, iface string) (OSConfigurator, error) { 14 | return newDirectManager(logf, health), nil 15 | } 16 | -------------------------------------------------------------------------------- /tsconsensus/bolt_store_no_bolt.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build loong64 5 | 6 | package tsconsensus 7 | 8 | import ( 9 | "errors" 10 | 11 | "github.com/hashicorp/raft" 12 | ) 13 | 14 | func boltStore(path string) (raft.StableStore, raft.LogStore, error) { 15 | // "github.com/hashicorp/raft-boltdb/v2" doesn't build on loong64 16 | // see https://github.com/hashicorp/raft-boltdb/issues/27 17 | return nil, nil, errors.New("not implemented") 18 | } 19 | -------------------------------------------------------------------------------- /wgengine/magicsock/cloudinfo_nocloud.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ios || android || js 5 | 6 | package magicsock 7 | 8 | import ( 9 | "context" 10 | "net/netip" 11 | 12 | "tailscale.com/types/logger" 13 | ) 14 | 15 | type cloudInfo struct{} 16 | 17 | func newCloudInfo(_ logger.Logf) *cloudInfo { 18 | return &cloudInfo{} 19 | } 20 | 21 | func (ci *cloudInfo) GetPublicIPs(_ context.Context) ([]netip.Addr, error) { 22 | return nil, nil 23 | } 24 | -------------------------------------------------------------------------------- /cmd/tailscale/cli/ssh_exec.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !js && !windows 5 | 6 | package cli 7 | 8 | import ( 9 | "errors" 10 | "os" 11 | "os/exec" 12 | "syscall" 13 | ) 14 | 15 | func findSSH() (string, error) { 16 | return exec.LookPath("ssh") 17 | } 18 | 19 | func execSSH(ssh string, argv []string) error { 20 | if err := syscall.Exec(ssh, argv, os.Environ()); err != nil { 21 | return err 22 | } 23 | return errors.New("unreachable") 24 | } 25 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_aws_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_aws 7 | 8 | package buildfeatures 9 | 10 | // HasAWS is whether the binary was built with support for modular feature "AWS integration". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_aws" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasAWS = false 14 | -------------------------------------------------------------------------------- /client/web/src/assets/icons/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /envknob/envknob_nottest.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ts_not_in_tests 5 | 6 | package envknob 7 | 8 | import "runtime" 9 | 10 | func GOOS() string { 11 | // When the "ts_not_in_tests" build tag is used, we define this func to just 12 | // return a simple constant so callers optimize just as if the knob were not 13 | // present. We can then build production/optimized builds with the 14 | // "ts_not_in_tests" build tag. 15 | return runtime.GOOS 16 | } 17 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_bird_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_bird 7 | 8 | package buildfeatures 9 | 10 | // HasBird is whether the binary was built with support for modular feature "Bird BGP integration". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_bird" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasBird = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_dbus_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_dbus 7 | 8 | package buildfeatures 9 | 10 | // HasDBus is whether the binary was built with support for modular feature "Linux DBus support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_dbus" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasDBus = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_dbus_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_dbus 7 | 8 | package buildfeatures 9 | 10 | // HasDBus is whether the binary was built with support for modular feature "Linux DBus support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_dbus" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasDBus = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_ssh_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_ssh 7 | 8 | package buildfeatures 9 | 10 | // HasSSH is whether the binary was built with support for modular feature "Tailscale SSH support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_ssh" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasSSH = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_ssh_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_ssh 7 | 8 | package buildfeatures 9 | 10 | // HasSSH is whether the binary was built with support for modular feature "Tailscale SSH support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_ssh" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasSSH = true 14 | -------------------------------------------------------------------------------- /ipn/desktop/sessions_notwindows.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !windows 5 | 6 | package desktop 7 | 8 | import "tailscale.com/types/logger" 9 | 10 | // NewSessionManager returns a new [SessionManager] for the current platform, 11 | // [ErrNotImplemented] if the platform is not supported, or an error if the 12 | // session manager could not be created. 13 | func NewSessionManager(logger.Logf) (SessionManager, error) { 14 | return nil, ErrNotImplemented 15 | } 16 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_bird_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_bird 7 | 8 | package buildfeatures 9 | 10 | // HasBird is whether the binary was built with support for modular feature "Bird BGP integration". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_bird" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasBird = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_c2n_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_c2n 7 | 8 | package buildfeatures 9 | 10 | // HasC2N is whether the binary was built with support for modular feature "Control-to-node (C2N) support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_c2n" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasC2N = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_c2n_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_c2n 7 | 8 | package buildfeatures 9 | 10 | // HasC2N is whether the binary was built with support for modular feature "Control-to-node (C2N) support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_c2n" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasC2N = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_kube_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_kube 7 | 8 | package buildfeatures 9 | 10 | // HasKube is whether the binary was built with support for modular feature "Kubernetes integration". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_kube" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasKube = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_kube_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_kube 7 | 8 | package buildfeatures 9 | 10 | // HasKube is whether the binary was built with support for modular feature "Kubernetes integration". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_kube" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasKube = true 14 | -------------------------------------------------------------------------------- /gokrazy/tsapp/README.md: -------------------------------------------------------------------------------- 1 | # Tailscale Appliance 2 | 3 | This is the definition of the Gokrazy Tailscale Appliance (tsapp) image. 4 | See the parent directory for context. 5 | 6 | ## File contents 7 | 8 | The `config.json` is a Gokrazy config. 9 | 10 | The `usr-dir.tar` is a single symlink named `bin` pointing to `/user`. We write it to `/usr/bin => /user` so the Busybox `ash` shell's default `$PATH` includes `/user`, where the `tailscale` CLI is. 11 | 12 | The `builddir` is the Gokrazy build environment, defining each program's `go.mod`. 13 | -------------------------------------------------------------------------------- /client/web/src/assets/icons/x-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /client/web/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "target": "ES2017", 5 | "module": "ES2020", 6 | "strict": true, 7 | "sourceMap": true, 8 | "skipLibCheck": true, 9 | "isolatedModules": true, 10 | "moduleResolution": "node", 11 | "forceConsistentCasingInFileNames": true, 12 | "allowSyntheticDefaultImports": true, 13 | "jsx": "react", 14 | "types": ["vite-plugin-svgr/client", "vite/client"] 15 | }, 16 | "include": ["src/**/*"], 17 | "exclude": ["node_modules"] 18 | } 19 | -------------------------------------------------------------------------------- /cmd/k8s-operator/deploy/chart/templates/ingressclass.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingressClass.enabled }} 2 | apiVersion: networking.k8s.io/v1 3 | kind: IngressClass 4 | metadata: 5 | name: {{ .Values.ingressClass.name }} 6 | annotations: {} # we do not support default IngressClass annotation https://kubernetes.io/docs/concepts/services-networking/ingress/#default-ingress-class 7 | spec: 8 | controller: tailscale.com/ts-ingress # controller name currently can not be changed 9 | # parameters: {} # currently no parameters are supported 10 | {{- end }} 11 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_ace_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_ace 7 | 8 | package buildfeatures 9 | 10 | // HasACE is whether the binary was built with support for modular feature "Alternate Connectivity Endpoints". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_ace" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasACE = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_ace_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_ace 7 | 8 | package buildfeatures 9 | 10 | // HasACE is whether the binary was built with support for modular feature "Alternate Connectivity Endpoints". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_ace" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasACE = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_capture_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_capture 7 | 8 | package buildfeatures 9 | 10 | // HasCapture is whether the binary was built with support for modular feature "Packet capture". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_capture" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasCapture = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_capture_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_capture 7 | 8 | package buildfeatures 9 | 10 | // HasCapture is whether the binary was built with support for modular feature "Packet capture". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_capture" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasCapture = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_serve_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_serve 7 | 8 | package buildfeatures 9 | 10 | // HasServe is whether the binary was built with support for modular feature "Serve and Funnel support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_serve" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasServe = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_serve_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_serve 7 | 8 | package buildfeatures 9 | 10 | // HasServe is whether the binary was built with support for modular feature "Serve and Funnel support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_serve" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasServe = true 14 | -------------------------------------------------------------------------------- /net/tstun/netstack_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_netstack 5 | 6 | package tstun 7 | 8 | import ( 9 | "gvisor.dev/gvisor/pkg/tcpip/stack" 10 | ) 11 | 12 | type ( 13 | netstack_PacketBuffer = stack.PacketBuffer 14 | netstack_GSO = stack.GSO 15 | ) 16 | 17 | const ( 18 | netstack_GSONone = stack.GSONone 19 | netstack_GSOTCPv4 = stack.GSOTCPv4 20 | netstack_GSOTCPv6 = stack.GSOTCPv6 21 | netstack_GSOGvisor = stack.GSOGvisor 22 | ) 23 | -------------------------------------------------------------------------------- /tka/verify_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ts_omit_tailnetlock 5 | 6 | package tka 7 | 8 | import ( 9 | "errors" 10 | 11 | "tailscale.com/types/tkatype" 12 | ) 13 | 14 | // signatureVerify returns a nil error if the signature is valid over the 15 | // provided AUM BLAKE2s digest, using the given key. 16 | func signatureVerify(s *tkatype.Signature, aumDigest tkatype.AUMSigHash, key Key) error { 17 | return errors.New("tailnetlock disabled in build") 18 | } 19 | -------------------------------------------------------------------------------- /util/cibuild/cibuild.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package cibuild reports runtime CI information. 5 | package cibuild 6 | 7 | import "os" 8 | 9 | // On reports whether the current binary is executing on a CI system. 10 | func On() bool { 11 | // CI env variable is set by GitHub. 12 | // https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables 13 | return os.Getenv("GITHUB_ACTIONS") != "" || os.Getenv("CI") == "true" 14 | } 15 | -------------------------------------------------------------------------------- /wgengine/netstack/netstack_tcpbuf_default.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ios 5 | 6 | package netstack 7 | 8 | import ( 9 | "gvisor.dev/gvisor/pkg/tcpip/transport/tcp" 10 | ) 11 | 12 | const ( 13 | tcpRXBufMinSize = tcp.MinBufferSize 14 | tcpRXBufDefSize = tcp.DefaultSendBufferSize 15 | tcpRXBufMaxSize = 8 << 20 // 8MiB 16 | 17 | tcpTXBufMinSize = tcp.MinBufferSize 18 | tcpTXBufDefSize = tcp.DefaultReceiveBufferSize 19 | tcpTXBufMaxSize = 6 << 20 // 6MiB 20 | ) 21 | -------------------------------------------------------------------------------- /clientupdate/clientupdate_downloads.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build (linux && !android) || windows 5 | 6 | package clientupdate 7 | 8 | import ( 9 | "context" 10 | 11 | "tailscale.com/clientupdate/distsign" 12 | ) 13 | 14 | func (up *Updater) downloadURLToFile(pathSrc, fileDst string) (ret error) { 15 | c, err := distsign.NewClient(up.Logf, up.PkgsAddr) 16 | if err != nil { 17 | return err 18 | } 19 | return c.Download(context.Background(), pathSrc, fileDst) 20 | } 21 | -------------------------------------------------------------------------------- /cmd/connector-gen/advertise-routes.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package main 5 | 6 | import ( 7 | "fmt" 8 | "strings" 9 | 10 | "go4.org/netipx" 11 | ) 12 | 13 | func advertiseRoutes(set *netipx.IPSet) { 14 | fmt.Println() 15 | prefixes := set.Prefixes() 16 | pfxs := make([]string, 0, len(prefixes)) 17 | for _, pfx := range prefixes { 18 | pfxs = append(pfxs, pfx.String()) 19 | } 20 | fmt.Printf("--advertise-routes=%s", strings.Join(pfxs, ",")) 21 | fmt.Println() 22 | } 23 | -------------------------------------------------------------------------------- /cmd/tailscaled/smf/vpn-tailscale: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | # Init script for tailscaled. 3 | 4 | . /lib/svc/share/smf_include.sh 5 | 6 | TAILSCALED=$(svcprop -c -p application/binary "$SMF_FMRI") 7 | TUN_DRIVER=$(svcprop -c -p application/tun_driver "$SMF_FMRI") 8 | case "$1" in 9 | start) 10 | smf_clear_env 11 | "${TAILSCALED?}" -tun "${TUN_DRIVER?}" & 12 | ;; 13 | stop) 14 | smf_kill_contract "$2" TERM 60 15 | "${TAILSCALED?}" --cleanup 16 | ;; 17 | *) 18 | echo "Usage: $0 {start|stop}" >&2 19 | exit 1 20 | ;; 21 | esac 22 | 23 | exit "$SMF_EXIT_OK" 24 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_acme_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_acme 7 | 8 | package buildfeatures 9 | 10 | // HasACME is whether the binary was built with support for modular feature "ACME TLS certificate management". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_acme" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasACME = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_acme_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_acme 7 | 8 | package buildfeatures 9 | 10 | // HasACME is whether the binary was built with support for modular feature "ACME TLS certificate management". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_acme" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasACME = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_health_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_health 7 | 8 | package buildfeatures 9 | 10 | // HasHealth is whether the binary was built with support for modular feature "Health checking support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_health" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasHealth = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_health_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_health 7 | 8 | package buildfeatures 9 | 10 | // HasHealth is whether the binary was built with support for modular feature "Health checking support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_health" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasHealth = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_systray_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_systray 7 | 8 | package buildfeatures 9 | 10 | // HasSysTray is whether the binary was built with support for modular feature "Linux system tray". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_systray" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasSysTray = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_systray_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_systray 7 | 8 | package buildfeatures 9 | 10 | // HasSysTray is whether the binary was built with support for modular feature "Linux system tray". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_systray" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasSysTray = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_tap_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_tap 7 | 8 | package buildfeatures 9 | 10 | // HasTap is whether the binary was built with support for modular feature "Experimental Layer 2 (ethernet) support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_tap" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasTap = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_tap_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_tap 7 | 8 | package buildfeatures 9 | 10 | // HasTap is whether the binary was built with support for modular feature "Experimental Layer 2 (ethernet) support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_tap" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasTap = true 14 | -------------------------------------------------------------------------------- /gokrazy/tsapp/builddir/github.com/tailscale/gokrazy-kernel/go.sum: -------------------------------------------------------------------------------- 1 | github.com/tailscale/gokrazy-kernel v0.0.0-20240530042707-3f95c886bcf2 h1:xzf+cMvBJBcA/Av7OTWBa0Tjrbfcy00TeatJeJt6zrY= 2 | github.com/tailscale/gokrazy-kernel v0.0.0-20240530042707-3f95c886bcf2/go.mod h1:7Mth+m9bq2IHusSsexMNyupHWPL8RxwOuSvBlSGtgDY= 3 | github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e h1:tyUUgeRPGHjCZWycRnhdx8Lx9DRkjl3WsVUxYMrVBOw= 4 | github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e/go.mod h1:7Mth+m9bq2IHusSsexMNyupHWPL8RxwOuSvBlSGtgDY= 5 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_dns_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_dns 7 | 8 | package buildfeatures 9 | 10 | // HasDNS is whether the binary was built with support for modular feature "MagicDNS and system DNS configuration support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_dns" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasDNS = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_gro_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_gro 7 | 8 | package buildfeatures 9 | 10 | // HasGRO is whether the binary was built with support for modular feature "Generic Receive Offload support (performance)". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_gro" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasGRO = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_netlog_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_netlog 7 | 8 | package buildfeatures 9 | 10 | // HasNetLog is whether the binary was built with support for modular feature "Network flow logging support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_netlog" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasNetLog = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_netlog_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_netlog 7 | 8 | package buildfeatures 9 | 10 | // HasNetLog is whether the binary was built with support for modular feature "Network flow logging support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_netlog" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasNetLog = true 14 | -------------------------------------------------------------------------------- /gokrazy/natlabapp/builddir/github.com/tailscale/gokrazy-kernel/go.sum: -------------------------------------------------------------------------------- 1 | github.com/tailscale/gokrazy-kernel v0.0.0-20240530042707-3f95c886bcf2 h1:xzf+cMvBJBcA/Av7OTWBa0Tjrbfcy00TeatJeJt6zrY= 2 | github.com/tailscale/gokrazy-kernel v0.0.0-20240530042707-3f95c886bcf2/go.mod h1:7Mth+m9bq2IHusSsexMNyupHWPL8RxwOuSvBlSGtgDY= 3 | github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e h1:tyUUgeRPGHjCZWycRnhdx8Lx9DRkjl3WsVUxYMrVBOw= 4 | github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e/go.mod h1:7Mth+m9bq2IHusSsexMNyupHWPL8RxwOuSvBlSGtgDY= 5 | -------------------------------------------------------------------------------- /release/deb/debian.postrm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | if [ -d /run/systemd/system ] ; then 4 | systemctl --system daemon-reload >/dev/null || true 5 | fi 6 | 7 | if [ -x "/usr/bin/deb-systemd-helper" ]; then 8 | if [ "$1" = "remove" ]; then 9 | deb-systemd-helper mask 'tailscaled.service' >/dev/null || true 10 | fi 11 | 12 | if [ "$1" = "purge" ]; then 13 | deb-systemd-helper purge 'tailscaled.service' >/dev/null || true 14 | deb-systemd-helper unmask 'tailscaled.service' >/dev/null || true 15 | rm -rf /var/lib/tailscale 16 | fi 17 | fi 18 | -------------------------------------------------------------------------------- /tstest/tailmac/TailMac.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "originHash" : "59ba1edda695b389d6c9ac1809891cd779e4024f505b0ce1a9d5202b6762e38a", 3 | "pins" : [ 4 | { 5 | "identity" : "swift-argument-parser", 6 | "kind" : "remoteSourceControl", 7 | "location" : "https://github.com/apple/swift-argument-parser.git", 8 | "state" : { 9 | "revision" : "41982a3656a71c768319979febd796c6fd111d5c", 10 | "version" : "1.5.0" 11 | } 12 | } 13 | ], 14 | "version" : 3 15 | } 16 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_dns_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_dns 7 | 8 | package buildfeatures 9 | 10 | // HasDNS is whether the binary was built with support for modular feature "MagicDNS and system DNS configuration support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_dns" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasDNS = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_drive_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_drive 7 | 8 | package buildfeatures 9 | 10 | // HasDrive is whether the binary was built with support for modular feature "Tailscale Drive (file server) support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_drive" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasDrive = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_drive_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_drive 7 | 8 | package buildfeatures 9 | 10 | // HasDrive is whether the binary was built with support for modular feature "Tailscale Drive (file server) support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_drive" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasDrive = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_gro_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_gro 7 | 8 | package buildfeatures 9 | 10 | // HasGRO is whether the binary was built with support for modular feature "Generic Receive Offload support (performance)". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_gro" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasGRO = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_iptables_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_iptables 7 | 8 | package buildfeatures 9 | 10 | // HasIPTables is whether the binary was built with support for modular feature "Linux iptables support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_iptables" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasIPTables = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_iptables_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_iptables 7 | 8 | package buildfeatures 9 | 10 | // HasIPTables is whether the binary was built with support for modular feature "Linux iptables support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_iptables" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasIPTables = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_wakeonlan_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_wakeonlan 7 | 8 | package buildfeatures 9 | 10 | // HasWakeOnLAN is whether the binary was built with support for modular feature "Wake-on-LAN support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_wakeonlan" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasWakeOnLAN = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_wakeonlan_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_wakeonlan 7 | 8 | package buildfeatures 9 | 10 | // HasWakeOnLAN is whether the binary was built with support for modular feature "Wake-on-LAN support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_wakeonlan" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasWakeOnLAN = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_webclient_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_webclient 7 | 8 | package buildfeatures 9 | 10 | // HasWebClient is whether the binary was built with support for modular feature "Web client support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_webclient" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasWebClient = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_webclient_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_webclient 7 | 8 | package buildfeatures 9 | 10 | // HasWebClient is whether the binary was built with support for modular feature "Web client support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_webclient" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasWebClient = true 14 | -------------------------------------------------------------------------------- /gokrazy/natlabapp.arm64/builddir/github.com/tailscale/gokrazy-kernel/go.sum: -------------------------------------------------------------------------------- 1 | github.com/tailscale/gokrazy-kernel v0.0.0-20240530042707-3f95c886bcf2 h1:xzf+cMvBJBcA/Av7OTWBa0Tjrbfcy00TeatJeJt6zrY= 2 | github.com/tailscale/gokrazy-kernel v0.0.0-20240530042707-3f95c886bcf2/go.mod h1:7Mth+m9bq2IHusSsexMNyupHWPL8RxwOuSvBlSGtgDY= 3 | github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e h1:tyUUgeRPGHjCZWycRnhdx8Lx9DRkjl3WsVUxYMrVBOw= 4 | github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e/go.mod h1:7Mth+m9bq2IHusSsexMNyupHWPL8RxwOuSvBlSGtgDY= 5 | -------------------------------------------------------------------------------- /client/web/src/hooks/toaster.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | import { useRawToasterForHook } from "src/ui/toaster" 5 | 6 | /** 7 | * useToaster provides a mechanism to display toasts. It returns an object with 8 | * methods to show, dismiss, or clear all toasts: 9 | * 10 | * const toastKey = toaster.show({ message: "Hello world" }) 11 | * toaster.dismiss(toastKey) 12 | * toaster.clear() 13 | * 14 | */ 15 | const useToaster = useRawToasterForHook 16 | 17 | export default useToaster 18 | -------------------------------------------------------------------------------- /cmd/tailscale/cli/ffcomplete/complete_omit.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build go1.19 && ts_omit_completion 5 | 6 | package ffcomplete 7 | 8 | import ( 9 | "flag" 10 | 11 | "github.com/peterbourgon/ff/v3/ffcli" 12 | ) 13 | 14 | func Inject(root *ffcli.Command, hide func(*ffcli.Command), usageFunc func(*ffcli.Command) string) {} 15 | 16 | func Flag(fs *flag.FlagSet, name string, comp CompleteFunc) {} 17 | func Args(cmd *ffcli.Command, comp CompleteFunc) *ffcli.Command { return cmd } 18 | -------------------------------------------------------------------------------- /cmd/tailscaled/webclient.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !ts_omit_webclient 5 | 6 | package main 7 | 8 | import ( 9 | "tailscale.com/client/local" 10 | "tailscale.com/ipn/ipnlocal" 11 | "tailscale.com/paths" 12 | ) 13 | 14 | func init() { 15 | hookConfigureWebClient.Set(func(lb *ipnlocal.LocalBackend) { 16 | lb.ConfigureWebClient(&local.Client{ 17 | Socket: args.socketpath, 18 | UseSocketOnly: args.socketpath != paths.DefaultTailscaledSocket(), 19 | }) 20 | }) 21 | } 22 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_completion_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_completion 7 | 8 | package buildfeatures 9 | 10 | // HasCompletion is whether the binary was built with support for modular feature "CLI shell completion". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_completion" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasCompletion = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_posture_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_posture 7 | 8 | package buildfeatures 9 | 10 | // HasPosture is whether the binary was built with support for modular feature "Device posture checking support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_posture" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasPosture = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_posture_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_posture 7 | 8 | package buildfeatures 9 | 10 | // HasPosture is whether the binary was built with support for modular feature "Device posture checking support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_posture" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasPosture = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_relayserver_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_relayserver 7 | 8 | package buildfeatures 9 | 10 | // HasRelayServer is whether the binary was built with support for modular feature "Relay server". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_relayserver" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasRelayServer = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_relayserver_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_relayserver 7 | 8 | package buildfeatures 9 | 10 | // HasRelayServer is whether the binary was built with support for modular feature "Relay server". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_relayserver" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasRelayServer = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_sdnotify_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_sdnotify 7 | 8 | package buildfeatures 9 | 10 | // HasSDNotify is whether the binary was built with support for modular feature "systemd notification support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_sdnotify" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasSDNotify = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_sdnotify_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_sdnotify 7 | 8 | package buildfeatures 9 | 10 | // HasSDNotify is whether the binary was built with support for modular feature "systemd notification support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_sdnotify" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasSDNotify = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_useexitnode_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_useexitnode 7 | 8 | package buildfeatures 9 | 10 | // HasUseExitNode is whether the binary was built with support for modular feature "Use exit nodes". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_useexitnode" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasUseExitNode = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_useexitnode_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_useexitnode 7 | 8 | package buildfeatures 9 | 10 | // HasUseExitNode is whether the binary was built with support for modular feature "Use exit nodes". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_useexitnode" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasUseExitNode = true 14 | -------------------------------------------------------------------------------- /feature/sdnotify/sdnotify.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | /* 5 | Package sdnotify contains a minimal wrapper around systemd-notify to enable 6 | applications to signal readiness and status to systemd. 7 | 8 | This package will only have effect on Linux systems running Tailscale in a 9 | systemd unit with the Type=notify flag set. On other operating systems (or 10 | when running in a Linux distro without being run from inside systemd) this 11 | package will become a no-op. 12 | */ 13 | package sdnotify 14 | -------------------------------------------------------------------------------- /net/batching/conn_default.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !linux 5 | 6 | package batching 7 | 8 | import ( 9 | "tailscale.com/types/nettype" 10 | ) 11 | 12 | // TryUpgradeToConn is no-op on all platforms except linux. 13 | func TryUpgradeToConn(pconn nettype.PacketConn, _ string, _ int) nettype.PacketConn { 14 | return pconn 15 | } 16 | 17 | var controlMessageSize = 0 18 | 19 | func MinControlMessageSize() int { 20 | return controlMessageSize 21 | } 22 | 23 | const IdealBatchSize = 1 24 | -------------------------------------------------------------------------------- /net/netmon/interfaces_default_route_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build linux || (darwin && !ts_macext) 5 | 6 | package netmon 7 | 8 | import ( 9 | "testing" 10 | ) 11 | 12 | func TestDefaultRouteInterface(t *testing.T) { 13 | // tests /proc/net/route on the local system, cannot make an assertion about 14 | // the correct interface name, but good as a sanity check. 15 | v, err := DefaultRouteInterface() 16 | if err != nil { 17 | t.Fatal(err) 18 | } 19 | t.Logf("got %q", v) 20 | } 21 | -------------------------------------------------------------------------------- /client/web/src/assets/icons/arrow-up-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_completion_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_completion 7 | 8 | package buildfeatures 9 | 10 | // HasCompletion is whether the binary was built with support for modular feature "CLI shell completion". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_completion" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasCompletion = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_resolved_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_resolved 7 | 8 | package buildfeatures 9 | 10 | // HasResolved is whether the binary was built with support for modular feature "Linux systemd-resolved integration". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_resolved" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasResolved = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_resolved_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_resolved 7 | 8 | package buildfeatures 9 | 10 | // HasResolved is whether the binary was built with support for modular feature "Linux systemd-resolved integration". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_resolved" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasResolved = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_taildrop_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_taildrop 7 | 8 | package buildfeatures 9 | 10 | // HasTaildrop is whether the binary was built with support for modular feature "Taildrop (file sending) support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_taildrop" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasTaildrop = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_taildrop_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_taildrop 7 | 8 | package buildfeatures 9 | 10 | // HasTaildrop is whether the binary was built with support for modular feature "Taildrop (file sending) support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_taildrop" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasTaildrop = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_tailnetlock_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_tailnetlock 7 | 8 | package buildfeatures 9 | 10 | // HasTailnetLock is whether the binary was built with support for modular feature "Tailnet Lock support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_tailnetlock" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasTailnetLock = true 14 | -------------------------------------------------------------------------------- /net/captivedetection/rawconn.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build !(ios || darwin) 5 | 6 | package captivedetection 7 | 8 | import ( 9 | "syscall" 10 | 11 | "tailscale.com/types/logger" 12 | ) 13 | 14 | // setSocketInterfaceIndex sets the IP_BOUND_IF socket option on the given RawConn. 15 | // This forces the socket to use the given interface. 16 | func setSocketInterfaceIndex(c syscall.RawConn, ifIndex int, logf logger.Logf) error { 17 | // No-op on non-Darwin platforms. 18 | return nil 19 | } 20 | -------------------------------------------------------------------------------- /net/dns/noop.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package dns 5 | 6 | type noopManager struct{} 7 | 8 | func (m noopManager) SetDNS(OSConfig) error { return nil } 9 | func (m noopManager) SupportsSplitDNS() bool { return false } 10 | func (m noopManager) Close() error { return nil } 11 | func (m noopManager) GetBaseConfig() (OSConfig, error) { 12 | return OSConfig{}, ErrGetBaseConfigNotSupported 13 | } 14 | 15 | func NewNoopManager() (noopManager, error) { 16 | return noopManager{}, nil 17 | } 18 | -------------------------------------------------------------------------------- /cmd/tsconnect/package.json.tmpl: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Template for the package.json that is generated by the build-pkg command. 5 | // The version number will be replaced by the current Tailscale client version 6 | // number. 7 | { 8 | "author": "Tailscale Inc.", 9 | "description": "Tailscale Connect SDK", 10 | "license": "BSD-3-Clause", 11 | "name": "@tailscale/connect", 12 | "type": "module", 13 | "main": "./pkg.js", 14 | "types": "./pkg.d.ts", 15 | "version": "AUTO_GENERATED" 16 | } 17 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_hujsonconf_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_hujsonconf 7 | 8 | package buildfeatures 9 | 10 | // HasHuJSONConf is whether the binary was built with support for modular feature "HuJSON config file support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_hujsonconf" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasHuJSONConf = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_hujsonconf_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_hujsonconf 7 | 8 | package buildfeatures 9 | 10 | // HasHuJSONConf is whether the binary was built with support for modular feature "HuJSON config file support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_hujsonconf" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasHuJSONConf = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_tailnetlock_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_tailnetlock 7 | 8 | package buildfeatures 9 | 10 | // HasTailnetLock is whether the binary was built with support for modular feature "Tailnet Lock support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_tailnetlock" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasTailnetLock = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_oauthkey_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_oauthkey 7 | 8 | package buildfeatures 9 | 10 | // HasOAuthKey is whether the binary was built with support for modular feature "OAuth secret-to-authkey resolution support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_oauthkey" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasOAuthKey = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_oauthkey_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_oauthkey 7 | 8 | package buildfeatures 9 | 10 | // HasOAuthKey is whether the binary was built with support for modular feature "OAuth secret-to-authkey resolution support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_oauthkey" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasOAuthKey = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_portlist_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_portlist 7 | 8 | package buildfeatures 9 | 10 | // HasPortList is whether the binary was built with support for modular feature "Optionally advertise listening service ports". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_portlist" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasPortList = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_portlist_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_portlist 7 | 8 | package buildfeatures 9 | 10 | // HasPortList is whether the binary was built with support for modular feature "Optionally advertise listening service ports". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_portlist" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasPortList = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_useroutes_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_useroutes 7 | 8 | package buildfeatures 9 | 10 | // HasUseRoutes is whether the binary was built with support for modular feature "Use routes advertised by other nodes". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_useroutes" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasUseRoutes = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_useroutes_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_useroutes 7 | 8 | package buildfeatures 9 | 10 | // HasUseRoutes is whether the binary was built with support for modular feature "Use routes advertised by other nodes". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_useroutes" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasUseRoutes = true 14 | -------------------------------------------------------------------------------- /wgengine/netstack/gro/gro_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | //go:build ios || ts_omit_gro 5 | 6 | package gro 7 | 8 | import ( 9 | "runtime" 10 | 11 | "tailscale.com/net/packet" 12 | ) 13 | 14 | type GRO struct{} 15 | 16 | func NewGRO() *GRO { 17 | if runtime.GOOS == "ios" { 18 | panic("unsupported on iOS") 19 | } 20 | panic("GRO disabled in build") 21 | 22 | } 23 | 24 | func (g *GRO) SetDispatcher(any) {} 25 | 26 | func (g *GRO) Enqueue(_ *packet.Parsed) {} 27 | 28 | func (g *GRO) Flush() {} 29 | -------------------------------------------------------------------------------- /cmd/tsconnect/src/app/go-panic-display.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | export function GoPanicDisplay({ 5 | error, 6 | dismiss, 7 | }: { 8 | error: string 9 | dismiss: () => void 10 | }) { 11 | return ( 12 |
    16 | Tailscale has encountered an error. 17 |
    Click to reload
    18 |
    19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_appconnectors_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_appconnectors 7 | 8 | package buildfeatures 9 | 10 | // HasAppConnectors is whether the binary was built with support for modular feature "App Connectors support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_appconnectors" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasAppConnectors = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_appconnectors_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_appconnectors 7 | 8 | package buildfeatures 9 | 10 | // HasAppConnectors is whether the binary was built with support for modular feature "App Connectors support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_appconnectors" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasAppConnectors = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_captiveportal_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_captiveportal 7 | 8 | package buildfeatures 9 | 10 | // HasCaptivePortal is whether the binary was built with support for modular feature "Captive portal detection". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_captiveportal" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasCaptivePortal = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_captiveportal_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_captiveportal 7 | 8 | package buildfeatures 9 | 10 | // HasCaptivePortal is whether the binary was built with support for modular feature "Captive portal detection". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_captiveportal" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasCaptivePortal = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_cliconndiag_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_cliconndiag 7 | 8 | package buildfeatures 9 | 10 | // HasCLIConnDiag is whether the binary was built with support for modular feature "CLI connection error diagnostics". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_cliconndiag" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasCLIConnDiag = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_cliconndiag_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_cliconndiag 7 | 8 | package buildfeatures 9 | 10 | // HasCLIConnDiag is whether the binary was built with support for modular feature "CLI connection error diagnostics". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_cliconndiag" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasCLIConnDiag = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_clientmetrics_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_clientmetrics 7 | 8 | package buildfeatures 9 | 10 | // HasClientMetrics is whether the binary was built with support for modular feature "Client metrics support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_clientmetrics" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasClientMetrics = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_clientmetrics_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_clientmetrics 7 | 8 | package buildfeatures 9 | 10 | // HasClientMetrics is whether the binary was built with support for modular feature "Client metrics support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_clientmetrics" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasClientMetrics = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_clientupdate_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_clientupdate 7 | 8 | package buildfeatures 9 | 10 | // HasClientUpdate is whether the binary was built with support for modular feature "Client auto-update support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_clientupdate" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasClientUpdate = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_clientupdate_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_clientupdate 7 | 8 | package buildfeatures 9 | 10 | // HasClientUpdate is whether the binary was built with support for modular feature "Client auto-update support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_clientupdate" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasClientUpdate = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_cloud_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_cloud 7 | 8 | package buildfeatures 9 | 10 | // HasCloud is whether the binary was built with support for modular feature "detect cloud environment to learn instances IPs and DNS servers". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_cloud" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasCloud = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_cloud_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_cloud 7 | 8 | package buildfeatures 9 | 10 | // HasCloud is whether the binary was built with support for modular feature "detect cloud environment to learn instances IPs and DNS servers". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_cloud" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasCloud = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_debugeventbus_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_debugeventbus 7 | 8 | package buildfeatures 9 | 10 | // HasDebugEventBus is whether the binary was built with support for modular feature "eventbus debug support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_debugeventbus" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasDebugEventBus = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_debugeventbus_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_debugeventbus 7 | 8 | package buildfeatures 9 | 10 | // HasDebugEventBus is whether the binary was built with support for modular feature "eventbus debug support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_debugeventbus" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasDebugEventBus = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_netstack_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_netstack 7 | 8 | package buildfeatures 9 | 10 | // HasNetstack is whether the binary was built with support for modular feature "gVisor netstack (userspace networking) support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_netstack" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasNetstack = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_netstack_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_netstack 7 | 8 | package buildfeatures 9 | 10 | // HasNetstack is whether the binary was built with support for modular feature "gVisor netstack (userspace networking) support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_netstack" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasNetstack = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_peerapiclient_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_peerapiclient 7 | 8 | package buildfeatures 9 | 10 | // HasPeerAPIClient is whether the binary was built with support for modular feature "PeerAPI client support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_peerapiclient" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasPeerAPIClient = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_peerapiclient_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_peerapiclient 7 | 8 | package buildfeatures 9 | 10 | // HasPeerAPIClient is whether the binary was built with support for modular feature "PeerAPI client support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_peerapiclient" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasPeerAPIClient = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_peerapiserver_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_peerapiserver 7 | 8 | package buildfeatures 9 | 10 | // HasPeerAPIServer is whether the binary was built with support for modular feature "PeerAPI server support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_peerapiserver" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasPeerAPIServer = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_peerapiserver_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_peerapiserver 7 | 8 | package buildfeatures 9 | 10 | // HasPeerAPIServer is whether the binary was built with support for modular feature "PeerAPI server support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_peerapiserver" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasPeerAPIServer = true 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_portmapper_disabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build ts_omit_portmapper 7 | 8 | package buildfeatures 9 | 10 | // HasPortMapper is whether the binary was built with support for modular feature "NAT-PMP/PCP/UPnP port mapping support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_portmapper" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasPortMapper = false 14 | -------------------------------------------------------------------------------- /feature/buildfeatures/feature_portmapper_enabled.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Code generated by gen.go; DO NOT EDIT. 5 | 6 | //go:build !ts_omit_portmapper 7 | 8 | package buildfeatures 9 | 10 | // HasPortMapper is whether the binary was built with support for modular feature "NAT-PMP/PCP/UPnP port mapping support". 11 | // Specifically, it's whether the binary was NOT built with the "ts_omit_portmapper" build tag. 12 | // It's a const so it can be used for dead code elimination. 13 | const HasPortMapper = true 14 | -------------------------------------------------------------------------------- /gomod_test.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | package tailscaleroot 5 | 6 | import ( 7 | "os" 8 | "testing" 9 | 10 | "golang.org/x/mod/modfile" 11 | ) 12 | 13 | func TestGoMod(t *testing.T) { 14 | goMod, err := os.ReadFile("go.mod") 15 | if err != nil { 16 | t.Fatal(err) 17 | } 18 | f, err := modfile.Parse("go.mod", goMod, nil) 19 | if err != nil { 20 | t.Fatal(err) 21 | } 22 | if len(f.Replace) > 0 { 23 | t.Errorf("go.mod has %d replace directives; expect zero in this repo", len(f.Replace)) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tempfork/spf13/cobra/README.md: -------------------------------------------------------------------------------- 1 | # github.com/spf13/cobra 2 | 3 | This package contains a copy of the Apache 2.0-licensed shell scripts that Cobra 4 | uses to integrate tab-completion into bash, zsh, fish and powershell, and the 5 | constants that interface with them. We are re-using these scripts to implement 6 | similar tab-completion for ffcli and the standard library flag package. 7 | 8 | The shell scripts were Go constants in the Cobra code, but we have extracted 9 | them into separate files to facilitate gzipping them, and have removed the 10 | activeHelp functionality from them. 11 | -------------------------------------------------------------------------------- /types/empty/message.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) Tailscale Inc & AUTHORS 2 | // SPDX-License-Identifier: BSD-3-Clause 3 | 4 | // Package empty defines an empty struct type. 5 | package empty 6 | 7 | // Message is an empty message. Its purpose is to be used as pointer 8 | // type where nil and non-nil distinguish whether it's set. This is 9 | // used instead of a bool when we want to marshal it as a JSON empty 10 | // object (or null) for the future ability to add other fields, at 11 | // which point callers would define a new struct and not use 12 | // empty.Message. 13 | type Message struct{} 14 | --------------------------------------------------------------------------------