aboutsummaryrefslogtreecommitdiff
path: root/hotline/tracker.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-07-18 17:28:17 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-07-18 17:30:34 -0700
commit6eaf9391526a808c0056427f056169311352446d (patch)
tree8bbbf2bff9d2f1cacdd46ac6d56a856723ae6707 /hotline/tracker.go
parentb6e3be945680d017874967ae72ef86ee4235dcc2 (diff)
Add support for trackers that require a password
Diffstat (limited to 'hotline/tracker.go')
-rw-r--r--hotline/tracker.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/hotline/tracker.go b/hotline/tracker.go
index 2d655d9..a3e077e 100644
--- a/hotline/tracker.go
+++ b/hotline/tracker.go
@@ -18,6 +18,7 @@ type TrackerRegistration struct {
PassID [4]byte // Random number generated by the server
Name string // Server Name
Description string // Description of the server
+ Password string // Tracker password, if required by tracker
readOffset int // Internal offset to track read progress
}
@@ -37,6 +38,8 @@ func (tr *TrackerRegistration) Read(p []byte) (int, error) {
[]byte(tr.Name),
[]byte{uint8(len(tr.Description))},
[]byte(tr.Description),
+ []byte{uint8(len(tr.Password))},
+ []byte(tr.Password),
)
if tr.readOffset >= len(buf) {