You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
/* Do panic handling here in event IP addresses has changed */
if err.Error() == "network is unreachable" {
zap.L().Panic("Network has become unavailable! (VPN down?)")
}
zap.L().Warn("Could NOT write an UDP packet!", zap.Error(err))
}
}
--- 155,160 ----
this makes magneticod fall over if the IP address it binds to at start up vanishes.
this tends to only happen with VPN connections.
I also created a little script to look at the tun0 interface and use it configuration to launch magenticod with the right IPv4 address.
ideally the best solution would be to set a flag to a) switch this behaviour on or off and b) pass the interface name as an option and have magneticod react to this failure by rebinding (or exiting).
I am going to see if my paltry go hacking skills can achieve this in due course - for me I have achieved Minimal Viable Product - such that magneticod (as a service) now recovers from a VPN failure / IP address change.
Until I do something that adds some command options to enable the things I mention above I wont be doing any pushes, the idea would be that unless you selected the options magneticod behaviour would be as before.
Frankly if my VPN did not flip IP addresses so often I would not be even scratching this itch ! :)
Also great project, very interesting.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In the file magnetico/cmd/magneticod/dht/mainline/transport.go if we add the following -
*** transport.go 2020-10-01 21:48:55.671143085 +0000
--- transport.go_orij 2020-10-01 21:43:48.048129174 +0000
*** 155,164 ****
t.onCongestion()
}
} else if err != nil {
--- 155,160 ----
this makes magneticod fall over if the IP address it binds to at start up vanishes.
this tends to only happen with VPN connections.
I also created a little script to look at the tun0 interface and use it configuration to launch magenticod with the right IPv4 address.
ideally the best solution would be to set a flag to a) switch this behaviour on or off and b) pass the interface name as an option and have magneticod react to this failure by rebinding (or exiting).
I am going to see if my paltry go hacking skills can achieve this in due course - for me I have achieved Minimal Viable Product - such that magneticod (as a service) now recovers from a VPN failure / IP address change.
Until I do something that adds some command options to enable the things I mention above I wont be doing any pushes, the idea would be that unless you selected the options magneticod behaviour would be as before.
Frankly if my VPN did not flip IP addresses so often I would not be even scratching this itch ! :)
Also great project, very interesting.
The text was updated successfully, but these errors were encountered: