Commit Graph
91 Commits
Author SHA1 Message Date
Maisem AliandGitHub acd564144f go.mod: bump tailscale.com from main (#67)
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-02-28 15:44:50 -08:00
Kristoffer DalbyandGitHub 9bf1f0a11e nix: update go to 1.20 in flake.nix (#66) 2023-02-28 18:39:06 +01:00
Kristoffer DalbyandGitHub d0a6324e2f nix: add script to update flake vendor hash (#65) 2023-02-28 18:35:14 +01:00
Felix HeilmeyerandWill Norris 0d1e616fe9 db: add mutex to fix http errors during stats save
Signed-off-by: Felix Heilmeyer <code@fehe.eu>
2023-02-12 20:00:51 -08:00
Will NorrisandWill Norris 7fd2d35ba6 include current user resolving link in expandEnv
Add "User" to the expansion environment for links.  The intent here it
support personalized go links such as:

go/mycal => https://calendar.google.com/calendar/embed?src={{.User}}

That's not a terribly interesting example, but there are others I intend
to use internally.

Signed-off-by: Will Norris <will@tailscale.com>
2023-02-08 16:24:36 -08:00
Will NorrisandWill Norris 9c46bb3412 stats: return early if no stats to write
Signed-off-by: Will Norris <will@tailscale.com>
2023-02-08 14:51:00 -08:00
Will NorrisandWill Norris 3c4fb78866 css: responsive design for /.all page
Signed-off-by: Will Norris <will@tailscale.com>
2023-02-07 16:08:19 -08:00
Gabriel WongandWill Norris 340adb143b golink: add .all page to display all existing links
Signed-off-by: Gabriel Wong <gabriel@bifrost.ai>
2023-02-07 16:08:19 -08:00
Gabriel WongandWill Norris 789e2a8a67 readme: update fly.toml volume mount
PR #12 changes directory used by Docker image. This commit updates the fly.io
instructions to use the same directory.

Signed-off-by: Gabriel Wong <gabriel@bifrost.ai>
2023-02-07 11:32:15 -08:00
Will NorrisandWill Norris 396a3ae5a9 .github/workflow: use buildx v0.9.1 to fix fly deploys
Fixes #51

Signed-off-by: Will Norris <will@tailscale.com>
2023-02-01 13:20:01 -08:00
136d5ad3ec Add Flake file (Nix package, NixOS module) (#39)
* Add Flake file (Nix package, NixOS module)

This commit adds a Flake.nix file allowing Nix users to consume this
repo with `nix build`, `nix run` and adds a NixOS module to quickly spin
up the service.

* add github action file for nix build

---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Co-authored-by: Xe Iaso <me@xeiaso.net>
2023-01-27 16:19:41 +01:00
Manuel CoppotelliandWill Norris cada6f65af add control url flag
Signed-off-by: Manuel Coppotelli <hi@manuel.coppotelli.me>
2023-01-12 16:43:20 -08:00
Filippo ValsordaandWill Norris fbc6650c5f readme: fixup Firefox instructions 2023-01-12 07:52:00 -08:00
Filippo ValsordaandWill Norris 80c84d264b readme: add Firefox instructions 2023-01-12 06:32:33 -08:00
Will NorrisandWill Norris 3af59c51b8 Dockerfile: cross compile images using native builder
Use a build image built for the native architecture so that it doesn't
run in emulation mode.

Switch to Chainguard's wolfi/glibc build image. This limits our build
architectures to just amd64 and arm64, but that is sufficient for our
needs.

Updates #42
Updates #43

Signed-off-by: Will Norris <will@tailscale.com>
2023-01-09 20:32:47 -08:00
Will NorrisandWill Norris ef7f8b26d8 Dockerfile: use musl variant for go build image
Fixes #42

Signed-off-by: Will Norris <will@tailscale.com>
2023-01-07 10:42:53 -08:00
Simon HaywardandWill Norris e257a3cf27 UserExists check looks to be on the owner
Updates the log msg to use owner.

Signed-off-by: Simon Hayward <simonhayward@users.noreply.github.com>
2022-12-29 11:24:30 -08:00
Will NorrisandWill Norris 406c48e54d skip "tagged-devices" in userExists check
Currently, the special "tagged-devices" user (which exists for any
tagged devices in the tailnet) can own go links.  This change permits
tagged devices to continue to create go links, but skips over them for
ownership checks, allowing any human user can take over ownership.

Fixes #37

Signed-off-by: Will Norris <will@tailscale.com>
2022-12-22 12:15:49 -08:00
Samuel LijinandWill Norris 442e3446a5 fix(readme): another typo 2022-12-21 12:48:49 -08:00
Will NorrisandWill Norris b6f2ad4476 db: use canonical link short name in stats
When loading stats from the database, map IDs back to their canonical
short name, which is what we want to show in the frontend.  This is only
called once on cold start, so performance of loading all links isn't a
big concern.

Fixes #13

Signed-off-by: Will Norris <will@tailscale.com>
2022-12-21 10:52:23 -08:00
Samuel LijinandWill Norris ef8311b7f0 fix(readme): the "auth key" link is not a link
Signed-off-by: Sam Lijin <dev@sxlijin.com>
2022-12-20 09:15:26 -08:00
Will NorrisandWill Norris 5eb91a2ccf readme: add disambiguation links for other go link services
Signed-off-by: Will Norris <will@tailscale.com>
2022-12-14 12:12:31 -08:00
Will NorrisandWill Norris 7dd1eca5ce readme: add link to blog post
Signed-off-by: Will Norris <will@tailscale.com>
2022-12-13 21:33:10 -08:00
Will NorrisandWill Norris 5fefe2519f .github: cross-compile docker images
Build docker images for amd64, arm64, and arm/v7.  Also several other
small improvements to docker workflow like documenting which actions we
run on, setting concurrency settings, and reversing the logic for when
we push new images live (specifically looking for a push event rather
than a "not pull request" event, in case we add other events later).

Fixes #26
2022-12-06 20:33:21 -08:00
Will NorrisandWill Norris af7ceb5acb add support for resolving links locally
Specify a command line argument to resolve a link locally and exit.

Also add a new flag, -resolve-from-backup, which loads a snapshot into
an in-memory database and resolves the specified link.
2022-12-06 14:19:31 -08:00
Will NorrisandWill Norris 9d1e45fb4e add basic favicon
Nothing fancy, just the text "go/" in the Inter font semi-bold.

Fixes #20
2022-12-05 20:03:25 -08:00
Will NorrisandWill Norris bb3e973b80 remove static/opensearch.xml
This was replaced by tmpl/opensearch.xml and isn't needed.
2022-12-05 16:53:34 -08:00
9d2c372f1d add support for browser bar search keyword
Respect custom hostname in open search document.

Co-authored-by: Will Norris <will@tailscale.com>
2022-12-05 15:01:33 -08:00
Will NorrisandWill Norris f2105a032b README: add docker instructions for volume mount permissions 2022-12-05 12:34:19 -08:00
Adrian MouatandWill Norris e2d75cc50d Use a directory writable by nonroot.
Signed-off-by: Adrian Mouat <adrian@chainguard.dev>
2022-12-05 12:34:19 -08:00
Will Norris fa3b9f8e4f remove default value from hostname help text
Go's flag package will automatically append this already.
2022-12-02 08:01:50 -08:00
Zellyn HunterandWill Norris 76c67c0fda cmd/golink: add --hostname flag
Add a `--hostname` flag to allow changing the hostname from "go".
May be necessary if your workplace already has "go" links.
2022-12-01 09:09:05 -08:00
Edward VielmettiandGitHub 0755e37a91 add TrimSuffix to the function map (#10)
Adds strings.TrimSuffix to the function map, enabling it to be used in URL definitions.
2022-11-30 23:09:49 -08:00
William FerrellandGitHub f07445b0fc Update README.md to fix a change in flyctl (#8)
`Command "create" is deprecated, replaced by 'apps create'`
The secrets command has changed from create to set.
2022-11-16 23:13:18 -08:00
Will NorrisandWill Norris 4902f25d9f readme: add install and production notes 2022-11-09 17:38:47 -08:00
Will NorrisandWill Norris d346d3c966 all: remove some dead code
go/.export doesn't include click data anymore since we switched over to
sqlite.  Remove that code as well as the Link.Clicks field.  Remove old
/_/export redirect, since we've long since moved off of using it.
2022-11-09 16:53:17 -08:00
Will NorrisandWill Norris 555d1339a8 golink: truncate clicks slice after sorting
previously, the 200 links included in the "popular links" list were
non-deterministic (though those 200 were sorted). Now, always shows the
top 200.
2022-11-09 13:18:01 -08:00
Will Norris 8e1aaaf768 readme: add simple description and screenshot 2022-11-09 08:50:32 -08:00
Will Norris 28cda737e9 .github: add workflow for basic unit tests 2022-11-08 17:25:12 -08:00
Will Norris 72df3a4fad .github: add workflow to build docker image 2022-11-08 16:22:59 -08:00
Will Norris 89c71fd520 bump tailwind and dependencies 2022-11-08 15:04:21 -08:00
Will Norris 86c4be3d46 go.mod: bump to recent snapshot of tailscale.com 2022-11-08 14:20:24 -08:00
Will Norris 1c076779d3 go.mod: align dependencies with tailscale/tailscale 2022-11-08 13:01:07 -08:00
Will Norris 8904b662cc add: add license and headers 2022-11-08 12:53:39 -08:00
Will Norris ae20fe110a all: add flag for specifying snapshot file
We still support directly setting LastSnapshot to support embedding the
snapshot in the binary (like we do internally).  But this allows an
alternate way have restoring backups which doesn't require recompiling
binaries.
2022-11-08 12:32:58 -08:00
Will Norris f3c448c4dd go.mod: bump dependencies 2022-11-08 12:28:39 -08:00
Will Norris 7c148f41c8 all: add standard Dockerfile
Even though we have our own build and deploy scripts, most users will be
more comfortable with a standard Dockerfile.  We could publish our
scripts later if warranted.  For now, we'll just keep them in corp.
2022-11-08 12:00:05 -08:00
Will NorrisandWill Norris 113923a9af all: librarify golink and make importable
Export LastSnapshot var so that snapshots can be stored in separate repo
from the golink code.
2022-08-20 07:25:26 -07:00
Will Norris d4f6b5f22e go.mod: setup new module 2022-08-19 12:10:32 -05:00
Mihai ParparitaandWill Norris 3ec89abb08 cmd: use absolute path for tool/ directory in Fly build.sh scripts
Go 1.19 rejects relative paths in $PATH (https://go.dev/cl/403274),
so resolve the tool/ path before adding it.

Updates tailscale/tailscale#5210

Change-Id: I891dd2739fe18534e0facb4dbbaaf6a98b91aeb1
2022-07-29 11:34:50 -07:00