diff --git a/cmd/gluetun/main.go b/cmd/gluetun/main.go index f0aa2b83..b5af2f0f 100644 --- a/cmd/gluetun/main.go +++ b/cmd/gluetun/main.go @@ -322,7 +322,7 @@ func _main(ctx context.Context, buildInfo models.BuildInformation, otherGroupHandler := goshutdown.NewGroupHandler("other", defaultGroupSettings) openvpnLooper := openvpn.NewLoop(allSettings.OpenVPN, nonRootUsername, puid, pgid, allServers, - ovpnConf, firewallConf, routingConf, logger, httpClient, tunnelReadyCh) + ovpnConf, firewallConf, logger, httpClient, tunnelReadyCh) openvpnHandler, openvpnCtx, openvpnDone := goshutdown.NewGoRoutineHandler( "openvpn", goshutdown.GoRoutineSettings{Timeout: time.Second}) // wait for restartOpenvpn diff --git a/internal/openvpn/loop.go b/internal/openvpn/loop.go index b0460f02..4bbcdc6e 100644 --- a/internal/openvpn/loop.go +++ b/internal/openvpn/loop.go @@ -11,7 +11,6 @@ import ( "github.com/qdm12/gluetun/internal/loopstate" "github.com/qdm12/gluetun/internal/models" "github.com/qdm12/gluetun/internal/openvpn/state" - "github.com/qdm12/gluetun/internal/routing" "github.com/qdm12/golibs/logging" ) @@ -36,9 +35,8 @@ type Loop struct { pgid int targetConfPath string // Configurators - conf StarterAuthWriter - fw firewallConfigurer - routing routing.Routing + conf StarterAuthWriter + fw firewallConfigurer // Other objects logger, pfLogger logging.Logger client *http.Client @@ -63,11 +61,10 @@ const ( defaultBackoffTime = 15 * time.Second ) -func NewLoop(settings configuration.OpenVPN, - username string, puid, pgid int, allServers models.AllServers, - conf Configurator, fw firewallConfigurer, routing routing.Routing, - logger logging.ParentLogger, client *http.Client, - tunnelReady chan<- struct{}) *Loop { +func NewLoop(settings configuration.OpenVPN, username string, + puid, pgid int, allServers models.AllServers, conf Configurator, + fw firewallConfigurer, logger logging.ParentLogger, + client *http.Client, tunnelReady chan<- struct{}) *Loop { start := make(chan struct{}) running := make(chan models.LoopStatus) stop := make(chan struct{}) @@ -85,7 +82,6 @@ func NewLoop(settings configuration.OpenVPN, targetConfPath: constants.OpenVPNConf, conf: conf, fw: fw, - routing: routing, logger: logger.NewChild(logging.Settings{Prefix: "openvpn: "}), pfLogger: logger.NewChild(logging.Settings{Prefix: "port forwarding: "}), client: client,