Dagger
Search

tailscale

A Dagger module for integrating with Tailscale

Installation

dagger install github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4

Entrypoint

Return Type
Tailscale
Example
dagger -m github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4 call \
func (m *myModule) example() *Tailscale  {
	return dag.
			Tailscale()
}
@function
def example() -> dag.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
NameTypeDefault ValueDescription
hostnameString !"dagger-proxy"Hostname of the proxy on the tailscale network
backendService -Backend for the proxy. All ports will be forwarded. if not specifed, a default test backend is used.
keySecret !-Tailscale authentication key
Example
dagger -m github.com/shykes/daggerverse/tailscale@768e5b5ecf02578d38eff495076a0de844006ef4 call \
 proxy --hostname string --key env:MYSECRET
func (m *myModule) example(hostname string, key *Secret) *TailscaleProxy  {
	return dag.
			Tailscale().
			Proxy(hostname, key)
}
@function
def example(hostname: str, key: dagger.Secret) -> dag.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 \
 hostname
func (m *myModule) example(ctx context.Context, hostname string, key *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 \
 key
func (m *myModule) example(hostname string, key *Secret) *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 \
 backend
func (m *myModule) example(hostname string, key *Secret) *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-ports
func (m *myModule) example(hostname string, key *Secret) []*Port  {
	return dag.
			Tailscale().
			Proxy(hostname, key).
			BackendPorts()
}
@function
def example(hostname: str, key: dagger.Secret) -> List[dag.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 \
 rules
func (m *myModule) example(hostname string, key *Secret) []*TailscaleProxyRule  {
	return dag.
			Tailscale().
			Proxy(hostname, key).
			Rules()
}
@function
def example(hostname: str, key: dagger.Secret) -> List[dag.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 \
 up
func (m *myModule) example(ctx context.Context, hostname string, key *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 \
 container
func (m *myModule) example(hostname string, key *Secret) *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
Scalar !
Example
Function TailscaleProxyRule.protocol is not accessible from the tailscale module
Function TailscaleProxyRule.protocol is not accessible from the tailscale module
Function TailscaleProxyRule.protocol is not accessible from the tailscale module
Function TailscaleProxyRule.protocol is not accessible from the tailscale module

frontendPort() 🔗

Return Type
Integer !
Example
Function TailscaleProxyRule.frontendPort is not accessible from the tailscale module
Function TailscaleProxyRule.frontendPort is not accessible from the tailscale module
Function TailscaleProxyRule.frontendPort is not accessible from the tailscale module
Function TailscaleProxyRule.frontendPort is not accessible from the tailscale module

backendPort() 🔗

Return Type
Integer !
Example
Function TailscaleProxyRule.backendPort is not accessible from the tailscale module
Function TailscaleProxyRule.backendPort is not accessible from the tailscale module
Function TailscaleProxyRule.backendPort is not accessible from the tailscale module
Function TailscaleProxyRule.backendPort is not accessible from the tailscale module

backendHost() 🔗

Return Type
String !
Example
Function TailscaleProxyRule.backendHost is not accessible from the tailscale module
Function TailscaleProxyRule.backendHost is not accessible from the tailscale module
Function TailscaleProxyRule.backendHost is not accessible from the tailscale module
Function TailscaleProxyRule.backendHost is not accessible from the tailscale module