In-process userspace WireGuard tunnel (wireguard-go + gVisor netstack) for
the managed-VPN add-on. No root, no OS routing changes: only the embedded
anacrolix/torrent client's peer + tracker traffic is routed through the
tunnel, so the swarm and trackers see the VPN IP, not the user's home IP.
unarr's control plane (API, heartbeats) keeps using the normal net.
- internal/vpn: FetchConfig (GET /api/internal/agent/vpn-config, Bearer auth,
typed errors for disabled/not_provisioned/slot_on_device) + Up (parse .conf
→ uapi, CreateNetTUN, device Up) + DialContext/ListenPacket adapters.
- engine/torrent.go: when a tunnel is set, wire TrackerDialContext +
HTTPDialContext + TrackerListenPacket to netstack, DisableUTP, and
AddDialer(NetworkDialer{tcp, netstack}) for peer conns.
- config: downloads.vpn.enabled flag.
- daemon: bring up the tunnel before the torrent client; non-fatal on
failure (logs + downloads in the clear); slot_on_device warns the user.
- version bump 0.8.1 → 0.9.0.
Pairs with the web VPN add-on (dormant behind NEXT_PUBLIC_VPN_ENABLED).
Runtime-verified once a VPNResellers trial provides a live endpoint.
139 lines
6.3 KiB
Modula-2
139 lines
6.3 KiB
Modula-2
module github.com/torrentclaw/unarr
|
|
|
|
go 1.25.0
|
|
|
|
require (
|
|
github.com/BurntSushi/toml v1.6.0
|
|
github.com/anacrolix/dht/v2 v2.23.0
|
|
github.com/anacrolix/log v0.17.1-0.20251118025802-918f1157b7bb
|
|
github.com/anacrolix/torrent v1.61.0
|
|
github.com/charmbracelet/huh v1.0.0
|
|
github.com/fatih/color v1.19.0
|
|
github.com/getsentry/sentry-go v0.44.1
|
|
github.com/google/uuid v1.6.0
|
|
github.com/huin/goupnp v1.3.0
|
|
github.com/olekukonko/tablewriter v1.1.4
|
|
github.com/pion/webrtc/v4 v4.2.11
|
|
github.com/spf13/cobra v1.10.2
|
|
github.com/torrentclaw/go-client v0.2.0
|
|
golang.org/x/term v0.41.0
|
|
golang.org/x/time v0.15.0
|
|
golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb
|
|
)
|
|
|
|
require (
|
|
github.com/RoaringBitmap/roaring v1.9.4 // indirect
|
|
github.com/alecthomas/atomic v0.1.0-alpha2 // indirect
|
|
github.com/anacrolix/btree v0.1.1 // indirect
|
|
github.com/anacrolix/chansync v0.7.0 // indirect
|
|
github.com/anacrolix/envpprof v1.5.0 // indirect
|
|
github.com/anacrolix/generics v0.2.0 // indirect
|
|
github.com/anacrolix/go-libutp v1.4.0 // indirect
|
|
github.com/anacrolix/missinggo v1.3.0 // indirect
|
|
github.com/anacrolix/missinggo/perf v1.0.0 // indirect
|
|
github.com/anacrolix/missinggo/v2 v2.10.0 // indirect
|
|
github.com/anacrolix/mmsg v1.1.1 // indirect
|
|
github.com/anacrolix/multiless v0.4.0 // indirect
|
|
github.com/anacrolix/stm v0.5.0 // indirect
|
|
github.com/anacrolix/sync v0.6.0 // indirect
|
|
github.com/anacrolix/upnp v0.1.4 // indirect
|
|
github.com/anacrolix/utp v0.2.0 // indirect
|
|
github.com/atotto/clipboard v0.1.4 // indirect
|
|
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
|
github.com/bahlo/generic-list-go v0.2.0 // indirect
|
|
github.com/benbjohnson/immutable v0.4.3 // indirect
|
|
github.com/bits-and-blooms/bitset v1.24.4 // indirect
|
|
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect
|
|
github.com/catppuccin/go v0.3.0 // indirect
|
|
github.com/cespare/xxhash v1.1.0 // indirect
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/charmbracelet/bubbles v1.0.0 // indirect
|
|
github.com/charmbracelet/bubbletea v1.3.10 // indirect
|
|
github.com/charmbracelet/colorprofile v0.4.3 // indirect
|
|
github.com/charmbracelet/lipgloss v1.1.0 // indirect
|
|
github.com/charmbracelet/x/ansi v0.11.6 // indirect
|
|
github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
|
|
github.com/charmbracelet/x/exp/strings v0.1.0 // indirect
|
|
github.com/charmbracelet/x/term v0.2.2 // indirect
|
|
github.com/clipperhouse/displaywidth v0.11.0 // indirect
|
|
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
|
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
|
github.com/edsrzf/mmap-go v1.2.0 // indirect
|
|
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
|
|
github.com/felixge/fgprof v0.9.5 // indirect
|
|
github.com/go-llsqlite/adapter v0.2.0 // indirect
|
|
github.com/go-llsqlite/crawshaw v0.6.0 // indirect
|
|
github.com/go-logr/logr v1.4.3 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/goccy/go-json v0.10.6 // indirect
|
|
github.com/google/btree v1.1.3 // indirect
|
|
github.com/google/go-cmp v0.7.0 // indirect
|
|
github.com/google/pprof v0.0.0-20260302011040-a15ffb7f9dcc // indirect
|
|
github.com/gorilla/websocket v1.5.3 // indirect
|
|
github.com/huandu/xstrings v1.5.0 // indirect
|
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
|
github.com/lucasb-eyer/go-colorful v1.4.0 // indirect
|
|
github.com/mattn/go-colorable v0.1.14 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/mattn/go-localereader v0.0.1 // indirect
|
|
github.com/mattn/go-runewidth v0.0.21 // indirect
|
|
github.com/minio/sha256-simd v1.0.1 // indirect
|
|
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
|
|
github.com/mr-tron/base58 v1.2.0 // indirect
|
|
github.com/mschoch/smat v0.2.0 // indirect
|
|
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
|
|
github.com/muesli/cancelreader v0.2.2 // indirect
|
|
github.com/muesli/termenv v0.16.0 // indirect
|
|
github.com/multiformats/go-multihash v0.2.3 // indirect
|
|
github.com/multiformats/go-varint v0.1.0 // indirect
|
|
github.com/ncruces/go-strftime v1.0.0 // indirect
|
|
github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6 // indirect
|
|
github.com/olekukonko/errors v1.2.0 // indirect
|
|
github.com/olekukonko/ll v0.1.8 // indirect
|
|
github.com/pion/datachannel v1.6.0 // indirect
|
|
github.com/pion/dtls/v3 v3.1.2 // indirect
|
|
github.com/pion/ice/v4 v4.2.2 // indirect
|
|
github.com/pion/interceptor v0.1.44 // indirect
|
|
github.com/pion/logging v0.2.4 // indirect
|
|
github.com/pion/mdns/v2 v2.1.0 // indirect
|
|
github.com/pion/randutil v0.1.0 // indirect
|
|
github.com/pion/rtcp v1.2.16 // indirect
|
|
github.com/pion/rtp v1.10.1 // indirect
|
|
github.com/pion/sctp v1.9.4 // indirect
|
|
github.com/pion/sdp/v3 v3.0.18 // indirect
|
|
github.com/pion/srtp/v3 v3.0.10 // indirect
|
|
github.com/pion/stun/v3 v3.1.1 // indirect
|
|
github.com/pion/transport/v4 v4.0.1 // indirect
|
|
github.com/pion/turn/v4 v4.1.4 // indirect
|
|
github.com/pkg/errors v0.9.1 // indirect
|
|
github.com/protolambda/ctxlock v0.1.0 // indirect
|
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
|
github.com/rivo/uniseg v0.4.7 // indirect
|
|
github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 // indirect
|
|
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
|
github.com/spf13/pflag v1.0.10 // indirect
|
|
github.com/tidwall/btree v1.8.1 // indirect
|
|
github.com/wlynxg/anet v0.0.5 // indirect
|
|
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
|
go.etcd.io/bbolt v1.4.3 // indirect
|
|
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
|
go.opentelemetry.io/otel v1.42.0 // indirect
|
|
go.opentelemetry.io/otel/metric v1.42.0 // indirect
|
|
go.opentelemetry.io/otel/trace v1.42.0 // indirect
|
|
golang.org/x/crypto v0.49.0 // indirect
|
|
golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 // indirect
|
|
golang.org/x/net v0.52.0 // indirect
|
|
golang.org/x/sync v0.20.0 // indirect
|
|
golang.org/x/sys v0.42.0 // indirect
|
|
golang.org/x/text v0.35.0 // indirect
|
|
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
|
|
gvisor.dev/gvisor v0.0.0-20250503011706-39ed1f5ac29c // indirect
|
|
lukechampine.com/blake3 v1.4.1 // indirect
|
|
modernc.org/libc v1.70.0 // indirect
|
|
modernc.org/mathutil v1.7.1 // indirect
|
|
modernc.org/memory v1.11.0 // indirect
|
|
modernc.org/sqlite v1.48.0 // indirect
|
|
zombiezen.com/go/sqlite v1.4.2 // indirect
|
|
)
|