gluetun README

The project's README from github.com/passteque/gluetun. As one markdown file: README.md.

Gluetun VPN client

Lightweight swiss-army-knife-like VPN client to multiple VPN service providers

⚠️ This and gluetun-wiki are the only websites for Gluetun, other websites claiming to be official are scams ⚠️

🗯️ this repository will be migrated to github.com/passteque/gluetun on 2026-05-21, which is a Github organization under my sole control, so don't get alarmed if you get redirected in the coming days 😉 Reason being migrating Github sponsors to the Open source collective due to my personal situation, basically annoying paperwork. On the plus side, it will be more transparent and funds donated will only be used for the project. The Docker image names will remain the same.

Title image

Build status

Docker pulls qmcgaw/gluetun Docker pulls qmcgaw/private-internet-access

Docker stars qmcgaw/gluetun Docker stars qmcgaw/private-internet-access

Last release Last Docker tag Last release size GitHub last release date Commits since release

Latest size

GitHub last commit GitHub commit activity GitHub closed PRs GitHub issues GitHub closed issues

Code size GitHub repo size Go version

Visitors count

Features

Setup

🎉 There are now instructions specific to each VPN provider with examples to help you get started as quickly as possible!

Go to the Wiki!

🐛 Found a bug in the Wiki?!

Here's a docker-compose.yml for the laziest:

---
services:
  gluetun:
    image: qmcgaw/gluetun
    # container_name: gluetun
    # line above must be uncommented to allow external containers to connect.
    # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/connect-a-container-to-gluetun.md#external-container-to-gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 8888:8888/tcp # HTTP proxy
      - 8388:8388/tcp # Shadowsocks
      - 8388:8388/udp # Shadowsocks
    volumes:
      - /yourpath:/gluetun
    environment:
      # See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup
      - VPN_SERVICE_PROVIDER=ivpn
      - VPN_TYPE=openvpn
      # OpenVPN:
      - OPENVPN_USER=
      - OPENVPN_PASSWORD=
      # Wireguard:
      # - WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU=
      # - WIREGUARD_ADDRESSES=10.64.222.21/32
      # Timezone for accurate log times
      - TZ=
      # Server list updater
      # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md#update-the-vpn-servers-list
      - UPDATER_PERIOD=

🆕 Image also available as ghcr.io/qdm12/gluetun

Fun graphs

Star History Chart

License

MIT

gluetun (passteque/gluetun)

Searching Database…

15.8K ·GitHub
这是什么?Gluetun 是一个轻量级的“瑞士军刀”式 VPN 客户端,打包在一个小巧的 Docker 容器里。它可以通过 OpenVPN 或 Wireguard 隧道连接 20 多家商业 VPN 服务商,并让其他容器或局域网设备共享这条连接。
那它不是桌面 VPN 应用——它在我的环境里是怎么用的?它以 Docker 容器的形式运行在你的其他服务旁边。其他容器可以把流量路由经过它,局域网设备可以连接它,它甚至还能作为 Kubernetes sidecar 运行。
我怎么把它跑起来?Wiki 里有针对每家 VPN 服务商的设置说明,还带示例——从那里开始。README 也自带一个现成的 docker-compose.yml,镜像发布在 ghcr.io/qdm12/gluetun。
我需要自己的 VPN 订阅才能用它吗?需要——Gluetun 是一个客户端,本身并不是 VPN 服务。你得在受支持的服务商那里有一个账号,然后 Gluetun 会在容器内部处理好连接。
Wireguard 在所有服务商那里都能用吗?不能——所有列出的服务商都支持 OpenVPN,但只有一部分支持 Wireguard(AirVPN、IVPN、NordVPN、ProtonVPN、Surfshark、Windscribe 等少数几家),另外通过 custom 服务商可以使用自定义的 Wireguard 配置。Mullvad 则只支持 Wireguard。
它能跑在小型的 ARM 开发板上吗,还是只支持 x86 服务器?它支持 amd64、i686(32 位)、ARM 64 位、ARM 32 位 v6 和 v7,以及 ppc64le,所以服务器、NAS 和小型 ARM 开发板都能跑。镜像只有 43.1MB,基于 Alpine 3.23。
VPN 连接断了会怎么样?内置的防火墙 kill switch 会立即生效:流量只允许发往所需的 VPN 服务器和局域网设备,隧道断开期间不会有任何内容泄露到外面。
它支持哪些 VPN 服务商?超过 20 家,包括 AirVPN、Cyberghost、ExpressVPN、HideMyAss、IPVanish、IVPN、Mullvad、NordVPN、Private Internet Access、ProtonVPN、PureVPN、Surfshark、TorGuard、VyprVPN 和 Windscribe。custom 服务商允许你使用自己的 OpenVPN 或 Wireguard 配置,那里也支持 AmneziaWG。
内置的代理是干什么用的?Gluetun 自带一个 Shadowsocks 代理(基于 SOCKS5 并带加密层,隧道支持 TCP+UDP)、一个 Socks5 代理(TCP+UDP)和一个支持 HTTP 和 HTTPS 的 HTTP 代理。把其他应用或容器指向这些代理,就能让它们的流量走 VPN 隧道。
除了隧道它还能做什么?能——它内置了 DNS over TLS,可以自选 DNS 服务商,还能屏蔽恶意软件和广告的域名及 IP 地址,并且每 24 小时实时更新一次。同时选择多个 DNS 服务商还可以实现 split horizon DNS。
能通过它做端口转发吗?可以,有三家服务商支持:Private Internet Access、PrivateVPN 和 ProtonVPN 都支持通过 Gluetun 在 VPN 服务器侧进行自定义端口转发。
Creator
passteque
Size
19.8 MB
Stars
15.8K
Age
8y
Commits · 90 Days