Dagger
Search

twingate

No long description provided.

Installation

dagger install github.com/typesafe-ai/daggerverse/twingate@5fb44993412ee5cd75e4df2556c04f2b6e4ed3af

Entrypoint

Return Type
Twingate !
Arguments
NameTypeDefault ValueDescription
serviceKeySecret !-Twingate service key JSON for headless authentication.
versionString !"2026.106"twingate/client image tag.
Example
dagger -m github.com/typesafe-ai/daggerverse/twingate@5fb44993412ee5cd75e4df2556c04f2b6e4ed3af call \
 --service-key env:MYSECRET --version string
func (m *MyModule) Example(serviceKey *dagger.Secret, version string) *dagger.Twingate  {
	return dag.
			Twingate(serviceKey, version)
}
@function
def example(service_key: dagger.Secret, version: str) -> dagger.Twingate:
	return (
		dag.twingate(service_key, version)
	)
@func()
example(serviceKey: Secret, version: string): Twingate {
	return dag
		.twingate(serviceKey, version)
}

Types

Twingate 🔗

Twingate HTTP CONNECT proxy as a Dagger service.

serviceKey() 🔗

Twingate service key JSON for headless authentication.

Return Type
Secret !
Example
dagger -m github.com/typesafe-ai/daggerverse/twingate@5fb44993412ee5cd75e4df2556c04f2b6e4ed3af call \
 --service-key env:MYSECRET --version string service-key
func (m *MyModule) Example(serviceKey *dagger.Secret, version string) *dagger.Secret  {
	return dag.
			Twingate(serviceKey, version).
			ServiceKey()
}
@function
def example(service_key: dagger.Secret, version: str) -> dagger.Secret:
	return (
		dag.twingate(service_key, version)
		.service_key()
	)
@func()
example(serviceKey: Secret, version: string): Secret {
	return dag
		.twingate(serviceKey, version)
		.serviceKey()
}

ctr() 🔗

Container with the Twingate client installed.

Return Type
Container !
Example
dagger -m github.com/typesafe-ai/daggerverse/twingate@5fb44993412ee5cd75e4df2556c04f2b6e4ed3af call \
 --service-key env:MYSECRET --version string ctr
func (m *MyModule) Example(serviceKey *dagger.Secret, version string) *dagger.Container  {
	return dag.
			Twingate(serviceKey, version).
			Ctr()
}
@function
def example(service_key: dagger.Secret, version: str) -> dagger.Container:
	return (
		dag.twingate(service_key, version)
		.ctr()
	)
@func()
example(serviceKey: Secret, version: string): Container {
	return dag
		.twingate(serviceKey, version)
		.ctr()
}

bindProxy() 🔗

Bind the Twingate proxy to a container.

If set_proxy_env_vars is True, it also sets common env vars (both lowercase and uppercase for maximum compatibility): - http_proxy / HTTP_PROXY - https_proxy / HTTPS_PROXY - no_proxy / NO_PROXY = localhost,127.0.0.1

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
ctrContainer !-Container to attach the Twingate proxy to.
aliasString !"twingate"Hostname alias for the proxy service binding.
portInteger !3170Port the HTTP proxy listens on.
setProxyEnvVarsBoolean !trueNo description provided
Example
dagger -m github.com/typesafe-ai/daggerverse/twingate@5fb44993412ee5cd75e4df2556c04f2b6e4ed3af call \
 --service-key env:MYSECRET --version string bind-proxy --ctr IMAGE:TAG --alias string --port integer --set-proxy-env-vars boolean
func (m *MyModule) Example(serviceKey *dagger.Secret, version string, ctr *dagger.Container, alias string, port int, setProxyEnvVars bool) *dagger.Container  {
	return dag.
			Twingate(serviceKey, version).
			BindProxy(ctr, alias, port, setProxyEnvVars)
}
@function
def example(service_key: dagger.Secret, version: str, ctr: dagger.Container, alias: str, port: int, set_proxy_env_vars: bool) -> dagger.Container:
	return (
		dag.twingate(service_key, version)
		.bind_proxy(ctr, alias, port, set_proxy_env_vars)
	)
@func()
example(serviceKey: Secret, version: string, ctr: Container, alias: string, port: number, setProxyEnvVars: boolean): Container {
	return dag
		.twingate(serviceKey, version)
		.bindProxy(ctr, alias, port, setProxyEnvVars)
}

service() 🔗

Start the Twingate client as an HTTP proxy service (userspace mode).

Returns a long-running service listening on the given port. Bind it to a container with bind_proxy, or manually via Container.with_service_binding + https_proxy

Learn more here.

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
portInteger !3170Port the HTTP proxy listens on.
Example
dagger -m github.com/typesafe-ai/daggerverse/twingate@5fb44993412ee5cd75e4df2556c04f2b6e4ed3af call \
 --service-key env:MYSECRET --version string service --port integer
func (m *MyModule) Example(serviceKey *dagger.Secret, version string, port int) *dagger.Service  {
	return dag.
			Twingate(serviceKey, version).
			Service(port)
}
@function
def example(service_key: dagger.Secret, version: str, port: int) -> dagger.Service:
	return (
		dag.twingate(service_key, version)
		.service(port)
	)
@func()
example(serviceKey: Secret, version: string, port: number): Service {
	return dag
		.twingate(serviceKey, version)
		.service(port)
}