Fix: port forwarding VPN interface specification
This commit is contained in:
@@ -22,7 +22,7 @@ func (l *Loop) startPortForwarding(ctx context.Context, data tunnelUpData) (err
|
|||||||
// only used for PIA for now
|
// only used for PIA for now
|
||||||
gateway, err := l.routing.VPNLocalGatewayIP(data.vpnIntf)
|
gateway, err := l.routing.VPNLocalGatewayIP(data.vpnIntf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("%w: %s", errObtainVPNLocalGateway, err)
|
return fmt.Errorf("%w: for interface %s: %s", errObtainVPNLocalGateway, data.vpnIntf, err)
|
||||||
}
|
}
|
||||||
l.logger.Info("VPN gateway IP address: " + gateway.String())
|
l.logger.Info("VPN gateway IP address: " + gateway.String())
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ func (l *Loop) Run(ctx context.Context, done chan<- struct{}) {
|
|||||||
portForwarding: settings.Provider.PortForwarding.Enabled,
|
portForwarding: settings.Provider.PortForwarding.Enabled,
|
||||||
serverName: serverName,
|
serverName: serverName,
|
||||||
portForwarder: providerConf,
|
portForwarder: providerConf,
|
||||||
|
vpnIntf: settings.OpenVPN.Interface,
|
||||||
}
|
}
|
||||||
|
|
||||||
openvpnCtx, openvpnCancel := context.WithCancel(context.Background())
|
openvpnCtx, openvpnCancel := context.WithCancel(context.Background())
|
||||||
|
|||||||
Reference in New Issue
Block a user