gorond ./...
This commit is contained in:
parent
5501f994ca
commit
3e0f34934d
|
@ -5,9 +5,10 @@ import (
|
|||
"log"
|
||||
"sync"
|
||||
|
||||
"github.com/elliotchance/orderedmap"
|
||||
|
||||
"github.com/anacrolix/torrent"
|
||||
pp "github.com/anacrolix/torrent/peer_protocol"
|
||||
"github.com/elliotchance/orderedmap"
|
||||
)
|
||||
|
||||
type peerData struct {
|
||||
|
|
11
client.go
11
client.go
|
@ -19,12 +19,6 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/dustin/go-humanize"
|
||||
gbtree "github.com/google/btree"
|
||||
"github.com/pion/datachannel"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
"github.com/anacrolix/chansync"
|
||||
"github.com/anacrolix/chansync/events"
|
||||
"github.com/anacrolix/dht/v2"
|
||||
|
@ -37,6 +31,11 @@ import (
|
|||
"github.com/anacrolix/missinggo/v2/bitmap"
|
||||
"github.com/anacrolix/missinggo/v2/pproffd"
|
||||
"github.com/anacrolix/sync"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/dustin/go-humanize"
|
||||
gbtree "github.com/google/btree"
|
||||
"github.com/pion/datachannel"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
"github.com/anacrolix/torrent/bencode"
|
||||
"github.com/anacrolix/torrent/internal/limiter"
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/anacrolix/bargle"
|
||||
"github.com/anacrolix/tagflag"
|
||||
|
||||
"github.com/anacrolix/torrent/bencode"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"os"
|
||||
)
|
||||
|
||||
var builtinAnnounceList = [][]string{
|
||||
|
|
|
@ -16,14 +16,15 @@ import (
|
|||
|
||||
"github.com/anacrolix/log"
|
||||
"github.com/anacrolix/tagflag"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/dustin/go-humanize"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
"github.com/anacrolix/torrent"
|
||||
"github.com/anacrolix/torrent/iplist"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
pp "github.com/anacrolix/torrent/peer_protocol"
|
||||
"github.com/anacrolix/torrent/storage"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/dustin/go-humanize"
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
func torrentBar(t *torrent.Torrent, pieceStates bool) {
|
||||
|
|
|
@ -11,6 +11,10 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/anacrolix/bargle"
|
||||
"github.com/anacrolix/envpprof"
|
||||
"github.com/anacrolix/log"
|
||||
xprometheus "github.com/anacrolix/missinggo/v2/prometheus"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
|
@ -18,11 +22,6 @@ import (
|
|||
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
|
||||
"go.opentelemetry.io/otel/sdk/trace"
|
||||
|
||||
"github.com/anacrolix/bargle"
|
||||
"github.com/anacrolix/envpprof"
|
||||
"github.com/anacrolix/log"
|
||||
xprometheus "github.com/anacrolix/missinggo/v2/prometheus"
|
||||
|
||||
"github.com/anacrolix/torrent/bencode"
|
||||
"github.com/anacrolix/torrent/version"
|
||||
)
|
||||
|
|
|
@ -4,13 +4,14 @@ import (
|
|||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"net/http"
|
||||
|
||||
"github.com/anacrolix/bargle"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"github.com/bradfitz/iter"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
)
|
||||
|
||||
type pprintMetainfoFlags struct {
|
||||
|
|
|
@ -5,10 +5,10 @@ import (
|
|||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"github.com/anacrolix/torrent/tracker/udp"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/anacrolix/torrent"
|
||||
"github.com/anacrolix/torrent/tracker/udp"
|
||||
)
|
||||
|
||||
type scrapeCfg struct {
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/anacrolix/bargle"
|
||||
"github.com/anacrolix/log"
|
||||
|
||||
"github.com/anacrolix/torrent"
|
||||
"github.com/anacrolix/torrent/bencode"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
|
|
|
@ -11,12 +11,12 @@ import (
|
|||
"github.com/anacrolix/dht/v2/krpc"
|
||||
"github.com/anacrolix/log"
|
||||
"github.com/anacrolix/missinggo/v2"
|
||||
"github.com/anacrolix/torrent/version"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
"github.com/anacrolix/torrent/iplist"
|
||||
"github.com/anacrolix/torrent/mse"
|
||||
"github.com/anacrolix/torrent/storage"
|
||||
"github.com/anacrolix/torrent/version"
|
||||
)
|
||||
|
||||
// Probably not safe to modify this after it's given to a Client.
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
"github.com/anacrolix/fuse"
|
||||
"github.com/anacrolix/fuse/fs"
|
||||
"github.com/anacrolix/missinggo/v2"
|
||||
|
||||
"github.com/anacrolix/torrent"
|
||||
)
|
||||
|
||||
|
|
4
misc.go
4
misc.go
|
@ -6,12 +6,12 @@ import (
|
|||
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
"github.com/anacrolix/missinggo/v2"
|
||||
"github.com/anacrolix/torrent/types"
|
||||
"github.com/anacrolix/torrent/types/infohash"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
pp "github.com/anacrolix/torrent/peer_protocol"
|
||||
"github.com/anacrolix/torrent/types"
|
||||
"github.com/anacrolix/torrent/types/infohash"
|
||||
)
|
||||
|
||||
type (
|
||||
|
|
|
@ -5,8 +5,9 @@ import (
|
|||
"io"
|
||||
"sync"
|
||||
|
||||
"github.com/anacrolix/torrent/segments"
|
||||
"github.com/edsrzf/mmap-go"
|
||||
|
||||
"github.com/anacrolix/torrent/segments"
|
||||
)
|
||||
|
||||
type MMapSpan struct {
|
||||
|
|
|
@ -9,6 +9,7 @@ import (
|
|||
"sync"
|
||||
|
||||
"github.com/alexflint/go-arg"
|
||||
|
||||
"github.com/anacrolix/torrent/mse"
|
||||
)
|
||||
|
||||
|
|
|
@ -2,8 +2,9 @@ package torrent
|
|||
|
||||
import (
|
||||
"github.com/anacrolix/generics"
|
||||
"github.com/anacrolix/torrent/typed-roaring"
|
||||
list "github.com/bahlo/generic-list-go"
|
||||
|
||||
"github.com/anacrolix/torrent/typed-roaring"
|
||||
)
|
||||
|
||||
type orderedBitmap[T typedRoaring.BitConstraint] struct {
|
||||
|
|
|
@ -2,6 +2,7 @@ package torrent
|
|||
|
||||
import (
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
)
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package peer_protocol
|
|||
|
||||
import (
|
||||
"github.com/anacrolix/dht/v2/krpc"
|
||||
|
||||
"github.com/anacrolix/torrent/bencode"
|
||||
)
|
||||
|
||||
|
|
|
@ -20,13 +20,14 @@ import (
|
|||
"github.com/anacrolix/missinggo/iter"
|
||||
"github.com/anacrolix/missinggo/v2/bitmap"
|
||||
"github.com/anacrolix/multiless"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
"github.com/anacrolix/torrent/bencode"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"github.com/anacrolix/torrent/mse"
|
||||
pp "github.com/anacrolix/torrent/peer_protocol"
|
||||
request_strategy "github.com/anacrolix/torrent/request-strategy"
|
||||
"github.com/anacrolix/torrent/typed-roaring"
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
type PeerSource string
|
||||
|
|
1
pex.go
1
pex.go
|
@ -6,6 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/anacrolix/dht/v2/krpc"
|
||||
|
||||
pp "github.com/anacrolix/torrent/peer_protocol"
|
||||
)
|
||||
|
||||
|
|
1
piece.go
1
piece.go
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
"github.com/anacrolix/chansync"
|
||||
"github.com/anacrolix/missinggo/v2/bitmap"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
pp "github.com/anacrolix/torrent/peer_protocol"
|
||||
"github.com/anacrolix/torrent/storage"
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"expvar"
|
||||
|
||||
"github.com/anacrolix/multiless"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"github.com/anacrolix/torrent/types"
|
||||
)
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@ import (
|
|||
|
||||
"github.com/anacrolix/log"
|
||||
"github.com/anacrolix/multiless"
|
||||
"github.com/anacrolix/torrent/typed-roaring"
|
||||
"github.com/lispad/go-generics-tools/binheap"
|
||||
|
||||
"github.com/anacrolix/torrent/request-strategy"
|
||||
"github.com/anacrolix/torrent/typed-roaring"
|
||||
)
|
||||
|
||||
func (t *Torrent) requestStrategyPieceOrderState(i int) request_strategy.PieceRequestOrderState {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"net/netip"
|
||||
|
||||
"github.com/anacrolix/generics"
|
||||
|
||||
"github.com/anacrolix/torrent/smartban"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,8 +8,9 @@ import (
|
|||
"github.com/anacrolix/log"
|
||||
"github.com/anacrolix/missinggo/perf"
|
||||
"github.com/anacrolix/missinggo/v2"
|
||||
"github.com/anacrolix/torrent/dialer"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/anacrolix/torrent/dialer"
|
||||
)
|
||||
|
||||
type Listener interface {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"net/http"
|
||||
|
||||
"github.com/anacrolix/log"
|
||||
|
||||
"github.com/anacrolix/torrent/bencode"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
)
|
||||
|
|
|
@ -7,10 +7,10 @@ import (
|
|||
"path/filepath"
|
||||
|
||||
"github.com/anacrolix/missinggo/v2"
|
||||
"github.com/anacrolix/torrent/common"
|
||||
"github.com/anacrolix/torrent/segments"
|
||||
|
||||
"github.com/anacrolix/torrent/common"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"github.com/anacrolix/torrent/segments"
|
||||
)
|
||||
|
||||
// File-based storage for torrents, that isn't yet bound to a particular torrent.
|
||||
|
|
|
@ -13,6 +13,7 @@ import (
|
|||
|
||||
"crawshaw.io/sqlite"
|
||||
"crawshaw.io/sqlite/sqlitex"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,9 +6,10 @@ import (
|
|||
"sync"
|
||||
"testing"
|
||||
|
||||
qt "github.com/frankban/quicktest"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"github.com/anacrolix/torrent/storage"
|
||||
qt "github.com/frankban/quicktest"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"os"
|
||||
|
||||
"github.com/anacrolix/missinggo/v2"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,13 +9,14 @@ import (
|
|||
"testing/iotest"
|
||||
|
||||
"github.com/anacrolix/missinggo/v2/bitmap"
|
||||
"github.com/anacrolix/torrent"
|
||||
"github.com/anacrolix/torrent/internal/testutil"
|
||||
"github.com/anacrolix/torrent/storage"
|
||||
"github.com/frankban/quicktest"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
"github.com/anacrolix/torrent"
|
||||
"github.com/anacrolix/torrent/internal/testutil"
|
||||
"github.com/anacrolix/torrent/storage"
|
||||
)
|
||||
|
||||
type LeecherStorageTestCase struct {
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/anacrolix/log"
|
||||
|
||||
pp "github.com/anacrolix/torrent/peer_protocol"
|
||||
)
|
||||
|
||||
|
|
|
@ -30,8 +30,6 @@ import (
|
|||
"github.com/anacrolix/missinggo/v2/pubsub"
|
||||
"github.com/anacrolix/multiless"
|
||||
"github.com/anacrolix/sync"
|
||||
request_strategy "github.com/anacrolix/torrent/request-strategy"
|
||||
typedRoaring "github.com/anacrolix/torrent/typed-roaring"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/pion/datachannel"
|
||||
|
||||
|
@ -39,9 +37,11 @@ import (
|
|||
"github.com/anacrolix/torrent/common"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
pp "github.com/anacrolix/torrent/peer_protocol"
|
||||
request_strategy "github.com/anacrolix/torrent/request-strategy"
|
||||
"github.com/anacrolix/torrent/segments"
|
||||
"github.com/anacrolix/torrent/storage"
|
||||
"github.com/anacrolix/torrent/tracker"
|
||||
typedRoaring "github.com/anacrolix/torrent/typed-roaring"
|
||||
"github.com/anacrolix/torrent/webseed"
|
||||
"github.com/anacrolix/torrent/webtorrent"
|
||||
)
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"net/url"
|
||||
|
||||
"github.com/anacrolix/log"
|
||||
|
||||
trHttp "github.com/anacrolix/torrent/tracker/http"
|
||||
"github.com/anacrolix/torrent/tracker/udp"
|
||||
)
|
||||
|
|
|
@ -29,7 +29,7 @@ func NewClient(url_ *url.URL, opts NewClientOpts) Client {
|
|||
hc: &http.Client{
|
||||
Transport: &http.Transport{
|
||||
DialContext: opts.DialContext,
|
||||
Proxy: opts.Proxy,
|
||||
Proxy: opts.Proxy,
|
||||
TLSClientConfig: &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
ServerName: opts.ServerName,
|
||||
|
|
|
@ -14,6 +14,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/anacrolix/missinggo/httptoo"
|
||||
|
||||
"github.com/anacrolix/torrent/bencode"
|
||||
"github.com/anacrolix/torrent/tracker/shared"
|
||||
"github.com/anacrolix/torrent/tracker/udp"
|
||||
|
|
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/anacrolix/dht/v2/krpc"
|
||||
|
||||
"github.com/anacrolix/torrent/bencode"
|
||||
)
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import (
|
|||
|
||||
"github.com/anacrolix/dht/v2/krpc"
|
||||
"github.com/anacrolix/log"
|
||||
|
||||
trHttp "github.com/anacrolix/torrent/tracker/http"
|
||||
"github.com/anacrolix/torrent/tracker/shared"
|
||||
"github.com/anacrolix/torrent/tracker/udp"
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"net"
|
||||
|
||||
"github.com/anacrolix/log"
|
||||
|
||||
"github.com/anacrolix/missinggo/v2"
|
||||
)
|
||||
|
||||
|
|
|
@ -10,8 +10,9 @@ import (
|
|||
|
||||
"github.com/anacrolix/log"
|
||||
"github.com/anacrolix/missinggo/v2"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
)
|
||||
|
||||
type Change uint
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
package torrent
|
||||
|
||||
import (
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"net"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/anacrolix/torrent/webtorrent"
|
||||
"github.com/pion/datachannel"
|
||||
"github.com/pion/webrtc/v3"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
|
||||
"github.com/anacrolix/torrent/webtorrent"
|
||||
)
|
||||
|
||||
const webrtcNetwork = "webrtc"
|
||||
|
|
|
@ -10,6 +10,7 @@ import (
|
|||
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
"github.com/anacrolix/log"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
pp "github.com/anacrolix/torrent/peer_protocol"
|
||||
"github.com/anacrolix/torrent/webseed"
|
||||
|
|
|
@ -11,6 +11,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/RoaringBitmap/roaring"
|
||||
|
||||
"github.com/anacrolix/torrent/common"
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"github.com/anacrolix/torrent/segments"
|
||||
|
|
|
@ -5,17 +5,17 @@ import (
|
|||
"crypto/rand"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/anacrolix/generics"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/anacrolix/generics"
|
||||
"github.com/anacrolix/log"
|
||||
|
||||
"github.com/anacrolix/torrent/tracker"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/pion/datachannel"
|
||||
"github.com/pion/webrtc/v3"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
|
||||
"github.com/anacrolix/torrent/tracker"
|
||||
)
|
||||
|
||||
type TrackerClientStats struct {
|
||||
|
|
|
@ -4,6 +4,10 @@ import (
|
|||
"context"
|
||||
"expvar"
|
||||
"fmt"
|
||||
"io"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/anacrolix/log"
|
||||
"github.com/anacrolix/missinggo/v2/pproffd"
|
||||
"github.com/pion/datachannel"
|
||||
|
@ -12,9 +16,6 @@ import (
|
|||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"io"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -8,12 +8,12 @@ import (
|
|||
"sync"
|
||||
|
||||
"github.com/anacrolix/log"
|
||||
"github.com/anacrolix/torrent/tracker/http"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/pion/datachannel"
|
||||
|
||||
"github.com/anacrolix/torrent/tracker"
|
||||
"github.com/anacrolix/torrent/tracker/http"
|
||||
"github.com/anacrolix/torrent/webtorrent"
|
||||
"github.com/pion/datachannel"
|
||||
)
|
||||
|
||||
type websocketTrackerStatus struct {
|
||||
|
|
Loading…
Reference in New Issue