"github.com/stretchr/testify/require"
)
+var trackers = []string{
+ "udp://tracker.coppersurfer.tk:6969",
+ "udp://tracker.leechers-paradise.org:6969",
+}
+
// Ensure net.IPs are stored big-endian, to match the way they're read from
// the wire.
func TestNetIPv4Bytes(t *testing.T) {
}
rand.Read(req.PeerId[:])
copy(req.InfoHash[:], []uint8{0xa3, 0x56, 0x41, 0x43, 0x74, 0x23, 0xe6, 0x26, 0xd9, 0x38, 0x25, 0x4a, 0x6b, 0x80, 0x49, 0x10, 0xa6, 0x67, 0xa, 0xc1})
- ar, err := Announce(defaultClient, defaultHTTPUserAgent, "udp://tracker.openbittorrent.com:80/announce", &req)
+ ar, err := Announce(defaultClient, defaultHTTPUserAgent, trackers[0], &req)
// Skip any net errors as we don't control the server.
if _, ok := err.(net.Error); ok {
t.Skip(err)
wg := sync.WaitGroup{}
success := make(chan bool)
fail := make(chan struct{})
- for _, url := range []string{
- "udp://tracker.openbittorrent.com:80/announce",
- "udp://tracker.publicbt.com:80",
- "udp://tracker.istole.it:6969",
- "udp://tracker.ccc.de:80",
- "udp://tracker.open.demonii.com:1337",
- "udp://open.demonii.com:1337",
- "udp://exodus.desync.com:6969",
- } {
+ for _, url := range trackers {
wg.Add(1)
go func(url string) {
defer wg.Done()