twingate
No long description provided.
Installation
dagger install github.com/typesafe-ai/daggerverse/twingate@fc5830cdfde1588c6271fb90dd24d1ac648283b4Entrypoint
Return Type
Twingate !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| serviceKey | Secret ! | - | Twingate service key JSON for headless authentication. |
| version | String ! | "2026.106" | twingate/client image tag. |
Example
dagger -m github.com/typesafe-ai/daggerverse/twingate@fc5830cdfde1588c6271fb90dd24d1ac648283b4 call \
--service-key env:MYSECRET --version stringfunc (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@fc5830cdfde1588c6271fb90dd24d1ac648283b4 call \
--service-key env:MYSECRET --version string service-keyfunc (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@fc5830cdfde1588c6271fb90dd24d1ac648283b4 call \
--service-key env:MYSECRET --version string ctrfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | Container to attach the Twingate proxy to. |
| alias | String ! | "twingate" | Hostname alias for the proxy service binding. |
| port | Integer ! | 3170 | Port the HTTP proxy listens on. |
| setProxyEnvVars | Boolean ! | true | No description provided |
Example
dagger -m github.com/typesafe-ai/daggerverse/twingate@fc5830cdfde1588c6271fb90dd24d1ac648283b4 call \
--service-key env:MYSECRET --version string bind-proxy --ctr IMAGE:TAG --alias string --port integer --set-proxy-env-vars booleanfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| port | Integer ! | 3170 | Port the HTTP proxy listens on. |
Example
dagger -m github.com/typesafe-ai/daggerverse/twingate@fc5830cdfde1588c6271fb90dd24d1ac648283b4 call \
--service-key env:MYSECRET --version string service --port integerfunc (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)
}