mirror of
https://github.com/go-i2p/go-i2p-bt.git
synced 2025-07-12 19:04:49 -04:00
fork it
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -25,10 +25,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/bencode"
|
||||
"github.com/xgfone/bt/krpc"
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/xgfone/bt/utils"
|
||||
"github.com/eyedeekay/go-i2p-bt/bencode"
|
||||
"github.com/eyedeekay/go-i2p-bt/krpc"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -20,7 +20,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
type testPeerManager struct {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -19,8 +19,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/xgfone/bt/utils"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/utils"
|
||||
)
|
||||
|
||||
// PeerManager is used to manage the peers.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -19,8 +19,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/krpc"
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/krpc"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
const bktlen = 160
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -17,8 +17,8 @@ package dht
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/krpc"
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/krpc"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
// RoutingTableNode represents the node with last changed time in the routing table.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -19,7 +19,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/utils"
|
||||
"github.com/eyedeekay/go-i2p-bt/utils"
|
||||
)
|
||||
|
||||
// TokenManager is used to manage and validate the token.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -21,8 +21,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/krpc"
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/krpc"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
type transaction struct {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -26,8 +26,8 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
pp "github.com/xgfone/bt/peerprotocol"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
pp "github.com/eyedeekay/go-i2p-bt/peerprotocol"
|
||||
)
|
||||
|
||||
// BlockSize is the size of a block of the piece.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -15,8 +15,8 @@
|
||||
package blockdownload
|
||||
|
||||
import (
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
pp "github.com/xgfone/bt/peerprotocol"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
pp "github.com/eyedeekay/go-i2p-bt/peerprotocol"
|
||||
)
|
||||
|
||||
// BlockDownloadHandler is used to downloads the files in the torrent file.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -18,8 +18,8 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/xgfone/bt/bencode"
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/bencode"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
// Predefine some error code.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -17,7 +17,7 @@ package krpc
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/xgfone/bt/bencode"
|
||||
"github.com/eyedeekay/go-i2p-bt/bencode"
|
||||
)
|
||||
|
||||
func TestMessage(t *testing.T) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -20,7 +20,7 @@ import (
|
||||
"io"
|
||||
"net"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
// Node represents a node information.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -24,8 +24,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/eyedeekay/i2pkeys"
|
||||
"github.com/xgfone/bt/bencode"
|
||||
"github.com/xgfone/bt/utils"
|
||||
"github.com/eyedeekay/go-i2p-bt/bencode"
|
||||
"github.com/eyedeekay/go-i2p-bt/utils"
|
||||
)
|
||||
|
||||
// ErrInvalidAddr is returned when the compact address is invalid.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -24,7 +24,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/xgfone/bt/bencode"
|
||||
"github.com/eyedeekay/go-i2p-bt/bencode"
|
||||
)
|
||||
|
||||
var zeroHash Hash
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -20,8 +20,8 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/xgfone/bt/bencode"
|
||||
"github.com/xgfone/bt/utils"
|
||||
"github.com/eyedeekay/go-i2p-bt/bencode"
|
||||
"github.com/eyedeekay/go-i2p-bt/utils"
|
||||
)
|
||||
|
||||
// Bytes is the []byte type.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -21,7 +21,7 @@ import (
|
||||
"io"
|
||||
"sort"
|
||||
|
||||
"github.com/xgfone/bt/utils"
|
||||
"github.com/eyedeekay/go-i2p-bt/utils"
|
||||
)
|
||||
|
||||
// Predefine some sizes of the pieces.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -20,7 +20,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/eyedeekay/i2pkeys"
|
||||
"github.com/xgfone/bt/bencode"
|
||||
"github.com/eyedeekay/go-i2p-bt/bencode"
|
||||
)
|
||||
|
||||
var errInvalidIP = errors.New("invalid ipv4 or ipv6")
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -19,7 +19,7 @@ import (
|
||||
"encoding/binary"
|
||||
"net"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
// GenerateAllowedFastSet generates some allowed fast set of the torrent file.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -18,7 +18,7 @@ import (
|
||||
"net"
|
||||
"testing"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
func TestGenerateAllowedFastSet(t *testing.T) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -19,7 +19,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
var errInvalidProtocolHeader = fmt.Errorf("unexpected peer protocol header string")
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -21,8 +21,8 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/bencode"
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/bencode"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
// Predefine some errors about extension support.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -22,7 +22,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
// Handler is used to handle the incoming peer connection.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -20,7 +20,7 @@ import (
|
||||
"net/url"
|
||||
"sync"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
// Force a peer address to be used
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -31,8 +31,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/xgfone/bt/bencode"
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/bencode"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
// AnnounceRequest is the tracker announce requests.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -22,8 +22,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/eyedeekay/i2pkeys"
|
||||
"github.com/xgfone/bt/bencode"
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/bencode"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
var errInvalidPeer = errors.New("invalid peer information format")
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -18,7 +18,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
func TestHTTPAnnounceRequest(t *testing.T) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -26,9 +26,9 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/xgfone/bt/tracker/httptracker"
|
||||
"github.com/xgfone/bt/tracker/udptracker"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/tracker/httptracker"
|
||||
"github.com/eyedeekay/go-i2p-bt/tracker/udptracker"
|
||||
)
|
||||
|
||||
// Predefine some announce events.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -22,8 +22,8 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/xgfone/bt/tracker/udptracker"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/tracker/udptracker"
|
||||
)
|
||||
|
||||
type testHandler struct{}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -26,7 +26,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/eyedeekay/i2pkeys"
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
// ProtocolID is magic constant for the udp tracker connection.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -25,7 +25,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
var Dial = net.Dial
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -24,7 +24,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
// ServerHandler is used to handle the request from the client.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -22,7 +22,7 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
)
|
||||
|
||||
type testHandler struct{}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -15,8 +15,8 @@
|
||||
package blockdownload
|
||||
|
||||
import (
|
||||
"github.com/xgfone/bt/metainfo"
|
||||
pp "github.com/xgfone/bt/peerprotocol"
|
||||
"github.com/eyedeekay/go-i2p-bt/metainfo"
|
||||
pp "github.com/eyedeekay/go-i2p-bt/peerprotocol"
|
||||
)
|
||||
|
||||
// BlockUploadHandler is used to downloads the files in the torrent file.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 xgfone
|
||||
// Copyright 2020 xgfone, 2023 idk
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
Reference in New Issue
Block a user