tailscale
A Dagger module for integrating with Tailscale
Installation
dagger install github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4Entrypoint
Return Type
Tailscale Example
dagger -m github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4 call \
func (m *MyModule) Example() *dagger.Tailscale {
return dag.
Tailscale()
}@function
def example() -> dagger.Tailscale:
return (
dag.tailscale()
)@func()
example(): Tailscale {
return dag
.tailscale()
}Types
Tailscale 🔗
A module to integrate with Tailscale https://tailscale.com
proxy() 🔗
Expose a backend service on Tailscale at the given hostname, using the given Tailscale key.
Return Type
Proxy !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| hostname | String ! | "dagger-proxy" | Hostname of the proxy on the tailscale network |
| backend | Service | - | Backend for the proxy. All ports will be forwarded. if not specifed, a default test backend is used. |
| key | Secret ! | - | Tailscale authentication key |
Example
dagger -m github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4 call \
proxy --hostname string --key env:MYSECRETfunc (m *MyModule) Example(hostname string, key *dagger.Secret) *dagger.TailscaleProxy {
return dag.
Tailscale().
Proxy(hostname, key)
}@function
def example(hostname: str, key: dagger.Secret) -> dagger.TailscaleProxy:
return (
dag.tailscale()
.proxy(hostname, key)
)@func()
example(hostname: string, key: Secret): TailscaleProxy {
return dag
.tailscale()
.proxy(hostname, key)
}Proxy 🔗
A proxy exposing a Dagger service on a Tailscale network
hostname() 🔗
Hostname of the proxy on the tailscale network
Return Type
String ! Example
dagger -m github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4 call \
proxy --hostname string --key env:MYSECRET \
hostnamefunc (m *MyModule) Example(ctx context.Context, hostname string, key *dagger.Secret) string {
return dag.
Tailscale().
Proxy(hostname, key).
Hostname(ctx)
}@function
async def example(hostname: str, key: dagger.Secret) -> str:
return await (
dag.tailscale()
.proxy(hostname, key)
.hostname()
)@func()
async example(hostname: string, key: Secret): Promise<string> {
return dag
.tailscale()
.proxy(hostname, key)
.hostname()
}key() 🔗
Tailscale authentication key to register the proxy
Return Type
Secret ! Example
dagger -m github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4 call \
proxy --hostname string --key env:MYSECRET \
keyfunc (m *MyModule) Example(hostname string, key *dagger.Secret) *dagger.Secret {
return dag.
Tailscale().
Proxy(hostname, key).
Key()
}@function
def example(hostname: str, key: dagger.Secret) -> dagger.Secret:
return (
dag.tailscale()
.proxy(hostname, key)
.key()
)@func()
example(hostname: string, key: Secret): Secret {
return dag
.tailscale()
.proxy(hostname, key)
.key()
}backend() 🔗
Backend of the proxy. All exposed ports are also exposed on the proxy.
Return Type
Service ! Example
dagger -m github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4 call \
proxy --hostname string --key env:MYSECRET \
backendfunc (m *MyModule) Example(hostname string, key *dagger.Secret) *dagger.Service {
return dag.
Tailscale().
Proxy(hostname, key).
Backend()
}@function
def example(hostname: str, key: dagger.Secret) -> dagger.Service:
return (
dag.tailscale()
.proxy(hostname, key)
.backend()
)@func()
example(hostname: string, key: Secret): Service {
return dag
.tailscale()
.proxy(hostname, key)
.backend()
}backendPorts() 🔗
Return a list of the backend’s exposed ports’
Return Type
[Port ! ] ! Example
dagger -m github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4 call \
proxy --hostname string --key env:MYSECRET \
backend-portsfunc (m *MyModule) Example(hostname string, key *dagger.Secret) []*dagger.Port {
return dag.
Tailscale().
Proxy(hostname, key).
BackendPorts()
}@function
def example(hostname: str, key: dagger.Secret) -> List[dagger.Port]:
return (
dag.tailscale()
.proxy(hostname, key)
.backend_ports()
)@func()
example(hostname: string, key: Secret): Port[] {
return dag
.tailscale()
.proxy(hostname, key)
.backendPorts()
}rules() 🔗
List the proxy’s port forwarding rules
Return Type
[ProxyRule ! ] ! Example
dagger -m github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4 call \
proxy --hostname string --key env:MYSECRET \
rulesfunc (m *MyModule) Example(hostname string, key *dagger.Secret) []*dagger.TailscaleProxyRule {
return dag.
Tailscale().
Proxy(hostname, key).
Rules()
}@function
def example(hostname: str, key: dagger.Secret) -> List[dagger.TailscaleProxyRule]:
return (
dag.tailscale()
.proxy(hostname, key)
.rules()
)@func()
example(hostname: string, key: Secret): TailscaleProxyRule[] {
return dag
.tailscale()
.proxy(hostname, key)
.rules()
}up() 🔗
Return Type
Void ! Example
dagger -m github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4 call \
proxy --hostname string --key env:MYSECRET \
upfunc (m *MyModule) Example(ctx context.Context, hostname string, key *dagger.Secret) {
return dag.
Tailscale().
Proxy(hostname, key).
Up(ctx)
}@function
async def example(hostname: str, key: dagger.Secret) -> None:
return await (
dag.tailscale()
.proxy(hostname, key)
.up()
)@func()
async example(hostname: string, key: Secret): Promise<void> {
return dag
.tailscale()
.proxy(hostname, key)
.up()
}container() 🔗
Convert the proxy to a ready-to-run container
Return Type
Container ! Example
dagger -m github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4 call \
proxy --hostname string --key env:MYSECRET \
containerfunc (m *MyModule) Example(hostname string, key *dagger.Secret) *dagger.Container {
return dag.
Tailscale().
Proxy(hostname, key).
Container()
}@function
def example(hostname: str, key: dagger.Secret) -> dagger.Container:
return (
dag.tailscale()
.proxy(hostname, key)
.container()
)@func()
example(hostname: string, key: Secret): Container {
return dag
.tailscale()
.proxy(hostname, key)
.container()
}ProxyRule 🔗
An individual port forward rule
protocol() 🔗
Return Type
Enum ! Example
Function TailscaleProxyRule.protocol is not accessible from the tailscale moduleFunction TailscaleProxyRule.protocol is not accessible from the tailscale moduleFunction TailscaleProxyRule.protocol is not accessible from the tailscale moduleFunction TailscaleProxyRule.protocol is not accessible from the tailscale modulefrontendPort() 🔗
Return Type
Integer ! Example
Function TailscaleProxyRule.frontendPort is not accessible from the tailscale moduleFunction TailscaleProxyRule.frontendPort is not accessible from the tailscale moduleFunction TailscaleProxyRule.frontendPort is not accessible from the tailscale moduleFunction TailscaleProxyRule.frontendPort is not accessible from the tailscale modulebackendPort() 🔗
Return Type
Integer ! Example
Function TailscaleProxyRule.backendPort is not accessible from the tailscale moduleFunction TailscaleProxyRule.backendPort is not accessible from the tailscale moduleFunction TailscaleProxyRule.backendPort is not accessible from the tailscale moduleFunction TailscaleProxyRule.backendPort is not accessible from the tailscale modulebackendHost() 🔗
Return Type
String ! Example
Function TailscaleProxyRule.backendHost is not accessible from the tailscale moduleFunction TailscaleProxyRule.backendHost is not accessible from the tailscale moduleFunction TailscaleProxyRule.backendHost is not accessible from the tailscale moduleFunction TailscaleProxyRule.backendHost is not accessible from the tailscale module