feat(others): optional BORINGPOLL_GLUETUNCOM to fight AI slop scammy gluetun[dot]com

This commit is contained in:
Quentin McGaw
2026-03-06 16:27:16 +00:00
parent 2460b56c2b
commit 457e5597bb
12 changed files with 287 additions and 8 deletions
+5
View File
@@ -25,4 +25,9 @@ func (l *Loop) cleanup() {
l.logger.Error("stopping port forwarding: " + err.Error())
}
}
err = l.boringPoll.Stop()
if err != nil {
l.logger.Error("stopping boring poll: " + err.Error())
}
}
+5
View File
@@ -115,3 +115,8 @@ type HealthChecker interface {
type HealthServer interface {
SetError(err error)
}
type Service interface {
Start() (runError <-chan error, err error)
Stop() error
}
+5 -3
View File
@@ -33,6 +33,7 @@ type Loop struct {
portForward PortForward
publicip PublicIPLoop
dnsLooper DNSLoop
boringPoll Service
// Other objects
starter CmdStarter // for OpenVPN
logger log.LoggerInterface
@@ -52,9 +53,9 @@ const (
)
func NewLoop(vpnSettings settings.VPN, ipv6Supported bool, vpnInputPorts []uint16,
providers Providers, storage Storage, healthSettings settings.Health,
healthChecker HealthChecker, healthServer HealthServer, openvpnConf OpenVPN,
netLinker NetLinker, fw Firewall, routing Routing,
providers Providers, storage Storage, boringPoll Service,
healthSettings settings.Health, healthChecker HealthChecker, healthServer HealthServer,
openvpnConf OpenVPN, netLinker NetLinker, fw Firewall, routing Routing,
portForward PortForward, starter CmdStarter,
publicip PublicIPLoop, dnsLooper DNSLoop,
logger log.LoggerInterface, client *http.Client,
@@ -80,6 +81,7 @@ func NewLoop(vpnSettings settings.VPN, ipv6Supported bool, vpnInputPorts []uint1
versionInfo: versionInfo,
ipv6Supported: ipv6Supported,
vpnInputPorts: vpnInputPorts,
boringPoll: boringPoll,
openvpnConf: openvpnConf,
netLinker: netLinker,
fw: fw,
+5
View File
@@ -119,6 +119,11 @@ func (l *Loop) onTunnelUp(ctx, loopCtx context.Context, data tunnelUpData) {
if err != nil {
l.logger.Error(err.Error())
}
_, err = l.boringPoll.Start()
if err != nil {
l.logger.Error("cannot start boring poll: " + err.Error())
}
}
func (l *Loop) collectHealthErrors(ctx, loopCtx context.Context, healthErrCh <-chan error) {