Skip to content

Commit

Permalink
docs: add Files target provider documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidapaulopt committed Dec 9, 2024
1 parent fb30f37 commit 0fc3d97
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ layout: hextra-home

<div class="hx-mt-6 hx-mb-6">
{{< hextra/hero-headline >}}
Very simple proxy&nbsp;<br class="sm:hx-block hx-hidden" />with Tailscale and Docker
Very simple proxy&nbsp;<br class="sm:hx-block hx-hidden" />with Tailscale
{{< /hextra/hero-headline >}}
</div>

Expand Down
16 changes: 10 additions & 6 deletions docs/content/docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@ title: Introduction

## What is TSDProxy?

TSDProxy is a Tailscale + Docker application that automatically creates a proxy to
virtual addresses in your Tailscale network based on Docker container labels.
TSDProxy is a application that automatically creates a proxy to
virtual addresses in your Tailscale network.
Easy to configure and deploy, based on Docker container labels or a simple proxy
list file.
It simplifies traffic redirection to services running inside Docker containers,
without the need for a separate Tailscale container for each service.

{{< callout type="info" >}}
TSDProxy just needs a label in your new docker service and it will be automatically
created in your Tailscale network and the proxy will be ready to be used.
TSDProxy just needs a label in your new docker service or a proxy list file and
it will be automatically created in your Tailscale network and the proxy will be
ready to be used.

{{< /callout >}}

## Why another proxy?

TSDProxy was created to address the need for a proxy that can handle multiple services
without the need for a dedicated Tailscale container for each service, without configuring
virtual hosts in Tailscale network, without entry configuration in a proxy like Caddy/nginx.
without the need for a dedicated Tailscale container for each service and without configuring
virtual hosts in Tailscale network.

![how tsdproxy works](/images/tsdproxy.svg)

Expand All @@ -35,6 +38,7 @@ TSDProxy differs from other Tailscale proxies in that it does not require a sepa
## Features

- **Easy to Use** - creates virtual Tailscale addresses using Docker container labels
- **Really Easy to Use** - creates virtual Tailscale addresses using a proxy list
- **Lightweight** -No need to spin up a dedicated Tailscale container for every service.
- **Quick deploy** - No need to configure virtual hosts in Tailscale network.
- **Automatically supports TLS** - Automatically supports Tailscale/LetsEncrypt certificates
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Services configuration
next: /docs/advanced
title: Docker Services
weight: 3
---

Expand Down
84 changes: 84 additions & 0 deletions docs/content/docs/files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
title: Proxy List
next: /docs/advanced
weight: 4
---

TSDProxy can be configured to proxy using a YAML configuration file.
Can be used multiple files a they are called as target providers.
Each target provider could be used to group the way you decide better to help
you manage your proxies. Or can use a single file to proxy all your targets.

{{% steps %}}

### How to enable?

In yout /config/tsdproxy.yaml, define the files you want to use, just
like this example where is defined the `critical` and `media` providers.

```yaml {filename="/config/tsdproxy.yaml"}
Files:
critical:
Filename: /config/critical.yaml
DefaultProxyProvider: tailscale1
DefaultProxyAccessLog: true
media:
Filename: /config/media.yaml
DefaultProxyProvider: default
DefaultProxyAccessLog: false
```
```yaml {filename="/config/critical.yaml"}
nas1:
url: https://192.168.1.2:5001
TLSValidate: false
nas2:
url: https://192.168.1.3:5001
TLSValidate: false
```
```yaml {filename="/config/media.yaml"}
music:
url: http://192.168.1.10:3789
video:
url: http://192.168.1.10:3800
photos:
url: http://192.168.1.10:3801
```
This configuration will create two groups of proxies:
- nas1.funny-name.ts.net and nas2.funny-name.ts.net
- Self-signed tls certificates
- Both use 'tailscale1' Tailscale provider
- All access logs are enabled
- music.ts.net, video.ts.net and photos.ts.net.
- On the same host with different ports
- Sse 'default' Tailscale provider
- Don't enable access logs
### Provider Configuration options
```yaml {filename="/config/tsdproxy.yaml"}
Files:
critical: # Name the target provider
Filename: /config/critical.yaml # file with the proxy list
DefaultProxyProvider: tailscale1 # (optional) default proxy provider
DefaultProxyAccessLog: true # (optional) Enable access logs
```
### Proxy list file options
```yaml {filename="/config/filename.yaml"}
music: # Name of the proxy
URL: http://192.168.1.10:3789 # url of service to proxy
ProxyProvider: default # (optional) name of the proxy provider
TLSValidate: false # (optional, default true) disable TLS validationTailscale
Tailscale: # (optional) Tailscale configuration for this proxy
AuthKey: asdasdas # Tailscale authkey
Ephemeral: true # (optional) Enable ephemeral mode
RunWebClient: false # (optional) Run web client
Verbose: false # (optional) Run in verbose mode
Funnel: false # (optional) Run in funnel mode
```
{{% /steps %}}
8 changes: 6 additions & 2 deletions docs/content/docs/serverconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ will be removed in the future.
```yaml {filename="/config/tsdproxy.yaml"}
defaultproxyprovider: default
docker:
local: # name of the docker provider
local: # name of the docker target provider
host: unix:///var/run/docker.sock # host of the docker socket or daemon
targethostname: 172.31.0.1 # hostname or IP of docker server
defaultproxyprovider: default # name of which proxy provider to use
files: {}
files:
critical: # Name the target provider
filename: /config/critical.yaml # file with the proxy list
defaultProxyProvider: tailscale1 # (optional) default proxy provider
defaultProxyAccessLog: true # (optional) Enable access logs
tailscale:
providers:
default: # name of the provider
Expand Down

0 comments on commit 0fc3d97

Please sign in to comment.