- for _, t := range s.Config.Trackers {
- if err := register(&RealDialer{}, t, tr); err != nil {
- s.Logger.Error(fmt.Sprintf("Unable to register with tracker %v", t), "error", err)
- }
+ // Check the tracker string for a password. This is janky but avoids a breaking change to the Config
+ // Trackers field.
+ splitAddr := strings.Split(":", t)
+ if len(splitAddr) == 3 {
+ tr.Password = splitAddr[2]
+ }
+
+ if err := register(&RealDialer{}, t, tr); err != nil {
+ s.Logger.Error(fmt.Sprintf("Unable to register with tracker %v", t), "error", err)