-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
243 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore everything | ||
* | ||
|
||
# Allow the tunnel binary | ||
!/build/tunneld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,6 @@ LABEL \ | |
RUN adduser -D -u 1000 tunneld | ||
USER tunneld | ||
|
||
COPY tunneld / | ||
COPY ./build/tunneld / | ||
|
||
CMD ["/tunneld"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CLOUDFLARE_TOKEN= | ||
HONEYCOMB_TEAM= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Use a single bash shell for each job, and immediately exit on failure | ||
SHELL := bash | ||
.SHELLFLAGS := -ceu | ||
.ONESHELL: | ||
|
||
# Don't print the commands in the file unless you specify VERBOSE. This is | ||
# essentially the same as putting "@" at the start of each line. | ||
ifndef VERBOSE | ||
.SILENT: | ||
endif | ||
|
||
up: | ||
pushd .. | ||
make -B build | ||
popd | ||
docker compose -p wgtunnel up --build | ||
.PHONY: up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG CADDY_VERSION=2.6.4 | ||
FROM caddy:${CADDY_VERSION}-builder AS builder | ||
|
||
RUN xcaddy build \ | ||
--with github.com/lucaslorentz/caddy-docker-proxy/v2 \ | ||
--with github.com/caddy-dns/cloudflare | ||
|
||
FROM caddy:${CADDY_VERSION} | ||
|
||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy | ||
|
||
CMD ["caddy", "docker-proxy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
version: "3.9" | ||
services: | ||
caddy: | ||
build: ./caddy | ||
ports: | ||
- 8080:80 | ||
- 4443:443 | ||
environment: | ||
- CADDY_INGRESS_NETWORKS=caddy | ||
networks: | ||
- caddy | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- caddy_data:/data | ||
restart: unless-stopped | ||
|
||
tunnel: | ||
build: .. | ||
restart: always | ||
ports: | ||
- 55551:55551/udp | ||
networks: | ||
- caddy | ||
environment: | ||
TUNNELD_LISTEN_ADDRESS: "0.0.0.0:8080" | ||
TUNNELD_BASE_URL: "https://local.try.coder.app:4443" | ||
TUNNELD_WIREGUARD_ENDPOINT: "local.try.coder.app:55551" | ||
TUNNELD_WIREGUARD_PORT: "55551" | ||
TUNNELD_WIREGUARD_KEY_FILE: "/home/tunneld/wg.key" | ||
TUNNELD_WIREGUARD_MTU: "1280" | ||
TUNNELD_WIREGUARD_SERVER_IP: "fcca::1" | ||
TUNNELD_WIREGUARD_NETWORK_PREFIX: "fcca::/16" | ||
TUNNELD_REAL_IP_HEADER: "X-Forwarded-For" | ||
TUNNELD_PPROF_LISTEN_ADDRESS: "127.0.0.1:6060" | ||
TUNNELD_TRACING_HONEYCOMB_TEAM: "${HONEYCOMB_TEAM}" | ||
TUNNELD_TRACING_INSTANCE_ID: "local" | ||
labels: | ||
caddy: "local.try.coder.app, *.local.try.coder.app" | ||
caddy.reverse_proxy: "{{upstreams 8080}}" | ||
caddy.tls.dns: cloudflare ${CLOUDFLARE_TOKEN} | ||
|
||
networks: | ||
caddy: | ||
external: true | ||
|
||
volumes: | ||
caddy_data: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.