Skip to content

Commit 6a435ca

Browse files
committed
Add lambda
1 parent c05eac8 commit 6a435ca

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ COPY --from=ghcr.io/rails-lambda/tailscale-extension-amzn:1 /opt /opt
1717

1818
⚠️ Make sure `curl` is installed since the Tailscale Extension script will need it.
1919

20+
### Environment Variables
21+
22+
You will need to generate an [ephemeral key](https://login.tailscale.com/admin/settings/authkeys) within your Tailscale account. Note, this will expire and need updating depending on the time period you select. List of the environment variables include:
23+
24+
- `TS_KEY` - Required. Your ephemeral key.
25+
- `TS_HOSTNAME` - Optional. The value of `--hostname` parameter. Default `lambda`.
26+
2027
### OSs & Architectures
2128

2229
We publish multi-platform images for both `linux/amd64` and `linux/arm64/v8` and we also have Amazon Linux 2 and Debian/Ubuntu variants.

src/tailscale.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ EXTENSION_ID=$(grep -Fi Lambda-Extension-Identifier "$HEADERS" | tr -d '[:space:
3636
echo "[${LAMBDA_EXTENSION_NAME}] Registration response: ${RESPONSE} with EXTENSION_ID $(grep -Fi Lambda-Extension-Identifier "$HEADERS" | tr -d '[:space:]' | cut -d: -f2)"
3737

3838
# Start the Tailscale process
39-
/opt/bin/tailscaled --tun=userspace-networking --socks5-server=localhost:1055 --socket=/tmp/tailscale.sock --state /tmp/tailscale &
39+
TS_HOSTNAME=${TS_HOSTNAME:-lambda}
40+
/opt/bin/tailscaled --tun=userspace-networking --socks5-server=localhost:1055 --socket=/tmp/tailscale.sock --state=/tmp/tailscale --hostname=$TS_HOSTNAME &
4041
until /opt/bin/tailscale --socket=/tmp/tailscale.sock up --authkey=$TS_KEY
4142
do
4243
sleep 0.1

0 commit comments

Comments
 (0)