gost

by alekc

Helm chartv0.3.3App 3.3.3MITVerified publisher

GO Simple Tunnel: a lightweight, protocol-agnostic proxy and tunnel supporting SOCKS5, HTTP, Shadowsocks, and dozens of other transports, configured declaratively from a single YAML file.

About this chart

gost

GO Simple Tunnel: a lightweight, protocol-agnostic proxy and tunnel supporting SOCKS5, HTTP, Shadowsocks, and dozens of other transports, configured declaratively from a single YAML file.

gost ("GO Simple Tunnel") is a protocol-agnostic proxy: point a client at it over SOCKS5, HTTP, Shadowsocks, or one of its many other transports, and it relays to whatever destination the client asks for. This chart runs it as a Deployment with an optional Ingress and HorizontalPodAutoscaler.

Quick start

From the classic chart repository:

helm repo add alekc https://charts.alekc.dev
helm repo update
helm install my-gost alekc/gost

Or directly from the OCI registry, no helm repo add needed:

helm install my-gost oci://charts.alekc.dev/gost --version 0.2.0

Verifying the signature

curl -sO https://charts.alekc.dev/pubring.gpg
helm pull oci://charts.alekc.dev/gost --version 0.2.0 --verify --keyring pubring.gpg

A minimal working values.yaml, a plain SOCKS5 listener with no auth:

config:
  services:
    - name: socks5
      addr: :1080
      handler:
        type: socks5
      listener:
        type: tcp

See the gost config reference for every listener type, chain, and auth option config can express.

Maintainers

NameEmailUrl
alekc[email protected]https://blog.alekc.org

Source Code

Gotchas

  • deployment.ports and service.ports are independent lists you must keep in sync yourself. Adding a listener to config does nothing to the Deployment or Service unless you also add a matching entry to both, by container port and by targetPort/name respectively. Nothing validates this for you; a listener with no matching port is silently unreachable from outside the pod.
  • The Ingress always routes to the first entry in service.ports. If you expose more than one listener, either put the one you want reachable via Ingress first, or fork the Ingress template for a second rule.
  • networkPolicy.enabled allows broad egress to 0.0.0.0/0 by default. gost's entire job is dialing whatever destination a client asks it to relay to, so there's no small fixed CIDR to narrow this to out of the box. Narrow it with networkPolicy.extraEgress if this deployment only ever proxies to a known, fixed set of destinations.
  • livenessProbe/readinessProbe are empty by default. gost has no built-in HTTP health endpoint; use a tcpSocket probe against one of deployment.ports if you need one.

Upgrade notes

No breaking changes yet. This section will list migration steps for any future release with a kind: removed or kind: changed entry in artifacthub.io/changes that requires one.

Values

KeyTypeDefaultDescription
additionalManifestsobject{}Additional raw Kubernetes manifests to render alongside the chart's own resources. Supports any valid Kubernetes object; values are templated with tpl, so a manifest can reference .Release.Namespace and friends.
affinityobject{}Affinity rules for pod scheduling.
autoscaling.annotationsobject{}Annotations to add to the HorizontalPodAutoscaler
autoscaling.enabledboolfalseRenders a HorizontalPodAutoscaler instead of a fixed replicaCount.
autoscaling.maxReplicasint100Maximum replica count.
autoscaling.minReplicasint1Minimum replica count.
autoscaling.targetCPUUtilizationPercentageint80Target average CPU utilization percentage.
commonAnnotationsobject{}Annotations merged onto every resource this chart renders, in addition to each resource's own dedicated annotations field.
commonLabelsobject{}Labels merged onto every resource this chart renders. Never reaches selector/matchLabels, safe to change without forcing a Deployment recreate.
configobject{"debug":false}gost's own config file (gost.yml), rendered into a ConfigMap and mounted at /etc/gost/. See https://gost.run/en/configuration/config/ for the full config reference: services, chains, listeners, and more.
configMapAnnotationsobject{}Annotations to add to the ConfigMap holding gost.yml.
deployment.annotationsobject{}Annotations to add to the Deployment.
deployment.argslist[]Extra args passed to the gost binary.
deployment.portslist[{"containerPort":1080,"name":"socks","protocol":"TCP"}]Container ports. Add an entry here for every listener config actually configures; nothing exposes itself automatically.
deployment.strategyobject{"type":"RollingUpdate"}Deployment strategy (e.g., RollingUpdate, Recreate).
envobject{"full":[],"simple":{}}environment values
env.fulllist[]full envs, they will be rendered as written here. Useful if you need to use secrets/cm
env.simpleobject{}simple key: val based env vars
extraContainerslist[]Extra sidecar containers appended to the pod spec, templated with tpl so they can reference .Release.Namespace and friends.
fullnameOverridestring""Overrides the full resource name, instead of the default <release>-<chart> pattern.
image.pullPolicystring"IfNotPresent"Image pull policy.
image.repositorystring"gogost/gost"Image repository.
image.tagstring""Overrides the image tag whose default is the chart appVersion.
imagePullSecretslist[]Image pull secrets, for a private registry mirror.
ingress.annotationsobject{}Annotations to add to the Ingress
ingress.classNamestring""IngressClass name, e.g. "nginx" or "traefik"
ingress.enabledboolfalseRenders an Ingress for the Service.
ingress.hostslist[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}]Ingress host and path rules
ingress.tlslist[]TLS configuration for the Ingress
initContainerslist[]Extra init containers appended to the pod spec, templated with tpl.
livenessProbeobject{}Liveness probe. gost has no default HTTP health endpoint; leave empty (the default) unless your config defines one, or use a tcpSocket probe against one of deployment.ports instead.
nameOverridestring""Overrides the chart name used to build resource names.
networkPolicy.annotationsobject{}Annotations to add to the NetworkPolicy
networkPolicy.enabledboolfalseRender a NetworkPolicy restricting ingress to service.ports and egress to DNS plus whatever extraEgress adds. gost's whole job is dialing whatever destination a client asks it to relay to, so egress here is broad by default, see Gotchas.
networkPolicy.extraEgresslist[]Additional raw egress rules, appended as-is under spec.egress.
networkPolicy.extraIngresslist[]Additional raw ingress rules, appended as-is under spec.ingress.
nodeSelectorobject{}Node selector for pod scheduling.
podAnnotationsobject{}Annotations added to the pod template.
podSecurityContextobject{}Pod-level securityContext.
readinessProbeobject{}Readiness probe. Same caveat as livenessProbe above.
replicaCountint1Pod replica count. Ignored when autoscaling.enabled is true.
resourcesobject{}Container resource requests/limits.
securityContextobject{}Container-level securityContext.
service.annotationsobject{}Annotations to add to the Service.
service.externalIPslist[]Attach external IPs to the Service directly, bypassing a LoadBalancer.
service.portslist[{"name":"socks","port":1080,"protocol":"TCP","targetPort":"socks"}]Service ports. targetPort must match one of deployment.ports' name fields. The Ingress (if enabled) always routes to the first entry here, see Gotchas.
service.typestring"ClusterIP"Kubernetes Service type.
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template
tolerationslist[]Tolerations for pod scheduling.

Deploy gost with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has gost on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgost is pinned at v0.3.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply