37ab26b415
- The stats sampler records sessions per peer: start, end, address and
traffic. A session ends when the peer goes quiet or is disabled; a new
one starts when the device changes networks. Stored in stats.json and
kept as long as the daily traffic history (max 1000 per peer).
- Country and network operator come from the free DB-IP Lite databases
(CC BY 4.0), downloaded monthly and looked up locally, so peer
addresses never leave the server. Settings → Data retention can switch
this off, which deletes the databases.
- API: GET /peers/{id}/sessions; peer stats include the current location;
settings include the database status.
- Web UI and iOS app: connection history card, location line, country
code in the peer list (web), switch in data retention.
Claude-Session: https://claude.ai/code/session_01RAnLbyQZ5ZTA7KqwXP98nw
27 lines
861 B
Modula-2
27 lines
861 B
Modula-2
module ghostwire
|
|
|
|
go 1.27.1
|
|
|
|
require (
|
|
github.com/google/nftables v0.3.0
|
|
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
|
github.com/vishvananda/netlink v1.3.1
|
|
golang.org/x/crypto v0.57.0
|
|
golang.org/x/sys v0.48.0
|
|
golang.org/x/term v0.46.0
|
|
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20241231184526-a9ab2273dd10
|
|
)
|
|
|
|
require (
|
|
github.com/google/go-cmp v0.6.0 // indirect
|
|
github.com/mdlayher/genetlink v1.3.2 // indirect
|
|
github.com/mdlayher/netlink v1.7.3-0.20250113171957-fbb4dce95f42 // indirect
|
|
github.com/mdlayher/socket v0.5.1 // indirect
|
|
github.com/oschwald/maxminddb-golang v1.13.1 // indirect
|
|
github.com/vishvananda/netns v0.0.5 // indirect
|
|
golang.org/x/net v0.58.0 // indirect
|
|
golang.org/x/sync v0.23.0 // indirect
|
|
golang.org/x/text v0.42.0 // indirect
|
|
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect
|
|
)
|