├── .dockerignore ├── .github ├── FUNDING.yml └── workflows │ └── docker-image.yml ├── .gitignore ├── .idea ├── .gitignore ├── modules.xml ├── torrent-web-seeder.iml └── vcs.xml ├── .vscode └── launch.json ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── client └── main.go ├── go.mod ├── go.sum ├── proto ├── torrent-web-seeder.pb.go ├── torrent-web-seeder.proto └── torrent-web-seeder_grpc.pb.go ├── server ├── configure.go ├── main.go └── services │ ├── common.go │ ├── file_cache_map.go │ ├── file_store_map.go │ ├── mmap.go │ ├── piece_completion.go │ ├── piece_reader.go │ ├── stat.go │ ├── stat_grpc.go │ ├── stat_web.go │ ├── throttled_reader.go │ ├── torrent_client.go │ ├── torrent_map.go │ ├── torrent_store.go │ ├── torrent_store_map.go │ ├── touch_map.go │ ├── touch_writer.go │ ├── web.go │ └── web_seeder.go ├── torrents └── Sintel.torrent └── up.sh /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .github 3 | .vscode 4 | .dockerignore 5 | *Dockerfile* 6 | up.sh 7 | README.md 8 | Makefile 9 | LICENSE 10 | client 11 | server/data 12 | server/cerver 13 | __debug_bin 14 | .DS_Store -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: pavel_tatarskiy 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/workflows/docker-image.yml: -------------------------------------------------------------------------------- 1 | on: 2 | workflow_dispatch: 3 | push: 4 | branches: 5 | - 'master' 6 | tags: 7 | - 'v*' 8 | env: 9 | REGISTRY: ghcr.io 10 | IMAGE_NAME: ${{ github.repository }} 11 | 12 | jobs: 13 | docker: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - 17 | name: Checkout 18 | uses: actions/checkout@v4 19 | - 20 | name: Docker meta 21 | id: meta 22 | uses: docker/metadata-action@v5 23 | with: 24 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 25 | tags: | 26 | type=ref,event=branch 27 | type=ref,event=pr 28 | type=semver,pattern={{version}} 29 | type=semver,pattern={{major}}.{{minor}} 30 | type=sha 31 | - 32 | name: Login to DockerHub 33 | if: github.event_name != 'pull_request' 34 | uses: docker/login-action@v3 35 | with: 36 | registry: ${{ env.REGISTRY }} 37 | username: ${{ github.actor }} 38 | password: ${{ secrets.GITHUB_TOKEN }} 39 | - 40 | name: Build and push 41 | uses: docker/build-push-action@v6 42 | with: 43 | context: . 44 | push: ${{ github.event_name != 'pull_request' }} 45 | tags: ${{ steps.meta.outputs.tags }} 46 | labels: ${{ steps.meta.outputs.labels }} 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | *.db 14 | 15 | tmp 16 | 17 | server/data* 18 | 19 | server/server 20 | client/client 21 | 22 | .DS_Store 23 | server/__debug_bin 24 | server/.env 25 | .idea -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/torrent-web-seeder.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Launch", 9 | "type": "go", 10 | "request": "launch", 11 | "mode": "auto", 12 | "program": "${workspaceFolder}/server", 13 | "env": {}, 14 | "envFile": "${env:HOME}/.env", 15 | "args": ["--input", "${env:HOME}", "--stat-port", "50052"] 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:latest AS certs 2 | 3 | # getting certs 4 | RUN apk update && apk upgrade && apk add --no-cache ca-certificates 5 | 6 | FROM golang:latest AS build 7 | 8 | # set work dir 9 | WORKDIR /app 10 | 11 | # copy the source files 12 | COPY . . 13 | 14 | # compile linux only 15 | ENV GOOS=linux 16 | 17 | ENV CGO_LDFLAGS="-static" 18 | 19 | # build the binary with debug information removed 20 | RUN cd ./server && go build -ldflags '-w -s' -a -installsuffix cgo -o server 21 | 22 | FROM alpine:latest 23 | 24 | # copy our static linked library 25 | COPY --from=build /app/server/server . 26 | 27 | # copy certs 28 | COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ 29 | 30 | ENV DATA_DIR=/data 31 | 32 | # tell we are exposing our services 33 | EXPOSE 50051 8080 8081 8082 8083 34 | 35 | # run it! 36 | CMD ["./server"] 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 webtor.io 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | protoc: 2 | protoc proto/torrent-web-seeder.proto --go_out=. --go_opt=paths=source_relative \ 3 | --go-grpc_out=. --go-grpc_opt=paths=source_relative proto/torrent-web-seeder.proto 4 | gsed -i 's/,omitempty//' ./proto/torrent-web-seeder.pb.go -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # torrent-web-seeder 2 | 3 | It is a wrapper around BitTorrent-client that introduces additional features: 4 | 1. Web-access to the downloading torrent 5 | 2. Status GRPC-service 6 | 3. Fetching torrent-files from the remote TorrentStore 7 | 8 | ## Basic usage 9 | 10 | ``` 11 | % ./server help 12 | NAME: 13 | torrent-web-seeder - Seeds torrent files 14 | 15 | USAGE: 16 | server [global options] command [command options] [arguments...] 17 | 18 | VERSION: 19 | 0.0.1 20 | 21 | COMMANDS: 22 | help, h Shows a list of commands or help for one command 23 | 24 | GLOBAL OPTIONS: 25 | --probe-host value probe listening host 26 | --probe-port value probe listening port (default: 8081) 27 | --host value listening host 28 | --port value http listening port (default: 8080) 29 | --grace value grace in seconds (default: 600) [$GRACE] 30 | --download-rate value download rate [$DOWNLOAD_RATE] 31 | --torrent-store-host value torrent store host [$TORRENT_STORE_SERVICE_HOST, $TORRENT_STORE_HOST] 32 | --torrent-store-port value torrent store port (default: 50051) [$TORRENT_STORE_SERVICE_PORT, $TORRENT_STORE_PORT] 33 | --stat-host value stat listening host 34 | --stat-port value stat listening port (default: 50051) 35 | --info-hash value torrent infohash [$TORRENT_INFO_HASH, $INFO_HASH] 36 | --input value torrent file path 37 | --help, -h show help 38 | --version, -v print the version 39 | ``` -------------------------------------------------------------------------------- /client/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "os" 7 | "os/signal" 8 | "syscall" 9 | "time" 10 | 11 | "github.com/sirupsen/logrus" 12 | 13 | "github.com/gosuri/uiprogress/util/strutil" 14 | 15 | humanize "github.com/dustin/go-humanize" 16 | "github.com/gosuri/uiprogress" 17 | 18 | "github.com/urfave/cli" 19 | "google.golang.org/grpc" 20 | 21 | pb "github.com/webtor-io/torrent-web-seeder/proto" 22 | ) 23 | 24 | func render(cl pb.TorrentWebSeederClient) error { 25 | ctx, cancel := context.WithTimeout(context.Background(), time.Minute) 26 | defer cancel() 27 | r, err := cl.Files(ctx, &pb.FilesRequest{}) 28 | logrus.Infof("%v", r) 29 | if err != nil { 30 | return err 31 | } 32 | uiprogress.Start() 33 | var maxLen int 34 | for _, f := range r.Files { 35 | if maxLen < len(f.Path) { 36 | maxLen = len(f.Path) 37 | } 38 | } 39 | for _, f := range r.Files { 40 | err = renderFile(cl, f.GetPath(), maxLen) 41 | if err != nil { 42 | return err 43 | } 44 | } 45 | return nil 46 | } 47 | 48 | func renderFile(cl pb.TorrentWebSeederClient, path string, maxLen int) error { 49 | stat, err := getStat(cl, path) 50 | if err != nil { 51 | return err 52 | } 53 | bar := uiprogress.AddBar(int(stat.GetTotal())) 54 | bar.PrependFunc(func(*uiprogress.Bar) string { 55 | return strutil.Resize(path, uint(maxLen)) 56 | }) 57 | bar.AppendCompleted() 58 | bar.AppendFunc(func(*uiprogress.Bar) (ret string) { 59 | switch stat.GetStatus() { 60 | case pb.StatReply_INITIALIZATION: 61 | return "init" 62 | case pb.StatReply_RESTORING: 63 | return "restoring" 64 | case pb.StatReply_SEEDING: 65 | return fmt.Sprintf("seeding (%s/%s)", humanize.Bytes(uint64(stat.GetCompleted())), humanize.Bytes(uint64(stat.GetTotal()))) 66 | case pb.StatReply_IDLE: 67 | return fmt.Sprintf("seeding (%s/%s)", humanize.Bytes(uint64(stat.GetCompleted())), humanize.Bytes(uint64(stat.GetTotal()))) 68 | case pb.StatReply_TERMINATED: 69 | return "terminated" 70 | } 71 | return "" 72 | }) 73 | go func() { 74 | ctx := context.Background() 75 | c, err := cl.StatStream(ctx, &pb.StatRequest{Path: path}) 76 | if err != nil { 77 | return 78 | } 79 | for { 80 | stat, err := c.Recv() 81 | if err != nil { 82 | break 83 | } 84 | // logrus.Infof("%v", stat) 85 | bar.Set(int(stat.GetCompleted())) 86 | } 87 | }() 88 | return nil 89 | } 90 | 91 | func getStat(cl pb.TorrentWebSeederClient, path string) (*pb.StatReply, error) { 92 | ctx := context.Background() 93 | return cl.Stat(ctx, &pb.StatRequest{Path: path}) 94 | } 95 | 96 | func main() { 97 | app := cli.NewApp() 98 | app.Name = "torrent-web-seeder-cli" 99 | app.Usage = "interacts with torrent web seeder" 100 | app.Version = "0.0.1" 101 | app.Flags = []cli.Flag{ 102 | cli.StringFlag{ 103 | Name: "host, H", 104 | Usage: "hostname of the torrent web seeder", 105 | Value: "localhost", 106 | EnvVar: "TORRENT_WEB_SEEDER_HOST", 107 | }, 108 | cli.IntFlag{ 109 | Name: "port, P", 110 | Usage: "port of the torrent web seeder", 111 | Value: 50051, 112 | EnvVar: "TORRENT_WEB_SEEDER_PORT", 113 | }, 114 | } 115 | app.Action = func(c *cli.Context) error { 116 | addr := fmt.Sprintf("%s:%d", c.String("host"), c.Int("port")) 117 | conn, err := grpc.Dial(addr, grpc.WithInsecure()) 118 | if err != nil { 119 | return err 120 | } 121 | defer conn.Close() 122 | cl := pb.NewTorrentWebSeederClient(conn) 123 | 124 | sigs := make(chan os.Signal, 1) 125 | signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) 126 | err = render(cl) 127 | if err != nil { 128 | return err 129 | } 130 | <-sigs 131 | return nil 132 | } 133 | err := app.Run(os.Args) 134 | if err != nil { 135 | fmt.Println(err) 136 | os.Exit(1) 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/webtor-io/torrent-web-seeder 2 | 3 | go 1.24.2 4 | 5 | require ( 6 | code.cloudfoundry.org/bytefmt v0.37.0 7 | github.com/RoaringBitmap/roaring v1.9.4 // indirect 8 | github.com/anacrolix/chansync v0.6.0 // indirect 9 | github.com/anacrolix/log v0.16.0 10 | github.com/anacrolix/sync v0.5.3 // indirect 11 | github.com/bakins/logrus-middleware v0.0.0-20180426214643-ce4c6f8deb07 12 | github.com/bakins/test-helpers v0.0.0-20141028124846-af83df64dc31 // indirect 13 | github.com/dustin/go-humanize v1.0.1 14 | github.com/go-pg/pg/v10 v10.14.0 // indirect 15 | github.com/gosuri/uilive v0.0.4 // indirect 16 | github.com/gosuri/uiprogress v0.0.1 17 | github.com/juju/ratelimit v1.0.2 18 | github.com/mattn/go-isatty v0.0.20 // indirect 19 | github.com/pkg/errors v0.9.1 20 | github.com/sirupsen/logrus v1.9.3 21 | github.com/urfave/cli v1.22.16 22 | github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect 23 | github.com/webtor-io/common-services v0.0.0-20250112153432-554128b56bd5 24 | github.com/webtor-io/torrent-store v1.0.0 25 | go.etcd.io/bbolt v1.4.0 // indirect 26 | golang.org/x/crypto v0.37.0 // indirect 27 | golang.org/x/sys v0.32.0 // indirect 28 | golang.org/x/time v0.11.0 29 | google.golang.org/grpc v1.72.0 30 | ) 31 | 32 | require ( 33 | github.com/anacrolix/missinggo/v2 v2.8.0 34 | github.com/anacrolix/torrent v1.58.1 35 | github.com/edsrzf/mmap-go v1.2.0 36 | github.com/go-llsqlite/adapter v0.2.0 37 | github.com/prometheus/client_golang v1.22.0 38 | github.com/webtor-io/lazymap v0.0.0-20250308124910-3a61e0f78108 39 | google.golang.org/protobuf v1.36.6 40 | ) 41 | 42 | require ( 43 | github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 // indirect 44 | github.com/alecthomas/atomic v0.1.0-alpha2 // indirect 45 | github.com/anacrolix/dht/v2 v2.22.1 // indirect 46 | github.com/anacrolix/envpprof v1.4.0 // indirect 47 | github.com/anacrolix/generics v0.0.3-0.20240902042256-7fb2702ef0ca // indirect 48 | github.com/anacrolix/go-libutp v1.3.2 // indirect 49 | github.com/anacrolix/missinggo v1.3.0 // indirect 50 | github.com/anacrolix/missinggo/perf v1.0.0 // indirect 51 | github.com/anacrolix/mmsg v1.1.1 // indirect 52 | github.com/anacrolix/multiless v0.4.0 // indirect 53 | github.com/anacrolix/stm v0.5.0 // indirect 54 | github.com/anacrolix/upnp v0.1.4 // indirect 55 | github.com/anacrolix/utp v0.2.0 // indirect 56 | github.com/aws/aws-sdk-go v1.55.6 // indirect 57 | github.com/bahlo/generic-list-go v0.2.0 // indirect 58 | github.com/benbjohnson/immutable v0.4.3 // indirect 59 | github.com/beorn7/perks v1.0.1 // indirect 60 | github.com/bits-and-blooms/bitset v1.22.0 // indirect 61 | github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect 62 | github.com/cespare/xxhash v1.1.0 // indirect 63 | github.com/cespare/xxhash/v2 v2.3.0 // indirect 64 | github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect 65 | github.com/davecgh/go-spew v1.1.1 // indirect 66 | github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect 67 | github.com/go-llsqlite/crawshaw v0.5.5 // indirect 68 | github.com/go-logr/logr v1.4.2 // indirect 69 | github.com/go-logr/stdr v1.2.2 // indirect 70 | github.com/go-pg/migrations/v8 v8.1.0 // indirect 71 | github.com/go-pg/zerochecker v0.2.0 // indirect 72 | github.com/google/btree v1.1.3 // indirect 73 | github.com/google/uuid v1.6.0 // indirect 74 | github.com/gorilla/websocket v1.5.3 // indirect 75 | github.com/huandu/xstrings v1.5.0 // indirect 76 | github.com/jinzhu/inflection v1.0.0 // indirect 77 | github.com/jmespath/go-jmespath v0.4.0 // indirect 78 | github.com/klauspost/compress v1.18.0 // indirect 79 | github.com/klauspost/cpuid/v2 v2.2.10 // indirect 80 | github.com/minio/sha256-simd v1.0.1 // indirect 81 | github.com/mr-tron/base58 v1.2.0 // indirect 82 | github.com/mschoch/smat v0.2.0 // indirect 83 | github.com/multiformats/go-multihash v0.2.3 // indirect 84 | github.com/multiformats/go-varint v0.0.7 // indirect 85 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect 86 | github.com/ncruces/go-strftime v0.1.9 // indirect 87 | github.com/pion/datachannel v1.5.10 // indirect 88 | github.com/pion/dtls/v3 v3.0.6 // indirect 89 | github.com/pion/ice/v4 v4.0.10 // indirect 90 | github.com/pion/interceptor v0.1.37 // indirect 91 | github.com/pion/logging v0.2.3 // indirect 92 | github.com/pion/mdns/v2 v2.0.7 // indirect 93 | github.com/pion/randutil v0.1.0 // indirect 94 | github.com/pion/rtcp v1.2.15 // indirect 95 | github.com/pion/rtp v1.8.13 // indirect 96 | github.com/pion/sctp v1.8.38 // indirect 97 | github.com/pion/sdp/v3 v3.0.11 // indirect 98 | github.com/pion/srtp/v3 v3.0.4 // indirect 99 | github.com/pion/stun/v3 v3.0.0 // indirect 100 | github.com/pion/transport/v3 v3.0.7 // indirect 101 | github.com/pion/turn/v4 v4.0.1 // indirect 102 | github.com/pion/webrtc/v4 v4.0.15 // indirect 103 | github.com/prometheus/client_model v0.6.2 // indirect 104 | github.com/prometheus/common v0.63.0 // indirect 105 | github.com/prometheus/procfs v0.16.1 // indirect 106 | github.com/protolambda/ctxlock v0.1.0 // indirect 107 | github.com/redis/go-redis/v9 v9.7.3 // indirect 108 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect 109 | github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 // indirect 110 | github.com/russross/blackfriday/v2 v2.1.0 // indirect 111 | github.com/spaolacci/murmur3 v1.1.0 // indirect 112 | github.com/tidwall/btree v1.7.0 // indirect 113 | github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect 114 | github.com/vmihailenco/bufpool v0.1.11 // indirect 115 | github.com/vmihailenco/tagparser v0.1.2 // indirect 116 | github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect 117 | github.com/wlynxg/anet v0.0.5 // indirect 118 | go.opentelemetry.io/auto/sdk v1.1.0 // indirect 119 | go.opentelemetry.io/otel v1.35.0 // indirect 120 | go.opentelemetry.io/otel/metric v1.35.0 // indirect 121 | go.opentelemetry.io/otel/trace v1.35.0 // indirect 122 | golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect 123 | golang.org/x/net v0.39.0 // indirect 124 | golang.org/x/sync v0.13.0 // indirect 125 | golang.org/x/text v0.24.0 // indirect 126 | google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect 127 | lukechampine.com/blake3 v1.4.0 // indirect 128 | mellium.im/sasl v0.3.2 // indirect 129 | modernc.org/libc v1.63.0 // indirect 130 | modernc.org/mathutil v1.7.1 // indirect 131 | modernc.org/memory v1.10.0 // indirect 132 | modernc.org/sqlite v1.37.0 // indirect 133 | zombiezen.com/go/sqlite v1.4.0 // indirect 134 | ) 135 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | code.cloudfoundry.org/bytefmt v0.31.0 h1:7Vh8P2Vnz7W89QgtArF1kaS5DS7RnktTCZ7eUKyEzF8= 4 | code.cloudfoundry.org/bytefmt v0.31.0/go.mod h1:HIz0xOci24hA/16xtQ6aeIT9yXP7KxokFlaJ0Orfs/8= 5 | code.cloudfoundry.org/bytefmt v0.37.0 h1:GR5rZgr/6QLV/U2/xgORHUY4lu4EEBgN4/cz7SD3GqM= 6 | code.cloudfoundry.org/bytefmt v0.37.0/go.mod h1:u3/LRyPLBYFtn8h9CnzTeupRMD+76qCovDU0vND81lU= 7 | crawshaw.io/iox v0.0.0-20181124134642-c51c3df30797/go.mod h1:sXBiorCo8c46JlQV3oXPKINnZ8mcqnye1EkVkqsectk= 8 | crawshaw.io/sqlite v0.3.2/go.mod h1:igAO5JulrQ1DbdZdtVq48mnZUBAPOeFzer7VhDWNtW4= 9 | filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= 10 | filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= 11 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 12 | github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= 13 | github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= 14 | github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= 15 | github.com/RoaringBitmap/roaring v0.4.7/go.mod h1:8khRDP4HmeXns4xIj9oGrKSz7XTQiJx2zgh7AcNke4w= 16 | github.com/RoaringBitmap/roaring v0.4.17/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrXIr8KVNvRsDi1NI= 17 | github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= 18 | github.com/RoaringBitmap/roaring v1.9.4 h1:yhEIoH4YezLYT04s1nHehNO64EKFTop/wBhxv2QzDdQ= 19 | github.com/RoaringBitmap/roaring v1.9.4/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= 20 | github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= 21 | github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= 22 | github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 h1:byYvvbfSo3+9efR4IeReh77gVs4PnNDR3AMOE9NJ7a0= 23 | github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0/go.mod h1:q37NoqncT41qKc048STsifIt69LfUJ8SrWWcz/yam5k= 24 | github.com/alecthomas/assert/v2 v2.0.0-alpha3 h1:pcHeMvQ3OMstAWgaeaXIAL8uzB9xMm2zlxt+/4ml8lk= 25 | github.com/alecthomas/assert/v2 v2.0.0-alpha3/go.mod h1:+zD0lmDXTeQj7TgDgCt0ePWxb0hMC1G+PGTsTCv1B9o= 26 | github.com/alecthomas/atomic v0.1.0-alpha2 h1:dqwXmax66gXvHhsOS4pGPZKqYOlTkapELkLb3MNdlH8= 27 | github.com/alecthomas/atomic v0.1.0-alpha2/go.mod h1:zD6QGEyw49HIq19caJDc2NMXAy8rNi9ROrxtMXATfyI= 28 | github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= 29 | github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= 30 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 31 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 32 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 33 | github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 34 | github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= 35 | github.com/anacrolix/chansync v0.6.0 h1:/aQVvZ1yLRhmqEYrr9dC92JwzNBQ/SNnFi4uk+fTkQY= 36 | github.com/anacrolix/chansync v0.6.0/go.mod h1:DZsatdsdXxD0WiwcGl0nJVwyjCKMDv+knl1q2iBjA2k= 37 | github.com/anacrolix/dht/v2 v2.22.1 h1:mgsljPXyA/EWA7uUDSNjx7wf6gsfhppjVIp9auVeR6w= 38 | github.com/anacrolix/dht/v2 v2.22.1/go.mod h1:seXRz6HLw8zEnxlysf9ye2eQbrKUmch6PyOHpe/Nb/U= 39 | github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c= 40 | github.com/anacrolix/envpprof v1.0.0/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c= 41 | github.com/anacrolix/envpprof v1.1.0/go.mod h1:My7T5oSqVfEn4MD4Meczkw/f5lSIndGAKu/0SM/rkf4= 42 | github.com/anacrolix/envpprof v1.4.0 h1:QHeIcrgHcRChhnxR8l6rlaLlRQx9zd7Q2NII6Zbt83w= 43 | github.com/anacrolix/envpprof v1.4.0/go.mod h1:7QIG4CaX1uexQ3tqd5+BRa/9e2D02Wcertl6Yh0jCB0= 44 | github.com/anacrolix/generics v0.0.0-20230113004304-d6428d516633/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8= 45 | github.com/anacrolix/generics v0.0.3-0.20240902042256-7fb2702ef0ca h1:aiiGqSQWjtVNdi8zUMfA//IrM8fPkv2bWwZVPbDe0wg= 46 | github.com/anacrolix/generics v0.0.3-0.20240902042256-7fb2702ef0ca/go.mod h1:MN3ve08Z3zSV/rTuX/ouI4lNdlfTxgdafQJiLzyNRB8= 47 | github.com/anacrolix/go-libutp v1.3.2 h1:WswiaxTIogchbkzNgGHuHRfbrYLpv4o290mlvcx+++M= 48 | github.com/anacrolix/go-libutp v1.3.2/go.mod h1:fCUiEnXJSe3jsPG554A200Qv+45ZzIIyGEvE56SHmyA= 49 | github.com/anacrolix/log v0.3.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= 50 | github.com/anacrolix/log v0.6.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= 51 | github.com/anacrolix/log v0.13.1/go.mod h1:D4+CvN8SnruK6zIFS/xPoRJmtvtnxs+CSfDQ+BFxZ68= 52 | github.com/anacrolix/log v0.14.2/go.mod h1:1OmJESOtxQGNMlUO5rcv96Vpp9mfMqXXbe2RdinFLdY= 53 | github.com/anacrolix/log v0.16.0 h1:DSuyb5kAJwl3Y0X1TRcStVrTS9ST9b0BHW+7neE4Xho= 54 | github.com/anacrolix/log v0.16.0/go.mod h1:m0poRtlr41mriZlXBQ9SOVZ8yZBkLjOkDhd5Li5pITA= 55 | github.com/anacrolix/lsan v0.0.0-20211126052245-807000409a62 h1:P04VG6Td13FHMgS5ZBcJX23NPC/fiC4cp9bXwYujdYM= 56 | github.com/anacrolix/lsan v0.0.0-20211126052245-807000409a62/go.mod h1:66cFKPCO7Sl4vbFnAaSq7e4OXtdMhRSBagJGWgmpJbM= 57 | github.com/anacrolix/missinggo v0.0.0-20180725070939-60ef2fbf63df/go.mod h1:kwGiTUTZ0+p4vAz3VbAI5a30t2YbvemcmspjKwrAz5s= 58 | github.com/anacrolix/missinggo v1.1.0/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= 59 | github.com/anacrolix/missinggo v1.1.2-0.20190815015349-b888af804467/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= 60 | github.com/anacrolix/missinggo v1.2.1/go.mod h1:J5cMhif8jPmFoC3+Uvob3OXXNIhOUikzMt+uUjeM21Y= 61 | github.com/anacrolix/missinggo v1.3.0 h1:06HlMsudotL7BAELRZs0yDZ4yVXsHXGi323QBjAVASw= 62 | github.com/anacrolix/missinggo v1.3.0/go.mod h1:bqHm8cE8xr+15uVfMG3BFui/TxyB6//H5fwlq/TeqMc= 63 | github.com/anacrolix/missinggo/perf v1.0.0 h1:7ZOGYziGEBytW49+KmYGTaNfnwUqP1HBsy6BqESAJVw= 64 | github.com/anacrolix/missinggo/perf v1.0.0/go.mod h1:ljAFWkBuzkO12MQclXzZrosP5urunoLS0Cbvb4V0uMQ= 65 | github.com/anacrolix/missinggo/v2 v2.2.0/go.mod h1:o0jgJoYOyaoYQ4E2ZMISVa9c88BbUBVQQW4QeRkNCGY= 66 | github.com/anacrolix/missinggo/v2 v2.5.1/go.mod h1:WEjqh2rmKECd0t1VhQkLGTdIWXO6f6NLjp5GlMZ+6FA= 67 | github.com/anacrolix/missinggo/v2 v2.7.3/go.mod h1:mIEtp9pgaXqt8VQ3NQxFOod/eQ1H0D1XsZzKUQfwtac= 68 | github.com/anacrolix/missinggo/v2 v2.8.0 h1:6pGnVOlR6TWL9JM5Msyezij8YHU3+oHO7r82Eql/kpA= 69 | github.com/anacrolix/missinggo/v2 v2.8.0/go.mod h1:vVO5FEziQm+NFmJesc7StpkquZk+WJFCaL0Wp//2sa0= 70 | github.com/anacrolix/mmsg v1.0.1/go.mod h1:x8kRaJY/dCrY9Al0PEcj1mb/uFHwP6GCJ9fLl4thEPc= 71 | github.com/anacrolix/mmsg v1.1.1 h1:4ce/3I5kM7qSF6T5A8MOmDCfac3UqYlk5Bzh5XsWebM= 72 | github.com/anacrolix/mmsg v1.1.1/go.mod h1:lPCXEN1eDDQtKktdKEzdw+roswx6wWPpeXAl/WpWVDU= 73 | github.com/anacrolix/multiless v0.4.0 h1:lqSszHkliMsZd2hsyrDvHOw4AbYWa+ijQ66LzbjqWjM= 74 | github.com/anacrolix/multiless v0.4.0/go.mod h1:zJv1JF9AqdZiHwxqPgjuOZDGWER6nyE48WBCi/OOrMM= 75 | github.com/anacrolix/stm v0.2.0/go.mod h1:zoVQRvSiGjGoTmbM0vSLIiaKjWtNPeTvXUSdJQA4hsg= 76 | github.com/anacrolix/stm v0.5.0 h1:9df1KBpttF0TzLgDq51Z+TEabZKMythqgx89f1FQJt8= 77 | github.com/anacrolix/stm v0.5.0/go.mod h1:MOwrSy+jCm8Y7HYfMAwPj7qWVu7XoVvjOiYwJmpeB/M= 78 | github.com/anacrolix/sync v0.0.0-20180808010631-44578de4e778/go.mod h1:s735Etp3joe/voe2sdaXLcqDdJSay1O0OPnM0ystjqk= 79 | github.com/anacrolix/sync v0.3.0/go.mod h1:BbecHL6jDSExojhNtgTFSBcdGerzNc64tz3DCOj/I0g= 80 | github.com/anacrolix/sync v0.5.3 h1:iyMUiRRzTnD15+YQYxmDoobGdIbmUxdD4TNO67aCMYI= 81 | github.com/anacrolix/sync v0.5.3/go.mod h1:S51SPBetDsINK/KSNJtZkfM78s5rMeiO11/GNK6Rmh4= 82 | github.com/anacrolix/tagflag v0.0.0-20180109131632-2146c8d41bf0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= 83 | github.com/anacrolix/tagflag v1.0.0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= 84 | github.com/anacrolix/tagflag v1.1.0/go.mod h1:Scxs9CV10NQatSmbyjqmqmeQNwGzlNe0CMUMIxqHIG8= 85 | github.com/anacrolix/torrent v1.58.1 h1:6FP+KH57b1gyT2CpVL9fEqf9MGJEgh3xw1VA8rI0pW8= 86 | github.com/anacrolix/torrent v1.58.1/go.mod h1:/7ZdLuHNKgtCE1gjYJCfbtG9JodBcDaF5ip5EUWRtk8= 87 | github.com/anacrolix/upnp v0.1.4 h1:+2t2KA6QOhm/49zeNyeVwDu1ZYS9dB9wfxyVvh/wk7U= 88 | github.com/anacrolix/upnp v0.1.4/go.mod h1:Qyhbqo69gwNWvEk1xNTXsS5j7hMHef9hdr984+9fIic= 89 | github.com/anacrolix/utp v0.2.0 h1:65Cdmr6q9WSw2KsM+rtJFu7rqDzLl2bdysf4KlNPcFI= 90 | github.com/anacrolix/utp v0.2.0/go.mod h1:HGk4GYQw1O/3T1+yhqT/F6EcBd+AAwlo9dYErNy7mj8= 91 | github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= 92 | github.com/aws/aws-sdk-go v1.55.6 h1:cSg4pvZ3m8dgYcgqB97MrcdjUmZ1BeMYKUxMMB89IPk= 93 | github.com/aws/aws-sdk-go v1.55.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= 94 | github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= 95 | github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= 96 | github.com/bakins/logrus-middleware v0.0.0-20180426214643-ce4c6f8deb07 h1:YyWvJqruuX4aBN812F9ex3WXuxdqruVNd5rvww8U9ko= 97 | github.com/bakins/logrus-middleware v0.0.0-20180426214643-ce4c6f8deb07/go.mod h1:Z+aq7HgFBRFKVDlBpL/cgrb94A9VgwMSlsFAxAJeK6s= 98 | github.com/bakins/test-helpers v0.0.0-20141028124846-af83df64dc31 h1:tMpES1jlcuk66SuoR/0aTbqyJRjoEBXiSLus2I6U2nE= 99 | github.com/bakins/test-helpers v0.0.0-20141028124846-af83df64dc31/go.mod h1:n83oXInLUo8eNCsZvzTabbGchRyswaA3DaAghIQ0VSQ= 100 | github.com/benbjohnson/immutable v0.2.0/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= 101 | github.com/benbjohnson/immutable v0.4.3 h1:GYHcksoJ9K6HyAUpGxwZURrbTkXA0Dh4otXGqbhdrjA= 102 | github.com/benbjohnson/immutable v0.4.3/go.mod h1:qJIKKSmdqz1tVzNtst1DZzvaqOU1onk1rc03IeM3Owk= 103 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 104 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 105 | github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= 106 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= 107 | github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= 108 | github.com/bits-and-blooms/bitset v1.21.0 h1:9RlxRbMI5dRNNburKqfDSiz5POfImKgtablyV01WUw0= 109 | github.com/bits-and-blooms/bitset v1.21.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= 110 | github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCkcs2uw7w4= 111 | github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= 112 | github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= 113 | github.com/bradfitz/iter v0.0.0-20190303215204-33e6a9893b0c/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= 114 | github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 h1:GKTyiRCL6zVf5wWaqKnf+7Qs6GbEPfd4iMOitWzXJx8= 115 | github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8/go.mod h1:spo1JLcs67NmW1aVLEgtA8Yy1elc+X8y5SRW1sFW4Og= 116 | github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= 117 | github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= 118 | github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= 119 | github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= 120 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 121 | github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= 122 | github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= 123 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 124 | github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= 125 | github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 126 | github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= 127 | github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= 128 | github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 129 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 130 | github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 131 | github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= 132 | github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= 133 | github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 134 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 135 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 136 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 137 | github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= 138 | github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= 139 | github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= 140 | github.com/dustin/go-humanize v0.0.0-20180421182945-02af3965c54e/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= 141 | github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= 142 | github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= 143 | github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= 144 | github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= 145 | github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= 146 | github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= 147 | github.com/edsrzf/mmap-go v1.2.0 h1:hXLYlkbaPzt1SaQk+anYwKSRNhufIDCchSPkUD6dD84= 148 | github.com/edsrzf/mmap-go v1.2.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= 149 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 150 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 151 | github.com/frankban/quicktest v1.9.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= 152 | github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 153 | github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= 154 | github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= 155 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 156 | github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= 157 | github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= 158 | github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= 159 | github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= 160 | github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= 161 | github.com/glycerine/go-unsnap-stream v0.0.0-20190901134440-81cf024a9e0a/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= 162 | github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= 163 | github.com/glycerine/goconvey v0.0.0-20190315024820-982ee783a72e/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= 164 | github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= 165 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 166 | github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 167 | github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= 168 | github.com/go-llsqlite/adapter v0.2.0 h1:6k4dmTSTg1eKIeH+2kBWaoohn9SFNZeg4LWayZweevI= 169 | github.com/go-llsqlite/adapter v0.2.0/go.mod h1:tcIEbwjdknnizwMsq9ogjMW6246aIjk97cRywjkbqZ0= 170 | github.com/go-llsqlite/crawshaw v0.5.5 h1:sXnRkiV26MBv++lbPbzp+ZzFcTqzVMxftO8yHyFvwUA= 171 | github.com/go-llsqlite/crawshaw v0.5.5/go.mod h1:/YJdV7uBQaYDE0fwe4z3wwJIZBJxdYzd38ICggWqtaE= 172 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= 173 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= 174 | github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= 175 | github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= 176 | github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= 177 | github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 178 | github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= 179 | github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= 180 | github.com/go-pg/migrations/v8 v8.1.0 h1:bc1wQwFoWRKvLdluXCRFRkeaw9xDU4qJ63uCAagh66w= 181 | github.com/go-pg/migrations/v8 v8.1.0/go.mod h1:o+CN1u572XHphEHZyK6tqyg2GDkRvL2bIoLNyGIewus= 182 | github.com/go-pg/pg/v10 v10.4.0/go.mod h1:BfgPoQnD2wXNd986RYEHzikqv9iE875PrFaZ9vXvtNM= 183 | github.com/go-pg/pg/v10 v10.14.0 h1:giXuPsJaWjzwzFJTxy39eBgGE44jpqH1jwv0uI3kBUU= 184 | github.com/go-pg/pg/v10 v10.14.0/go.mod h1:6kizZh54FveJxw9XZdNg07x7DDBWNsQrSiJS04MLwO8= 185 | github.com/go-pg/zerochecker v0.2.0 h1:pp7f72c3DobMWOb2ErtZsnrPaSvHd2W4o9//8HtF4mU= 186 | github.com/go-pg/zerochecker v0.2.0/go.mod h1:NJZ4wKL0NmTtz0GKCoJ8kym6Xn/EQzXRl2OnAe7MmDo= 187 | github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= 188 | github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= 189 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 190 | github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= 191 | github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= 192 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 193 | github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 194 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 195 | github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 196 | github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 197 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 198 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 199 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 200 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 201 | github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 202 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 203 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 204 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 205 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 206 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 207 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 208 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 209 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 210 | github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= 211 | github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 212 | github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 213 | github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 214 | github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 215 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 216 | github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= 217 | github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= 218 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 219 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 220 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 221 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 222 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 223 | github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 224 | github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 225 | github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 226 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 227 | github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 228 | github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= 229 | github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= 230 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 231 | github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= 232 | github.com/google/pprof v0.0.0-20250302191652-9094ed2288e7 h1:+J3r2e8+RsmN3vKfo75g0YSY61ms37qzPglu4p0sGro= 233 | github.com/google/pprof v0.0.0-20250302191652-9094ed2288e7/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= 234 | github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= 235 | github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 236 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= 237 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 238 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 239 | github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 240 | github.com/gopherjs/gopherjs v0.0.0-20190309154008-847fc94819f9/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 241 | github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 242 | github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= 243 | github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= 244 | github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= 245 | github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 246 | github.com/gosuri/uilive v0.0.4 h1:hUEBpQDj8D8jXgtCdBu7sWsy5sbW/5GhuO8KBwJ2jyY= 247 | github.com/gosuri/uilive v0.0.4/go.mod h1:V/epo5LjjlDE5RJUcqx8dbw+zc93y5Ya3yg8tfZ74VI= 248 | github.com/gosuri/uiprogress v0.0.1 h1:0kpv/XY/qTmFWl/SkaJykZXrBBzwwadmW8fRb7RJSxw= 249 | github.com/gosuri/uiprogress v0.0.1/go.mod h1:C1RTYn4Sc7iEyf6j8ft5dyoZ4212h8G1ol9QQluh5+0= 250 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 251 | github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= 252 | github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= 253 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 254 | github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= 255 | github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= 256 | github.com/huandu/xstrings v1.3.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= 257 | github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= 258 | github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= 259 | github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= 260 | github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= 261 | github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= 262 | github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= 263 | github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= 264 | github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= 265 | github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= 266 | github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= 267 | github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= 268 | github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= 269 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 270 | github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 271 | github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 272 | github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 273 | github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 274 | github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 275 | github.com/juju/ratelimit v1.0.2 h1:sRxmtRiajbvrcLQT7S+JbqU0ntsb9W2yhSdNN8tWfaI= 276 | github.com/juju/ratelimit v1.0.2/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= 277 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 278 | github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= 279 | github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= 280 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 281 | github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= 282 | github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= 283 | github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= 284 | github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= 285 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 286 | github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 287 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 288 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 289 | github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 290 | github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= 291 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 292 | github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 293 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 294 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 295 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 296 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 297 | github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= 298 | github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= 299 | github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= 300 | github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= 301 | github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= 302 | github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= 303 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 304 | github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= 305 | github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= 306 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 307 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 308 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 309 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 310 | github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= 311 | github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= 312 | github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= 313 | github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= 314 | github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= 315 | github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= 316 | github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= 317 | github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= 318 | github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= 319 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= 320 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= 321 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 322 | github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 323 | github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= 324 | github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= 325 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 326 | github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= 327 | github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= 328 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 329 | github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 330 | github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= 331 | github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= 332 | github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= 333 | github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= 334 | github.com/onsi/ginkgo/v2 v2.22.2 h1:/3X8Panh8/WwhU/3Ssa6rCKqPLuAkVY2I0RoyDLySlU= 335 | github.com/onsi/ginkgo/v2 v2.22.2/go.mod h1:oeMosUL+8LtarXBHu/c0bx2D/K9zyQ6uX3cTyztHwsk= 336 | github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus= 337 | github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= 338 | github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= 339 | github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= 340 | github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= 341 | github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= 342 | github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= 343 | github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y= 344 | github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= 345 | github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= 346 | github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= 347 | github.com/pion/datachannel v1.5.10 h1:ly0Q26K1i6ZkGf42W7D4hQYR90pZwzFOjTq5AuCKk4o= 348 | github.com/pion/datachannel v1.5.10/go.mod h1:p/jJfC9arb29W7WrxyKbepTU20CFgyx5oLo8Rs4Py/M= 349 | github.com/pion/dtls/v3 v3.0.4 h1:44CZekewMzfrn9pmGrj5BNnTMDCFwr+6sLH+cCuLM7U= 350 | github.com/pion/dtls/v3 v3.0.4/go.mod h1:R373CsjxWqNPf6MEkfdy3aSe9niZvL/JaKlGeFphtMg= 351 | github.com/pion/dtls/v3 v3.0.6 h1:7Hkd8WhAJNbRgq9RgdNh1aaWlZlGpYTzdqjy9x9sK2E= 352 | github.com/pion/dtls/v3 v3.0.6/go.mod h1:iJxNQ3Uhn1NZWOMWlLxEEHAN5yX7GyPvvKw04v9bzYU= 353 | github.com/pion/ice/v4 v4.0.7 h1:mnwuT3n3RE/9va41/9QJqN5+Bhc0H/x/ZyiVlWMw35M= 354 | github.com/pion/ice/v4 v4.0.7/go.mod h1:y3M18aPhIxLlcO/4dn9X8LzLLSma84cx6emMSu14FGw= 355 | github.com/pion/ice/v4 v4.0.10 h1:P59w1iauC/wPk9PdY8Vjl4fOFL5B+USq1+xbDcN6gT4= 356 | github.com/pion/ice/v4 v4.0.10/go.mod h1:y3M18aPhIxLlcO/4dn9X8LzLLSma84cx6emMSu14FGw= 357 | github.com/pion/interceptor v0.1.37 h1:aRA8Zpab/wE7/c0O3fh1PqY0AJI3fCSEM5lRWJVorwI= 358 | github.com/pion/interceptor v0.1.37/go.mod h1:JzxbJ4umVTlZAf+/utHzNesY8tmRkM2lVmkS82TTj8Y= 359 | github.com/pion/logging v0.2.3 h1:gHuf0zpoh1GW67Nr6Gj4cv5Z9ZscU7g/EaoC/Ke/igI= 360 | github.com/pion/logging v0.2.3/go.mod h1:z8YfknkquMe1csOrxK5kc+5/ZPAzMxbKLX5aXpbpC90= 361 | github.com/pion/mdns/v2 v2.0.7 h1:c9kM8ewCgjslaAmicYMFQIde2H9/lrZpjBkN8VwoVtM= 362 | github.com/pion/mdns/v2 v2.0.7/go.mod h1:vAdSYNAT0Jy3Ru0zl2YiW3Rm/fJCwIeM0nToenfOJKA= 363 | github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= 364 | github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= 365 | github.com/pion/rtcp v1.2.15 h1:LZQi2JbdipLOj4eBjK4wlVoQWfrZbh3Q6eHtWtJBZBo= 366 | github.com/pion/rtcp v1.2.15/go.mod h1:jlGuAjHMEXwMUHK78RgX0UmEJFV4zUKOFHR7OP+D3D0= 367 | github.com/pion/rtp v1.8.12 h1:nsKs8Wi0jQyBFHU3qmn/OvtZrhktVfJY0vRxwACsL5U= 368 | github.com/pion/rtp v1.8.12/go.mod h1:8uMBJj32Pa1wwx8Fuv/AsFhn8jsgw+3rUC2PfoBZ8p4= 369 | github.com/pion/rtp v1.8.13 h1:8uSUPpjSL4OlwZI8Ygqu7+h2p9NPFB+yAZ461Xn5sNg= 370 | github.com/pion/rtp v1.8.13/go.mod h1:8uMBJj32Pa1wwx8Fuv/AsFhn8jsgw+3rUC2PfoBZ8p4= 371 | github.com/pion/sctp v1.8.37 h1:ZDmGPtRPX9mKCiVXtMbTWybFw3z/hVKAZgU81wcOrqs= 372 | github.com/pion/sctp v1.8.37/go.mod h1:cNiLdchXra8fHQwmIoqw0MbLLMs+f7uQ+dGMG2gWebE= 373 | github.com/pion/sctp v1.8.38 h1:rntHxO7CyH8jeqC/bkuirl2uJ+BqTp2uxhisi5AYPRQ= 374 | github.com/pion/sctp v1.8.38/go.mod h1:cNiLdchXra8fHQwmIoqw0MbLLMs+f7uQ+dGMG2gWebE= 375 | github.com/pion/sdp/v3 v3.0.10 h1:6MChLE/1xYB+CjumMw+gZ9ufp2DPApuVSnDT8t5MIgA= 376 | github.com/pion/sdp/v3 v3.0.10/go.mod h1:88GMahN5xnScv1hIMTqLdu/cOcUkj6a9ytbncwMCq2E= 377 | github.com/pion/sdp/v3 v3.0.11 h1:VhgVSopdsBKwhCFoyyPmT1fKMeV9nLMrEKxNOdy3IVI= 378 | github.com/pion/sdp/v3 v3.0.11/go.mod h1:88GMahN5xnScv1hIMTqLdu/cOcUkj6a9ytbncwMCq2E= 379 | github.com/pion/srtp/v3 v3.0.4 h1:2Z6vDVxzrX3UHEgrUyIGM4rRouoC7v+NiF1IHtp9B5M= 380 | github.com/pion/srtp/v3 v3.0.4/go.mod h1:1Jx3FwDoxpRaTh1oRV8A/6G1BnFL+QI82eK4ms8EEJQ= 381 | github.com/pion/stun/v3 v3.0.0 h1:4h1gwhWLWuZWOJIJR9s2ferRO+W3zA/b6ijOI6mKzUw= 382 | github.com/pion/stun/v3 v3.0.0/go.mod h1:HvCN8txt8mwi4FBvS3EmDghW6aQJ24T+y+1TKjB5jyU= 383 | github.com/pion/transport/v3 v3.0.7 h1:iRbMH05BzSNwhILHoBoAPxoB9xQgOaJk+591KC9P1o0= 384 | github.com/pion/transport/v3 v3.0.7/go.mod h1:YleKiTZ4vqNxVwh77Z0zytYi7rXHl7j6uPLGhhz9rwo= 385 | github.com/pion/turn/v4 v4.0.0 h1:qxplo3Rxa9Yg1xXDxxH8xaqcyGUtbHYw4QSCvmFWvhM= 386 | github.com/pion/turn/v4 v4.0.0/go.mod h1:MuPDkm15nYSklKpN8vWJ9W2M0PlyQZqYt1McGuxG7mA= 387 | github.com/pion/turn/v4 v4.0.1 h1:01UTBhYToe8PDC8piB++i66q1mmctfhhoeguaFqB84c= 388 | github.com/pion/turn/v4 v4.0.1/go.mod h1:pMMKP/ieNAG/fN5cZiN4SDuyKsXtNTr0ccN7IToA1zs= 389 | github.com/pion/webrtc/v4 v4.0.13 h1:XuUaWTjRufsiGJRC+G71OgiSMe7tl7mQ0kkd4bAqIaQ= 390 | github.com/pion/webrtc/v4 v4.0.13/go.mod h1:Fadzxm0CbY99YdCEfxrgiVr0L4jN1l8bf8DBkPPpJbs= 391 | github.com/pion/webrtc/v4 v4.0.15 h1:DWuBtTHBa9rQNqyhW+jptkq6r3zdGqr1OQ4pa2Q+Ey4= 392 | github.com/pion/webrtc/v4 v4.0.15/go.mod h1:RXf6sJ8FUX+qwF4+AwB+A3c2Y6WpuATRTe4L/fTWNa4= 393 | github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= 394 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 395 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 396 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 397 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 398 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 399 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 400 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 401 | github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= 402 | github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= 403 | github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= 404 | github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= 405 | github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= 406 | github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk= 407 | github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= 408 | github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= 409 | github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= 410 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 411 | github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 412 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 413 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 414 | github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 415 | github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= 416 | github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= 417 | github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= 418 | github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= 419 | github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 420 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 421 | github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= 422 | github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= 423 | github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= 424 | github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= 425 | github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= 426 | github.com/prometheus/common v0.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k= 427 | github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18= 428 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 429 | github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 430 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 431 | github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= 432 | github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= 433 | github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= 434 | github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 435 | github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= 436 | github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= 437 | github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= 438 | github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= 439 | github.com/protolambda/ctxlock v0.1.0 h1:rCUY3+vRdcdZXqT07iXgyr744J2DU2LCBIXowYAjBCE= 440 | github.com/protolambda/ctxlock v0.1.0/go.mod h1:vefhX6rIZH8rsg5ZpOJfEDYQOppZi19SfPiGOFrNnwM= 441 | github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= 442 | github.com/redis/go-redis/v9 v9.7.1 h1:4LhKRCIduqXqtvCUlaq9c8bdHOkICjDMrr1+Zb3osAc= 443 | github.com/redis/go-redis/v9 v9.7.1/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw= 444 | github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= 445 | github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= 446 | github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= 447 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= 448 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= 449 | github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= 450 | github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= 451 | github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= 452 | github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= 453 | github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= 454 | github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 h1:18kd+8ZUlt/ARXhljq+14TwAoKa61q6dX8jtwOf6DH8= 455 | github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529/go.mod h1:qe5TWALJ8/a1Lqznoc5BDHpYX/8HU60Hm2AwRmqzxqA= 456 | github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= 457 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 458 | github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 h1:GHRpF1pTW19a8tTFrMLUcfWwyC0pnifVo2ClaLq+hP8= 459 | github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8= 460 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 461 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= 462 | github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= 463 | github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= 464 | github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 465 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 466 | github.com/smartystreets/assertions v0.0.0-20190215210624-980c5ac6f3ac/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 467 | github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= 468 | github.com/smartystreets/goconvey v0.0.0-20190306220146-200a235640ff/go.mod h1:KSQcGKpxUMHk3nbYzs/tIBAM2iDooCn0BmttHOJEbLs= 469 | github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 470 | github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= 471 | github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 472 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 473 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 474 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 475 | github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= 476 | github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 477 | github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 478 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 479 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 480 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 481 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 482 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 483 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 484 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 485 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 486 | github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 487 | github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= 488 | github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 489 | github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= 490 | github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 491 | github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= 492 | github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= 493 | github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= 494 | github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= 495 | github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= 496 | github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= 497 | github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= 498 | github.com/urfave/cli v1.22.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ= 499 | github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po= 500 | github.com/vmihailenco/bufpool v0.1.11 h1:gOq2WmBrq0i2yW5QJ16ykccQ4wH9UyEsgLm6czKAd94= 501 | github.com/vmihailenco/bufpool v0.1.11/go.mod h1:AFf/MOy3l2CFTKbxwt0mp2MwnqjNEs5H/UxrkA5jxTQ= 502 | github.com/vmihailenco/msgpack/v4 v4.3.11/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= 503 | github.com/vmihailenco/msgpack/v5 v5.0.0-beta.1/go.mod h1:xlngVLeyQ/Qi05oQxhQ+oTuqa03RjMwMfk/7/TCs+QI= 504 | github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= 505 | github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= 506 | github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= 507 | github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= 508 | github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= 509 | github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= 510 | github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= 511 | github.com/webtor-io/common-services v0.0.0-20250112153432-554128b56bd5 h1:EGVq16o1t8LO2HR2eGh4YEJjLF9Np2bBgJxHkUr+fb4= 512 | github.com/webtor-io/common-services v0.0.0-20250112153432-554128b56bd5/go.mod h1:6jUeO6R+ytZnEJj7PlcLEQZfWaxw8ovav73BP83MTlI= 513 | github.com/webtor-io/lazymap v0.0.0-20241211155941-e81d935cfa1d h1:Xi9E0LCDgK++QliA7ZNFdSI11Bpg5qe7efN3AMWJ3dY= 514 | github.com/webtor-io/lazymap v0.0.0-20241211155941-e81d935cfa1d/go.mod h1:kioEFK4hk8YfHrhg47tGvMG40xawOJM4gcfRQ4EeX4k= 515 | github.com/webtor-io/lazymap v0.0.0-20250308124910-3a61e0f78108 h1:4rJXuBJFmr4ePOQIIBDOkAzQrjFoMpWns8g1zD95ugM= 516 | github.com/webtor-io/lazymap v0.0.0-20250308124910-3a61e0f78108/go.mod h1:kioEFK4hk8YfHrhg47tGvMG40xawOJM4gcfRQ4EeX4k= 517 | github.com/webtor-io/torrent-store v1.0.0 h1:UiDRZ2H6MrlpLkL/nfDzeelUFuS/Snj2E6QwKazTrOk= 518 | github.com/webtor-io/torrent-store v1.0.0/go.mod h1:88tKPA84dac59ZhzlvTjrt2nRLq4tGHYAxfUicDnkso= 519 | github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= 520 | github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= 521 | github.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU= 522 | github.com/wlynxg/anet v0.0.5/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= 523 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 524 | github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 525 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 526 | go.etcd.io/bbolt v1.4.0 h1:TU77id3TnN/zKr7CO/uk+fBCwF2jGcMuw2B/FMAzYIk= 527 | go.etcd.io/bbolt v1.4.0/go.mod h1:AsD+OCi/qPN1giOX1aiLAha3o1U8rAz65bvN4j0sRuk= 528 | go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= 529 | go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= 530 | go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 531 | go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= 532 | go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= 533 | go.opentelemetry.io/otel v0.13.0/go.mod h1:dlSNewoRYikTkotEnxdmuBHgzT+k/idJSfDv/FxEnOY= 534 | go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= 535 | go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= 536 | go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= 537 | go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= 538 | go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= 539 | go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= 540 | go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= 541 | go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= 542 | go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= 543 | go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= 544 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 545 | golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 546 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 547 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 548 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 549 | golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 550 | golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 551 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 552 | golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= 553 | golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= 554 | golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= 555 | golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= 556 | golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= 557 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 558 | golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= 559 | golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw= 560 | golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM= 561 | golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= 562 | golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= 563 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 564 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 565 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 566 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 567 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 568 | golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= 569 | golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= 570 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 571 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 572 | golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= 573 | golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= 574 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 575 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 576 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 577 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 578 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 579 | golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 580 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 581 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 582 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 583 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 584 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 585 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 586 | golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 587 | golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 588 | golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 589 | golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 590 | golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 591 | golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 592 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 593 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 594 | golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 595 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 596 | golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= 597 | golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= 598 | golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= 599 | golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c= 600 | golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= 601 | golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= 602 | golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= 603 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 604 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 605 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 606 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 607 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 608 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 609 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 610 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 611 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 612 | golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 613 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 614 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 615 | golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 616 | golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= 617 | golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= 618 | golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= 619 | golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= 620 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 621 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 622 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 623 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 624 | golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 625 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 626 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 627 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 628 | golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 629 | golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 630 | golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 631 | golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 632 | golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 633 | golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 634 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 635 | golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 636 | golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 637 | golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 638 | golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 639 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 640 | golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 641 | golang.org/x/sys v0.0.0-20201017003518-b09fb700fbb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 642 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 643 | golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 644 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 645 | golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 646 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 647 | golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 648 | golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 649 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 650 | golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 651 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 652 | golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 653 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 654 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 655 | golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 656 | golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 657 | golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= 658 | golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= 659 | golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= 660 | golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= 661 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 662 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 663 | golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 664 | golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= 665 | golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= 666 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 667 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 668 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 669 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 670 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 671 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 672 | golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= 673 | golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 674 | golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= 675 | golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= 676 | golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= 677 | golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= 678 | golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= 679 | golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= 680 | golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 681 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 682 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 683 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 684 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 685 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 686 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 687 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 688 | golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 689 | golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= 690 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 691 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 692 | golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= 693 | golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= 694 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 695 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 696 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 697 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 698 | google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= 699 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 700 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 701 | google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 702 | google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 703 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 704 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 705 | google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 706 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 707 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 708 | google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= 709 | google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= 710 | google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e h1:ztQaXfzEXTmCBvbtWYRhJxW+0iJcz2qXfd38/e9l7bA= 711 | google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= 712 | google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= 713 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 714 | google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= 715 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 716 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 717 | google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg= 718 | google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= 719 | google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM= 720 | google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= 721 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 722 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 723 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 724 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 725 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 726 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 727 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 728 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 729 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 730 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 731 | google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= 732 | google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= 733 | google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= 734 | google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= 735 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 736 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 737 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 738 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 739 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 740 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= 741 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 742 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 743 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 744 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= 745 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 746 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 747 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 748 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 749 | gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 750 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 751 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 752 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 753 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 754 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 755 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 756 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 757 | honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 758 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 759 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 760 | lukechampine.com/blake3 v1.4.0 h1:xDbKOZCVbnZsfzM6mHSYcGRHZ3YrLDzqz8XnV4uaD5w= 761 | lukechampine.com/blake3 v1.4.0/go.mod h1:MQJNQCTnR+kwOP/JEZSxj3MaQjp80FOFSNMMHXcSeX0= 762 | lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= 763 | lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= 764 | mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ= 765 | mellium.im/sasl v0.3.2 h1:PT6Xp7ccn9XaXAnJ03FcEjmAn7kK1x7aoXV6F+Vmrl0= 766 | mellium.im/sasl v0.3.2/go.mod h1:NKXDi1zkr+BlMHLQjY3ofYuU4KSPFxknb8mfEu6SveY= 767 | modernc.org/cc/v3 v3.37.0/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= 768 | modernc.org/cc/v3 v3.38.1/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= 769 | modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= 770 | modernc.org/cc/v4 v4.24.4 h1:TFkx1s6dCkQpd6dKurBNmpo+G8Zl4Sq/ztJ+2+DEsh0= 771 | modernc.org/cc/v4 v4.24.4/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= 772 | modernc.org/cc/v4 v4.26.0 h1:QMYvbVduUGH0rrO+5mqF/PSPPRZNpRtg2CLELy7vUpA= 773 | modernc.org/ccgo/v3 v3.0.0-20220904174949-82d86e1b6d56/go.mod h1:YSXjPL62P2AMSxBphRHPn7IkzhVHqkvOnRKAKh+W6ZI= 774 | modernc.org/ccgo/v3 v3.0.0-20220910160915-348f15de615a/go.mod h1:8p47QxPkdugex9J4n9P2tLZ9bK01yngIVp00g4nomW0= 775 | modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8/go.mod h1:fUB3Vn0nVPReA+7IG7yZDfjv1TMWjhQP8gCxrFAtL5g= 776 | modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= 777 | modernc.org/ccgo/v4 v4.23.16 h1:Z2N+kk38b7SfySC1ZkpGLN2vthNJP1+ZzGZIlH7uBxo= 778 | modernc.org/ccgo/v4 v4.23.16/go.mod h1:nNma8goMTY7aQZQNTyN9AIoJfxav4nvTnvKThAeMDdo= 779 | modernc.org/ccgo/v4 v4.26.0 h1:gVzXaDzGeBYJ2uXTOpR8FR7OlksDOe9jxnjhIKCsiTc= 780 | modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= 781 | modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE= 782 | modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ= 783 | modernc.org/gc/v2 v2.6.3 h1:aJVhcqAte49LF+mGveZ5KPlsp4tdGdAOT4sipJXADjw= 784 | modernc.org/gc/v2 v2.6.3/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= 785 | modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= 786 | modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= 787 | modernc.org/libc v1.17.4/go.mod h1:WNg2ZH56rDEwdropAJeZPQkXmDwh+JCA1s/htl6r2fA= 788 | modernc.org/libc v1.18.0/go.mod h1:vj6zehR5bfc98ipowQOM2nIDUZnVew/wNC/2tOGS+q0= 789 | modernc.org/libc v1.19.0/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= 790 | modernc.org/libc v1.20.3/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= 791 | modernc.org/libc v1.21.4/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI= 792 | modernc.org/libc v1.21.5/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI= 793 | modernc.org/libc v1.61.13 h1:3LRd6ZO1ezsFiX1y+bHd1ipyEHIJKvuprv0sLTBwLW8= 794 | modernc.org/libc v1.61.13/go.mod h1:8F/uJWL/3nNil0Lgt1Dpz+GgkApWh04N3el3hxJcA6E= 795 | modernc.org/libc v1.63.0 h1:wKzb61wOGCzgahQBORb1b0dZonh8Ufzl/7r4Yf1D5YA= 796 | modernc.org/libc v1.63.0/go.mod h1:wDzH1mgz1wUIEwottFt++POjGRO9sgyQKrpXaz3x89E= 797 | modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= 798 | modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= 799 | modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= 800 | modernc.org/memory v1.3.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= 801 | modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= 802 | modernc.org/memory v1.8.2 h1:cL9L4bcoAObu4NkxOlKWBWtNHIsnnACGF/TbqQ6sbcI= 803 | modernc.org/memory v1.8.2/go.mod h1:ZbjSvMO5NQ1A2i3bWeDiVMxIorXwdClKE/0SZ+BMotU= 804 | modernc.org/memory v1.10.0 h1:fzumd51yQ1DxcOxSO+S6X7+QTuVU+n8/Aj7swYjFfC4= 805 | modernc.org/memory v1.10.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= 806 | modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= 807 | modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= 808 | modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8= 809 | modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= 810 | modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= 811 | modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= 812 | modernc.org/sqlite v1.20.0/go.mod h1:EsYz8rfOvLCiYTy5ZFsOYzoCcRMu98YYkwAcCw5YIYw= 813 | modernc.org/sqlite v1.36.0 h1:EQXNRn4nIS+gfsKeUTymHIz1waxuv5BzU7558dHSfH8= 814 | modernc.org/sqlite v1.36.0/go.mod h1:7MPwH7Z6bREicF9ZVUR78P1IKuxfZ8mRIDHD0iD+8TU= 815 | modernc.org/sqlite v1.37.0 h1:s1TMe7T3Q3ovQiK2Ouz4Jwh7dw4ZDqbebSDTlSJdfjI= 816 | modernc.org/sqlite v1.37.0/go.mod h1:5YiWv+YviqGMuGw4V+PNplcyaJ5v+vQd7TQOgkACoJM= 817 | modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= 818 | modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= 819 | modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= 820 | modernc.org/tcl v1.15.0/go.mod h1:xRoGotBZ6dU+Zo2tca+2EqVEeMmOUBzHnhIwq4YrVnE= 821 | modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= 822 | modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= 823 | modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= 824 | modernc.org/z v1.7.0/go.mod h1:hVdgNMh8ggTuRG1rGU8x+xGRFfiQUIAw0ZqlPy8+HyQ= 825 | zombiezen.com/go/sqlite v0.12.0/go.mod h1:RKdRR9xoQDSnB47yy7G4PtrjGZJtupb/SyEbJZLaRes= 826 | zombiezen.com/go/sqlite v1.4.0 h1:N1s3RIljwtp4541Y8rM880qgGIgq3fTD2yks1xftnKU= 827 | zombiezen.com/go/sqlite v1.4.0/go.mod h1:0w9F1DN9IZj9AcLS9YDKMboubCACkwYCGkzoy3eG5ik= 828 | -------------------------------------------------------------------------------- /proto/torrent-web-seeder.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // versions: 3 | // protoc-gen-go v1.35.1 4 | // protoc v5.28.3 5 | // source: proto/torrent-web-seeder.proto 6 | 7 | package __ 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 | reflect "reflect" 13 | sync "sync" 14 | ) 15 | 16 | const ( 17 | // Verify that this generated code is sufficiently up-to-date. 18 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 | // Verify that runtime/protoimpl is sufficiently up-to-date. 20 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 | ) 22 | 23 | type StatReply_Status int32 24 | 25 | const ( 26 | StatReply_INITIALIZATION StatReply_Status = 0 27 | StatReply_SEEDING StatReply_Status = 1 28 | StatReply_IDLE StatReply_Status = 2 29 | StatReply_TERMINATED StatReply_Status = 3 30 | StatReply_WAITING_FOR_PEERS StatReply_Status = 4 31 | StatReply_RESTORING StatReply_Status = 5 32 | StatReply_BACKINGUP StatReply_Status = 6 33 | ) 34 | 35 | // Enum value maps for StatReply_Status. 36 | var ( 37 | StatReply_Status_name = map[int32]string{ 38 | 0: "INITIALIZATION", 39 | 1: "SEEDING", 40 | 2: "IDLE", 41 | 3: "TERMINATED", 42 | 4: "WAITING_FOR_PEERS", 43 | 5: "RESTORING", 44 | 6: "BACKINGUP", 45 | } 46 | StatReply_Status_value = map[string]int32{ 47 | "INITIALIZATION": 0, 48 | "SEEDING": 1, 49 | "IDLE": 2, 50 | "TERMINATED": 3, 51 | "WAITING_FOR_PEERS": 4, 52 | "RESTORING": 5, 53 | "BACKINGUP": 6, 54 | } 55 | ) 56 | 57 | func (x StatReply_Status) Enum() *StatReply_Status { 58 | p := new(StatReply_Status) 59 | *p = x 60 | return p 61 | } 62 | 63 | func (x StatReply_Status) String() string { 64 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 65 | } 66 | 67 | func (StatReply_Status) Descriptor() protoreflect.EnumDescriptor { 68 | return file_proto_torrent_web_seeder_proto_enumTypes[0].Descriptor() 69 | } 70 | 71 | func (StatReply_Status) Type() protoreflect.EnumType { 72 | return &file_proto_torrent_web_seeder_proto_enumTypes[0] 73 | } 74 | 75 | func (x StatReply_Status) Number() protoreflect.EnumNumber { 76 | return protoreflect.EnumNumber(x) 77 | } 78 | 79 | // Deprecated: Use StatReply_Status.Descriptor instead. 80 | func (StatReply_Status) EnumDescriptor() ([]byte, []int) { 81 | return file_proto_torrent_web_seeder_proto_rawDescGZIP(), []int{1, 0} 82 | } 83 | 84 | type Piece_Priority int32 85 | 86 | const ( 87 | Piece_NONE Piece_Priority = 0 88 | Piece_NORMAL Piece_Priority = 1 89 | Piece_HIGH Piece_Priority = 2 90 | Piece_READAHEAD Piece_Priority = 3 91 | Piece_NEXT Piece_Priority = 4 92 | Piece_NOW Piece_Priority = 5 93 | ) 94 | 95 | // Enum value maps for Piece_Priority. 96 | var ( 97 | Piece_Priority_name = map[int32]string{ 98 | 0: "NONE", 99 | 1: "NORMAL", 100 | 2: "HIGH", 101 | 3: "READAHEAD", 102 | 4: "NEXT", 103 | 5: "NOW", 104 | } 105 | Piece_Priority_value = map[string]int32{ 106 | "NONE": 0, 107 | "NORMAL": 1, 108 | "HIGH": 2, 109 | "READAHEAD": 3, 110 | "NEXT": 4, 111 | "NOW": 5, 112 | } 113 | ) 114 | 115 | func (x Piece_Priority) Enum() *Piece_Priority { 116 | p := new(Piece_Priority) 117 | *p = x 118 | return p 119 | } 120 | 121 | func (x Piece_Priority) String() string { 122 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 123 | } 124 | 125 | func (Piece_Priority) Descriptor() protoreflect.EnumDescriptor { 126 | return file_proto_torrent_web_seeder_proto_enumTypes[1].Descriptor() 127 | } 128 | 129 | func (Piece_Priority) Type() protoreflect.EnumType { 130 | return &file_proto_torrent_web_seeder_proto_enumTypes[1] 131 | } 132 | 133 | func (x Piece_Priority) Number() protoreflect.EnumNumber { 134 | return protoreflect.EnumNumber(x) 135 | } 136 | 137 | // Deprecated: Use Piece_Priority.Descriptor instead. 138 | func (Piece_Priority) EnumDescriptor() ([]byte, []int) { 139 | return file_proto_torrent_web_seeder_proto_rawDescGZIP(), []int{2, 0} 140 | } 141 | 142 | // Stat request message 143 | type StatRequest struct { 144 | state protoimpl.MessageState 145 | sizeCache protoimpl.SizeCache 146 | unknownFields protoimpl.UnknownFields 147 | 148 | Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"` 149 | } 150 | 151 | func (x *StatRequest) Reset() { 152 | *x = StatRequest{} 153 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[0] 154 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 155 | ms.StoreMessageInfo(mi) 156 | } 157 | 158 | func (x *StatRequest) String() string { 159 | return protoimpl.X.MessageStringOf(x) 160 | } 161 | 162 | func (*StatRequest) ProtoMessage() {} 163 | 164 | func (x *StatRequest) ProtoReflect() protoreflect.Message { 165 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[0] 166 | if x != nil { 167 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 168 | if ms.LoadMessageInfo() == nil { 169 | ms.StoreMessageInfo(mi) 170 | } 171 | return ms 172 | } 173 | return mi.MessageOf(x) 174 | } 175 | 176 | // Deprecated: Use StatRequest.ProtoReflect.Descriptor instead. 177 | func (*StatRequest) Descriptor() ([]byte, []int) { 178 | return file_proto_torrent_web_seeder_proto_rawDescGZIP(), []int{0} 179 | } 180 | 181 | func (x *StatRequest) GetPath() string { 182 | if x != nil { 183 | return x.Path 184 | } 185 | return "" 186 | } 187 | 188 | // Stat response message 189 | type StatReply struct { 190 | state protoimpl.MessageState 191 | sizeCache protoimpl.SizeCache 192 | unknownFields protoimpl.UnknownFields 193 | 194 | Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` 195 | Completed int64 `protobuf:"varint,2,opt,name=completed,proto3" json:"completed"` 196 | Peers int32 `protobuf:"varint,3,opt,name=peers,proto3" json:"peers"` 197 | Status StatReply_Status `protobuf:"varint,4,opt,name=status,proto3,enum=StatReply_Status" json:"status"` 198 | Pieces []*Piece `protobuf:"bytes,5,rep,name=pieces,proto3" json:"pieces"` 199 | Seeders int32 `protobuf:"varint,6,opt,name=seeders,proto3" json:"seeders"` 200 | Leechers int32 `protobuf:"varint,7,opt,name=leechers,proto3" json:"leechers"` 201 | } 202 | 203 | func (x *StatReply) Reset() { 204 | *x = StatReply{} 205 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[1] 206 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 207 | ms.StoreMessageInfo(mi) 208 | } 209 | 210 | func (x *StatReply) String() string { 211 | return protoimpl.X.MessageStringOf(x) 212 | } 213 | 214 | func (*StatReply) ProtoMessage() {} 215 | 216 | func (x *StatReply) ProtoReflect() protoreflect.Message { 217 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[1] 218 | if x != nil { 219 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 220 | if ms.LoadMessageInfo() == nil { 221 | ms.StoreMessageInfo(mi) 222 | } 223 | return ms 224 | } 225 | return mi.MessageOf(x) 226 | } 227 | 228 | // Deprecated: Use StatReply.ProtoReflect.Descriptor instead. 229 | func (*StatReply) Descriptor() ([]byte, []int) { 230 | return file_proto_torrent_web_seeder_proto_rawDescGZIP(), []int{1} 231 | } 232 | 233 | func (x *StatReply) GetTotal() int64 { 234 | if x != nil { 235 | return x.Total 236 | } 237 | return 0 238 | } 239 | 240 | func (x *StatReply) GetCompleted() int64 { 241 | if x != nil { 242 | return x.Completed 243 | } 244 | return 0 245 | } 246 | 247 | func (x *StatReply) GetPeers() int32 { 248 | if x != nil { 249 | return x.Peers 250 | } 251 | return 0 252 | } 253 | 254 | func (x *StatReply) GetStatus() StatReply_Status { 255 | if x != nil { 256 | return x.Status 257 | } 258 | return StatReply_INITIALIZATION 259 | } 260 | 261 | func (x *StatReply) GetPieces() []*Piece { 262 | if x != nil { 263 | return x.Pieces 264 | } 265 | return nil 266 | } 267 | 268 | func (x *StatReply) GetSeeders() int32 { 269 | if x != nil { 270 | return x.Seeders 271 | } 272 | return 0 273 | } 274 | 275 | func (x *StatReply) GetLeechers() int32 { 276 | if x != nil { 277 | return x.Leechers 278 | } 279 | return 0 280 | } 281 | 282 | type Piece struct { 283 | state protoimpl.MessageState 284 | sizeCache protoimpl.SizeCache 285 | unknownFields protoimpl.UnknownFields 286 | 287 | Position int64 `protobuf:"varint,1,opt,name=position,proto3" json:"position"` 288 | Complete bool `protobuf:"varint,2,opt,name=complete,proto3" json:"complete"` 289 | Priority Piece_Priority `protobuf:"varint,3,opt,name=priority,proto3,enum=Piece_Priority" json:"priority"` 290 | } 291 | 292 | func (x *Piece) Reset() { 293 | *x = Piece{} 294 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[2] 295 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 296 | ms.StoreMessageInfo(mi) 297 | } 298 | 299 | func (x *Piece) String() string { 300 | return protoimpl.X.MessageStringOf(x) 301 | } 302 | 303 | func (*Piece) ProtoMessage() {} 304 | 305 | func (x *Piece) ProtoReflect() protoreflect.Message { 306 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[2] 307 | if x != nil { 308 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 309 | if ms.LoadMessageInfo() == nil { 310 | ms.StoreMessageInfo(mi) 311 | } 312 | return ms 313 | } 314 | return mi.MessageOf(x) 315 | } 316 | 317 | // Deprecated: Use Piece.ProtoReflect.Descriptor instead. 318 | func (*Piece) Descriptor() ([]byte, []int) { 319 | return file_proto_torrent_web_seeder_proto_rawDescGZIP(), []int{2} 320 | } 321 | 322 | func (x *Piece) GetPosition() int64 { 323 | if x != nil { 324 | return x.Position 325 | } 326 | return 0 327 | } 328 | 329 | func (x *Piece) GetComplete() bool { 330 | if x != nil { 331 | return x.Complete 332 | } 333 | return false 334 | } 335 | 336 | func (x *Piece) GetPriority() Piece_Priority { 337 | if x != nil { 338 | return x.Priority 339 | } 340 | return Piece_NONE 341 | } 342 | 343 | // Files requst message 344 | type FilesRequest struct { 345 | state protoimpl.MessageState 346 | sizeCache protoimpl.SizeCache 347 | unknownFields protoimpl.UnknownFields 348 | } 349 | 350 | func (x *FilesRequest) Reset() { 351 | *x = FilesRequest{} 352 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[3] 353 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 354 | ms.StoreMessageInfo(mi) 355 | } 356 | 357 | func (x *FilesRequest) String() string { 358 | return protoimpl.X.MessageStringOf(x) 359 | } 360 | 361 | func (*FilesRequest) ProtoMessage() {} 362 | 363 | func (x *FilesRequest) ProtoReflect() protoreflect.Message { 364 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[3] 365 | if x != nil { 366 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 367 | if ms.LoadMessageInfo() == nil { 368 | ms.StoreMessageInfo(mi) 369 | } 370 | return ms 371 | } 372 | return mi.MessageOf(x) 373 | } 374 | 375 | // Deprecated: Use FilesRequest.ProtoReflect.Descriptor instead. 376 | func (*FilesRequest) Descriptor() ([]byte, []int) { 377 | return file_proto_torrent_web_seeder_proto_rawDescGZIP(), []int{3} 378 | } 379 | 380 | type File struct { 381 | state protoimpl.MessageState 382 | sizeCache protoimpl.SizeCache 383 | unknownFields protoimpl.UnknownFields 384 | 385 | Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"` 386 | } 387 | 388 | func (x *File) Reset() { 389 | *x = File{} 390 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[4] 391 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 392 | ms.StoreMessageInfo(mi) 393 | } 394 | 395 | func (x *File) String() string { 396 | return protoimpl.X.MessageStringOf(x) 397 | } 398 | 399 | func (*File) ProtoMessage() {} 400 | 401 | func (x *File) ProtoReflect() protoreflect.Message { 402 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[4] 403 | if x != nil { 404 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 405 | if ms.LoadMessageInfo() == nil { 406 | ms.StoreMessageInfo(mi) 407 | } 408 | return ms 409 | } 410 | return mi.MessageOf(x) 411 | } 412 | 413 | // Deprecated: Use File.ProtoReflect.Descriptor instead. 414 | func (*File) Descriptor() ([]byte, []int) { 415 | return file_proto_torrent_web_seeder_proto_rawDescGZIP(), []int{4} 416 | } 417 | 418 | func (x *File) GetPath() string { 419 | if x != nil { 420 | return x.Path 421 | } 422 | return "" 423 | } 424 | 425 | // Files reply message 426 | type FilesReply struct { 427 | state protoimpl.MessageState 428 | sizeCache protoimpl.SizeCache 429 | unknownFields protoimpl.UnknownFields 430 | 431 | Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files"` 432 | } 433 | 434 | func (x *FilesReply) Reset() { 435 | *x = FilesReply{} 436 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[5] 437 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 438 | ms.StoreMessageInfo(mi) 439 | } 440 | 441 | func (x *FilesReply) String() string { 442 | return protoimpl.X.MessageStringOf(x) 443 | } 444 | 445 | func (*FilesReply) ProtoMessage() {} 446 | 447 | func (x *FilesReply) ProtoReflect() protoreflect.Message { 448 | mi := &file_proto_torrent_web_seeder_proto_msgTypes[5] 449 | if x != nil { 450 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 451 | if ms.LoadMessageInfo() == nil { 452 | ms.StoreMessageInfo(mi) 453 | } 454 | return ms 455 | } 456 | return mi.MessageOf(x) 457 | } 458 | 459 | // Deprecated: Use FilesReply.ProtoReflect.Descriptor instead. 460 | func (*FilesReply) Descriptor() ([]byte, []int) { 461 | return file_proto_torrent_web_seeder_proto_rawDescGZIP(), []int{5} 462 | } 463 | 464 | func (x *FilesReply) GetFiles() []*File { 465 | if x != nil { 466 | return x.Files 467 | } 468 | return nil 469 | } 470 | 471 | var File_proto_torrent_web_seeder_proto protoreflect.FileDescriptor 472 | 473 | var file_proto_torrent_web_seeder_proto_rawDesc = []byte{ 474 | 0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x6f, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 475 | 0x77, 0x65, 0x62, 0x2d, 0x73, 0x65, 0x65, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 476 | 0x22, 0x21, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 477 | 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 478 | 0x61, 0x74, 0x68, 0x22, 0xd0, 0x02, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x70, 0x6c, 479 | 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 480 | 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 481 | 0x65, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 482 | 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x03, 483 | 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x73, 484 | 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x53, 0x74, 485 | 0x61, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 486 | 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 487 | 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x06, 488 | 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x65, 0x64, 0x65, 0x72, 489 | 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x65, 0x65, 0x64, 0x65, 0x72, 0x73, 490 | 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x65, 0x65, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 491 | 0x28, 0x05, 0x52, 0x08, 0x6c, 0x65, 0x65, 0x63, 0x68, 0x65, 0x72, 0x73, 0x22, 0x78, 0x0a, 0x06, 492 | 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 493 | 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 494 | 0x45, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x44, 0x4c, 0x45, 0x10, 495 | 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x45, 0x44, 0x10, 496 | 0x03, 0x12, 0x15, 0x0a, 0x11, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x4f, 0x52, 497 | 0x5f, 0x50, 0x45, 0x45, 0x52, 0x53, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x53, 0x54, 498 | 0x4f, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x41, 0x43, 0x4b, 0x49, 499 | 0x4e, 0x47, 0x55, 0x50, 0x10, 0x06, 0x22, 0xba, 0x01, 0x0a, 0x05, 0x50, 0x69, 0x65, 0x63, 0x65, 500 | 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 501 | 0x28, 0x03, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 502 | 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 503 | 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 504 | 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x50, 0x69, 0x65, 505 | 0x63, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x70, 0x72, 0x69, 506 | 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x4c, 0x0a, 0x08, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 507 | 0x79, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 508 | 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, 509 | 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44, 0x41, 0x48, 0x45, 0x41, 0x44, 0x10, 0x03, 510 | 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x45, 0x58, 0x54, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x4f, 511 | 0x57, 0x10, 0x05, 0x22, 0x0e, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 512 | 0x65, 0x73, 0x74, 0x22, 0x1a, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 513 | 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 514 | 0x29, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 515 | 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x46, 516 | 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x32, 0x89, 0x01, 0x0a, 0x10, 0x54, 517 | 0x6f, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x57, 0x65, 0x62, 0x53, 0x65, 0x65, 0x64, 0x65, 0x72, 0x12, 518 | 0x22, 0x0a, 0x04, 0x53, 0x74, 0x61, 0x74, 0x12, 0x0c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 519 | 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0a, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x70, 0x6c, 520 | 0x79, 0x22, 0x00, 0x12, 0x2a, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 521 | 0x6d, 0x12, 0x0c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 522 | 0x0a, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x30, 0x01, 0x12, 523 | 0x25, 0x0a, 0x05, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x0d, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 524 | 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 525 | 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x04, 0x5a, 0x02, 0x2e, 0x2f, 0x62, 0x06, 0x70, 0x72, 526 | 0x6f, 0x74, 0x6f, 0x33, 527 | } 528 | 529 | var ( 530 | file_proto_torrent_web_seeder_proto_rawDescOnce sync.Once 531 | file_proto_torrent_web_seeder_proto_rawDescData = file_proto_torrent_web_seeder_proto_rawDesc 532 | ) 533 | 534 | func file_proto_torrent_web_seeder_proto_rawDescGZIP() []byte { 535 | file_proto_torrent_web_seeder_proto_rawDescOnce.Do(func() { 536 | file_proto_torrent_web_seeder_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_torrent_web_seeder_proto_rawDescData) 537 | }) 538 | return file_proto_torrent_web_seeder_proto_rawDescData 539 | } 540 | 541 | var file_proto_torrent_web_seeder_proto_enumTypes = make([]protoimpl.EnumInfo, 2) 542 | var file_proto_torrent_web_seeder_proto_msgTypes = make([]protoimpl.MessageInfo, 6) 543 | var file_proto_torrent_web_seeder_proto_goTypes = []any{ 544 | (StatReply_Status)(0), // 0: StatReply.Status 545 | (Piece_Priority)(0), // 1: Piece.Priority 546 | (*StatRequest)(nil), // 2: StatRequest 547 | (*StatReply)(nil), // 3: StatReply 548 | (*Piece)(nil), // 4: Piece 549 | (*FilesRequest)(nil), // 5: FilesRequest 550 | (*File)(nil), // 6: File 551 | (*FilesReply)(nil), // 7: FilesReply 552 | } 553 | var file_proto_torrent_web_seeder_proto_depIdxs = []int32{ 554 | 0, // 0: StatReply.status:type_name -> StatReply.Status 555 | 4, // 1: StatReply.pieces:type_name -> Piece 556 | 1, // 2: Piece.priority:type_name -> Piece.Priority 557 | 6, // 3: FilesReply.files:type_name -> File 558 | 2, // 4: TorrentWebSeeder.Stat:input_type -> StatRequest 559 | 2, // 5: TorrentWebSeeder.StatStream:input_type -> StatRequest 560 | 5, // 6: TorrentWebSeeder.Files:input_type -> FilesRequest 561 | 3, // 7: TorrentWebSeeder.Stat:output_type -> StatReply 562 | 3, // 8: TorrentWebSeeder.StatStream:output_type -> StatReply 563 | 7, // 9: TorrentWebSeeder.Files:output_type -> FilesReply 564 | 7, // [7:10] is the sub-list for method output_type 565 | 4, // [4:7] is the sub-list for method input_type 566 | 4, // [4:4] is the sub-list for extension type_name 567 | 4, // [4:4] is the sub-list for extension extendee 568 | 0, // [0:4] is the sub-list for field type_name 569 | } 570 | 571 | func init() { file_proto_torrent_web_seeder_proto_init() } 572 | func file_proto_torrent_web_seeder_proto_init() { 573 | if File_proto_torrent_web_seeder_proto != nil { 574 | return 575 | } 576 | type x struct{} 577 | out := protoimpl.TypeBuilder{ 578 | File: protoimpl.DescBuilder{ 579 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 580 | RawDescriptor: file_proto_torrent_web_seeder_proto_rawDesc, 581 | NumEnums: 2, 582 | NumMessages: 6, 583 | NumExtensions: 0, 584 | NumServices: 1, 585 | }, 586 | GoTypes: file_proto_torrent_web_seeder_proto_goTypes, 587 | DependencyIndexes: file_proto_torrent_web_seeder_proto_depIdxs, 588 | EnumInfos: file_proto_torrent_web_seeder_proto_enumTypes, 589 | MessageInfos: file_proto_torrent_web_seeder_proto_msgTypes, 590 | }.Build() 591 | File_proto_torrent_web_seeder_proto = out.File 592 | file_proto_torrent_web_seeder_proto_rawDesc = nil 593 | file_proto_torrent_web_seeder_proto_goTypes = nil 594 | file_proto_torrent_web_seeder_proto_depIdxs = nil 595 | } 596 | -------------------------------------------------------------------------------- /proto/torrent-web-seeder.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "./"; 4 | 5 | service TorrentWebSeeder { 6 | // Get file stat 7 | rpc Stat (StatRequest) returns (StatReply) {} 8 | // Get file stat stream 9 | rpc StatStream (StatRequest) returns (stream StatReply) {} 10 | // Get file list 11 | rpc Files (FilesRequest) returns (FilesReply) {} 12 | } 13 | 14 | // Stat request message 15 | message StatRequest { 16 | string path = 1; 17 | } 18 | 19 | // Stat response message 20 | message StatReply { 21 | int64 total = 1; 22 | int64 completed = 2; 23 | int32 peers = 3; 24 | enum Status { 25 | INITIALIZATION = 0; 26 | SEEDING = 1; 27 | IDLE = 2; 28 | TERMINATED = 3; 29 | WAITING_FOR_PEERS = 4; 30 | RESTORING = 5; 31 | BACKINGUP = 6; 32 | } 33 | Status status = 4; 34 | repeated Piece pieces = 5; 35 | int32 seeders = 6; 36 | int32 leechers = 7; 37 | } 38 | 39 | message Piece { 40 | int64 position = 1; 41 | bool complete = 2; 42 | enum Priority { 43 | NONE = 0; 44 | NORMAL = 1; 45 | HIGH = 2; 46 | READAHEAD = 3; 47 | NEXT = 4; 48 | NOW = 5; 49 | } 50 | Priority priority = 3; 51 | } 52 | 53 | // Files requst message 54 | message FilesRequest { 55 | } 56 | 57 | message File { 58 | string path = 1; 59 | } 60 | 61 | // Files reply message 62 | message FilesReply { 63 | repeated File files = 1; 64 | } 65 | -------------------------------------------------------------------------------- /proto/torrent-web-seeder_grpc.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 | // versions: 3 | // - protoc-gen-go-grpc v1.5.1 4 | // - protoc v5.28.3 5 | // source: proto/torrent-web-seeder.proto 6 | 7 | package __ 8 | 9 | import ( 10 | context "context" 11 | grpc "google.golang.org/grpc" 12 | codes "google.golang.org/grpc/codes" 13 | status "google.golang.org/grpc/status" 14 | ) 15 | 16 | // This is a compile-time assertion to ensure that this generated file 17 | // is compatible with the grpc package it is being compiled against. 18 | // Requires gRPC-Go v1.64.0 or later. 19 | const _ = grpc.SupportPackageIsVersion9 20 | 21 | const ( 22 | TorrentWebSeeder_Stat_FullMethodName = "/TorrentWebSeeder/Stat" 23 | TorrentWebSeeder_StatStream_FullMethodName = "/TorrentWebSeeder/StatStream" 24 | TorrentWebSeeder_Files_FullMethodName = "/TorrentWebSeeder/Files" 25 | ) 26 | 27 | // TorrentWebSeederClient is the client API for TorrentWebSeeder service. 28 | // 29 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 30 | type TorrentWebSeederClient interface { 31 | // Get file stat 32 | Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatReply, error) 33 | // Get file stat stream 34 | StatStream(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StatReply], error) 35 | // Get file list 36 | Files(ctx context.Context, in *FilesRequest, opts ...grpc.CallOption) (*FilesReply, error) 37 | } 38 | 39 | type torrentWebSeederClient struct { 40 | cc grpc.ClientConnInterface 41 | } 42 | 43 | func NewTorrentWebSeederClient(cc grpc.ClientConnInterface) TorrentWebSeederClient { 44 | return &torrentWebSeederClient{cc} 45 | } 46 | 47 | func (c *torrentWebSeederClient) Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatReply, error) { 48 | cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) 49 | out := new(StatReply) 50 | err := c.cc.Invoke(ctx, TorrentWebSeeder_Stat_FullMethodName, in, out, cOpts...) 51 | if err != nil { 52 | return nil, err 53 | } 54 | return out, nil 55 | } 56 | 57 | func (c *torrentWebSeederClient) StatStream(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StatReply], error) { 58 | cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) 59 | stream, err := c.cc.NewStream(ctx, &TorrentWebSeeder_ServiceDesc.Streams[0], TorrentWebSeeder_StatStream_FullMethodName, cOpts...) 60 | if err != nil { 61 | return nil, err 62 | } 63 | x := &grpc.GenericClientStream[StatRequest, StatReply]{ClientStream: stream} 64 | if err := x.ClientStream.SendMsg(in); err != nil { 65 | return nil, err 66 | } 67 | if err := x.ClientStream.CloseSend(); err != nil { 68 | return nil, err 69 | } 70 | return x, nil 71 | } 72 | 73 | // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. 74 | type TorrentWebSeeder_StatStreamClient = grpc.ServerStreamingClient[StatReply] 75 | 76 | func (c *torrentWebSeederClient) Files(ctx context.Context, in *FilesRequest, opts ...grpc.CallOption) (*FilesReply, error) { 77 | cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) 78 | out := new(FilesReply) 79 | err := c.cc.Invoke(ctx, TorrentWebSeeder_Files_FullMethodName, in, out, cOpts...) 80 | if err != nil { 81 | return nil, err 82 | } 83 | return out, nil 84 | } 85 | 86 | // TorrentWebSeederServer is the server API for TorrentWebSeeder service. 87 | // All implementations must embed UnimplementedTorrentWebSeederServer 88 | // for forward compatibility. 89 | type TorrentWebSeederServer interface { 90 | // Get file stat 91 | Stat(context.Context, *StatRequest) (*StatReply, error) 92 | // Get file stat stream 93 | StatStream(*StatRequest, grpc.ServerStreamingServer[StatReply]) error 94 | // Get file list 95 | Files(context.Context, *FilesRequest) (*FilesReply, error) 96 | mustEmbedUnimplementedTorrentWebSeederServer() 97 | } 98 | 99 | // UnimplementedTorrentWebSeederServer must be embedded to have 100 | // forward compatible implementations. 101 | // 102 | // NOTE: this should be embedded by value instead of pointer to avoid a nil 103 | // pointer dereference when methods are called. 104 | type UnimplementedTorrentWebSeederServer struct{} 105 | 106 | func (UnimplementedTorrentWebSeederServer) Stat(context.Context, *StatRequest) (*StatReply, error) { 107 | return nil, status.Errorf(codes.Unimplemented, "method Stat not implemented") 108 | } 109 | func (UnimplementedTorrentWebSeederServer) StatStream(*StatRequest, grpc.ServerStreamingServer[StatReply]) error { 110 | return status.Errorf(codes.Unimplemented, "method StatStream not implemented") 111 | } 112 | func (UnimplementedTorrentWebSeederServer) Files(context.Context, *FilesRequest) (*FilesReply, error) { 113 | return nil, status.Errorf(codes.Unimplemented, "method Files not implemented") 114 | } 115 | func (UnimplementedTorrentWebSeederServer) mustEmbedUnimplementedTorrentWebSeederServer() {} 116 | func (UnimplementedTorrentWebSeederServer) testEmbeddedByValue() {} 117 | 118 | // UnsafeTorrentWebSeederServer may be embedded to opt out of forward compatibility for this service. 119 | // Use of this interface is not recommended, as added methods to TorrentWebSeederServer will 120 | // result in compilation errors. 121 | type UnsafeTorrentWebSeederServer interface { 122 | mustEmbedUnimplementedTorrentWebSeederServer() 123 | } 124 | 125 | func RegisterTorrentWebSeederServer(s grpc.ServiceRegistrar, srv TorrentWebSeederServer) { 126 | // If the following call pancis, it indicates UnimplementedTorrentWebSeederServer was 127 | // embedded by pointer and is nil. This will cause panics if an 128 | // unimplemented method is ever invoked, so we test this at initialization 129 | // time to prevent it from happening at runtime later due to I/O. 130 | if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { 131 | t.testEmbeddedByValue() 132 | } 133 | s.RegisterService(&TorrentWebSeeder_ServiceDesc, srv) 134 | } 135 | 136 | func _TorrentWebSeeder_Stat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 137 | in := new(StatRequest) 138 | if err := dec(in); err != nil { 139 | return nil, err 140 | } 141 | if interceptor == nil { 142 | return srv.(TorrentWebSeederServer).Stat(ctx, in) 143 | } 144 | info := &grpc.UnaryServerInfo{ 145 | Server: srv, 146 | FullMethod: TorrentWebSeeder_Stat_FullMethodName, 147 | } 148 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 149 | return srv.(TorrentWebSeederServer).Stat(ctx, req.(*StatRequest)) 150 | } 151 | return interceptor(ctx, in, info, handler) 152 | } 153 | 154 | func _TorrentWebSeeder_StatStream_Handler(srv interface{}, stream grpc.ServerStream) error { 155 | m := new(StatRequest) 156 | if err := stream.RecvMsg(m); err != nil { 157 | return err 158 | } 159 | return srv.(TorrentWebSeederServer).StatStream(m, &grpc.GenericServerStream[StatRequest, StatReply]{ServerStream: stream}) 160 | } 161 | 162 | // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. 163 | type TorrentWebSeeder_StatStreamServer = grpc.ServerStreamingServer[StatReply] 164 | 165 | func _TorrentWebSeeder_Files_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 166 | in := new(FilesRequest) 167 | if err := dec(in); err != nil { 168 | return nil, err 169 | } 170 | if interceptor == nil { 171 | return srv.(TorrentWebSeederServer).Files(ctx, in) 172 | } 173 | info := &grpc.UnaryServerInfo{ 174 | Server: srv, 175 | FullMethod: TorrentWebSeeder_Files_FullMethodName, 176 | } 177 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 178 | return srv.(TorrentWebSeederServer).Files(ctx, req.(*FilesRequest)) 179 | } 180 | return interceptor(ctx, in, info, handler) 181 | } 182 | 183 | // TorrentWebSeeder_ServiceDesc is the grpc.ServiceDesc for TorrentWebSeeder service. 184 | // It's only intended for direct use with grpc.RegisterService, 185 | // and not to be introspected or modified (even as a copy) 186 | var TorrentWebSeeder_ServiceDesc = grpc.ServiceDesc{ 187 | ServiceName: "TorrentWebSeeder", 188 | HandlerType: (*TorrentWebSeederServer)(nil), 189 | Methods: []grpc.MethodDesc{ 190 | { 191 | MethodName: "Stat", 192 | Handler: _TorrentWebSeeder_Stat_Handler, 193 | }, 194 | { 195 | MethodName: "Files", 196 | Handler: _TorrentWebSeeder_Files_Handler, 197 | }, 198 | }, 199 | Streams: []grpc.StreamDesc{ 200 | { 201 | StreamName: "StatStream", 202 | Handler: _TorrentWebSeeder_StatStream_Handler, 203 | ServerStreams: true, 204 | }, 205 | }, 206 | Metadata: "proto/torrent-web-seeder.proto", 207 | } 208 | -------------------------------------------------------------------------------- /server/configure.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | log "github.com/sirupsen/logrus" 5 | "github.com/urfave/cli" 6 | cs "github.com/webtor-io/common-services" 7 | s "github.com/webtor-io/torrent-web-seeder/server/services" 8 | ) 9 | 10 | func configure(app *cli.App) { 11 | app.Flags = []cli.Flag{} 12 | app.Flags = cs.RegisterProbeFlags([]cli.Flag{}) 13 | app.Flags = cs.RegisterPprofFlags(app.Flags) 14 | app.Flags = cs.RegisterPromFlags(app.Flags) 15 | app.Flags = s.RegisterWebFlags(app.Flags) 16 | app.Flags = s.RegisterTorrentClientFlags(app.Flags) 17 | app.Flags = s.RegisterTorrentStoreFlags(app.Flags) 18 | app.Flags = s.RegisterFileStoreFlags(app.Flags) 19 | app.Flags = s.RegisterStatFlags(app.Flags) 20 | // app.Flags = s.RegisterTorrentClientPoolFlags(app.Flags) 21 | app.Action = run 22 | } 23 | 24 | func run(c *cli.Context) error { 25 | var services []cs.Servable 26 | // Setting TorrentStore 27 | torrentStore := s.NewTorrentStore(c) 28 | defer torrentStore.Close() 29 | 30 | // Setting TorrentClient 31 | torrentClient, err := s.NewTorrentClient(c) 32 | if err != nil { 33 | return err 34 | } 35 | defer torrentClient.Close() 36 | 37 | // Setting TorrentStoreMap 38 | torrentStoreMap := s.NewTorrentStoreMap(torrentStore) 39 | 40 | // Setting FileStoreMap 41 | fileStoreMap := s.NewFileStoreMap(c) 42 | 43 | // Setting TouchMap 44 | touchMap := s.NewTouchMap(c) 45 | 46 | // Setting TorrentMap 47 | torrentMap := s.NewTorrentMap(torrentClient, torrentStoreMap, fileStoreMap) 48 | 49 | // Setting Stat 50 | stat := s.NewStat(torrentMap) 51 | 52 | // Setting StatGRPC 53 | statGRPC := s.NewStatGRPC(c, stat) 54 | if statGRPC != nil { 55 | services = append(services, statGRPC) 56 | } 57 | 58 | // Setting StatWeb 59 | statWeb := s.NewStatWeb(stat) 60 | 61 | // Setting FileCacheMap 62 | fileCacheMap := s.NewFileCacheMap(c) 63 | 64 | // Setting WebSeeder 65 | webSeeder := s.NewWebSeeder(torrentMap, fileCacheMap, touchMap, statWeb) 66 | 67 | // Setting Web 68 | web := s.NewWeb(c, webSeeder) 69 | services = append(services, web) 70 | defer web.Close() 71 | 72 | // Setting Probe 73 | probe := cs.NewProbe(c) 74 | if probe != nil { 75 | services = append(services, probe) 76 | defer probe.Close() 77 | } 78 | 79 | // Setting Prom 80 | prom := cs.NewProm(c) 81 | if prom != nil { 82 | services = append(services, prom) 83 | defer prom.Close() 84 | } 85 | 86 | // Setting Pprof 87 | pprof := cs.NewPprof(c) 88 | if pprof != nil { 89 | services = append(services, pprof) 90 | defer pprof.Close() 91 | } 92 | 93 | // Setting Serve 94 | serve := cs.NewServe(services...) 95 | 96 | // And SERVE! 97 | err = serve.Serve() 98 | 99 | if err != nil { 100 | log.WithError(err).Error("got server error") 101 | } 102 | 103 | return err 104 | } 105 | -------------------------------------------------------------------------------- /server/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | 6 | log "github.com/sirupsen/logrus" 7 | "github.com/urfave/cli" 8 | ) 9 | 10 | func main() { 11 | app := cli.NewApp() 12 | app.Name = "torrent-web-seeder" 13 | app.Usage = "Seeds torrent files" 14 | app.Version = "0.0.1" 15 | log.SetFormatter(&log.TextFormatter{ 16 | FullTimestamp: true, 17 | }) 18 | configure(app) 19 | err := app.Run(os.Args) 20 | if err != nil { 21 | log.WithError(err).Fatal("Failed to serve application") 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /server/services/common.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "crypto/sha1" 5 | "fmt" 6 | "github.com/pkg/errors" 7 | "os" 8 | "path" 9 | "sort" 10 | "strconv" 11 | "strings" 12 | ) 13 | 14 | const ( 15 | DataDirFlag = "data-dir" 16 | ) 17 | 18 | func DistributeByHash(dirs []string, hash string) (string, error) { 19 | sort.Strings(dirs) 20 | hex := fmt.Sprintf("%x", sha1.Sum([]byte(hash)))[0:5] 21 | num64, err := strconv.ParseInt(hex, 16, 64) 22 | if err != nil { 23 | return "", errors.Wrapf(err, "failed to parse hex from hex=%v infohash=%v", hex, hash) 24 | } 25 | num := int(num64 * 1000) 26 | total := 1048575 * 1000 27 | interval := total / len(dirs) 28 | for i := 0; i < len(dirs); i++ { 29 | if num < (i+1)*interval { 30 | return dirs[i], nil 31 | } 32 | } 33 | return "", errors.Wrapf(err, "failed to distribute infohash=%v", hash) 34 | } 35 | 36 | func GetDir(location string, hash string) (string, error) { 37 | if strings.HasSuffix(location, "*") { 38 | prefix := strings.TrimSuffix(location, "*") 39 | dir, lp := path.Split(prefix) 40 | 41 | files, err := os.ReadDir(dir) 42 | if err != nil { 43 | return "", err 44 | } 45 | dirs := []string{} 46 | for _, f := range files { 47 | if f.IsDir() && strings.HasPrefix(f.Name(), lp) { 48 | dirs = append(dirs, f.Name()) 49 | } 50 | } 51 | if len(dirs) == 0 { 52 | return prefix + string(os.PathSeparator) + hash, nil 53 | } else if len(dirs) == 1 { 54 | return dir + dirs[0] + string(os.PathSeparator) + hash, nil 55 | } else { 56 | d, err := DistributeByHash(dirs, hash) 57 | if err != nil { 58 | return "", err 59 | } 60 | return dir + d + string(os.PathSeparator) + hash, nil 61 | } 62 | } else { 63 | return location + "/" + hash, nil 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /server/services/file_cache_map.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "crypto/sha1" 5 | "fmt" 6 | sqlite "github.com/go-llsqlite/adapter" 7 | "github.com/go-llsqlite/adapter/sqlitex" 8 | "os" 9 | "path/filepath" 10 | "strings" 11 | "time" 12 | 13 | "github.com/urfave/cli" 14 | "github.com/webtor-io/lazymap" 15 | ) 16 | 17 | type FileCacheMap struct { 18 | lazymap.LazyMap[string] 19 | p string 20 | } 21 | 22 | func NewFileCacheMap(c *cli.Context) *FileCacheMap { 23 | return &FileCacheMap{ 24 | p: c.String(DataDirFlag), 25 | LazyMap: lazymap.New[string](&lazymap.Config{ 26 | Expire: 60 * time.Second, 27 | }), 28 | } 29 | } 30 | 31 | func (s *FileCacheMap) get(h string, path string) (string, error) { 32 | dir, err := GetDir(s.p, h) 33 | if err != nil { 34 | return "", err 35 | } 36 | f := dir + "/.torrent.db" 37 | _, err = os.Stat(f) 38 | if os.IsNotExist(err) { 39 | return "", nil 40 | } 41 | db, err := sqlite.OpenConn(f, 0) 42 | if err != nil { 43 | return "", err 44 | } 45 | defer func(db *sqlite.Conn) { 46 | _ = db.Close() 47 | }(db) 48 | var complete bool 49 | err = sqlitex.Exec( 50 | db, `select "path" from file_completion where "path"=?`, 51 | func(stmt *sqlite.Stmt) error { 52 | complete = stmt.DataCount() > 0 53 | return nil 54 | }, 55 | path) 56 | if err != nil { 57 | if strings.Contains(err.Error(), "no such table") { 58 | return "", nil 59 | } 60 | return "", err 61 | } 62 | if complete { 63 | hash := sha1.Sum([]byte(path)) 64 | hexHash := fmt.Sprintf("%x", hash) 65 | subPath := hexHash[:2] 66 | fullPath := filepath.Join(dir, "content", subPath, hexHash) 67 | if _, err := os.Stat(fullPath); err == nil { 68 | return fullPath, nil 69 | } else if os.IsNotExist(err) { 70 | return "", nil 71 | } else { 72 | return "", err 73 | } 74 | } 75 | return "", nil 76 | } 77 | 78 | func (s *FileCacheMap) Get(h string, path string) (string, error) { 79 | key := h + path 80 | return s.LazyMap.Get(key, func() (string, error) { 81 | return s.get(h, path) 82 | }) 83 | } 84 | -------------------------------------------------------------------------------- /server/services/file_store_map.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "os" 5 | "os/user" 6 | "path/filepath" 7 | "strings" 8 | "sync" 9 | 10 | "github.com/anacrolix/torrent/metainfo" 11 | "github.com/urfave/cli" 12 | ) 13 | 14 | const ( 15 | InputFlag string = "input" 16 | ) 17 | 18 | func RegisterFileStoreFlags(f []cli.Flag) []cli.Flag { 19 | return append(f, 20 | cli.StringFlag{ 21 | Name: InputFlag, 22 | Usage: "torrent file path", 23 | EnvVar: "INPUT", 24 | }, 25 | ) 26 | } 27 | 28 | type FileStoreMap struct { 29 | p string 30 | once sync.Once 31 | infos map[string]*metainfo.MetaInfo 32 | err error 33 | } 34 | 35 | func NewFileStoreMap(c *cli.Context) *FileStoreMap { 36 | return &FileStoreMap{ 37 | p: c.String(InputFlag), 38 | } 39 | } 40 | 41 | func (s *FileStoreMap) loadFiles() (map[string]*metainfo.MetaInfo, error) { 42 | path := s.p 43 | usr, _ := user.Current() 44 | dir := usr.HomeDir 45 | if path == "~" { 46 | path = dir 47 | } else if strings.HasPrefix(path, "~/") { 48 | path = filepath.Join(dir, path[2:]) 49 | } 50 | m := map[string]*metainfo.MetaInfo{} 51 | if path == "" { 52 | return m, nil 53 | } 54 | fi, err := os.Stat(path) 55 | if err != nil { 56 | return nil, err 57 | } 58 | if fi.IsDir() { 59 | fs, err := os.ReadDir(path) 60 | if err != nil { 61 | return nil, err 62 | } 63 | for _, f := range fs { 64 | if !f.IsDir() && strings.HasSuffix(f.Name(), ".torrent") { 65 | mi, err := metainfo.LoadFromFile(path + "/" + f.Name()) 66 | if err != nil { 67 | return nil, err 68 | } 69 | m[mi.HashInfoBytes().HexString()] = mi 70 | } 71 | } 72 | } else { 73 | mi, err := metainfo.LoadFromFile(path) 74 | if err != nil { 75 | return nil, err 76 | } 77 | m[mi.HashInfoBytes().HexString()] = mi 78 | } 79 | return m, nil 80 | } 81 | 82 | func (s *FileStoreMap) Get(h string) (*metainfo.MetaInfo, error) { 83 | s.once.Do(func() { 84 | s.infos, s.err = s.loadFiles() 85 | }) 86 | if s.err != nil { 87 | return nil, s.err 88 | } 89 | i := s.infos[h] 90 | return i, nil 91 | } 92 | 93 | func (s *FileStoreMap) List() ([]string, error) { 94 | hs := []string{} 95 | s.once.Do(func() { 96 | s.infos, s.err = s.loadFiles() 97 | }) 98 | if s.err != nil { 99 | return hs, s.err 100 | } 101 | for h := range s.infos { 102 | hs = append(hs, h) 103 | } 104 | return hs, nil 105 | } 106 | -------------------------------------------------------------------------------- /server/services/mmap.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "context" 5 | "crypto/sha1" 6 | "fmt" 7 | "github.com/anacrolix/missinggo/v2" 8 | "github.com/edsrzf/mmap-go" 9 | "io" 10 | "log" 11 | "os" 12 | "path/filepath" 13 | 14 | "github.com/anacrolix/torrent/metainfo" 15 | "github.com/anacrolix/torrent/mmap_span" 16 | "github.com/anacrolix/torrent/storage" 17 | "github.com/pkg/errors" 18 | ) 19 | 20 | type mmapClientImpl struct { 21 | baseDir string 22 | } 23 | 24 | func NewMMap(baseDir string) *mmapClientImpl { 25 | return &mmapClientImpl{ 26 | baseDir: baseDir, 27 | } 28 | } 29 | 30 | func (s *mmapClientImpl) OpenTorrent(_ context.Context, info *metainfo.Info, infoHash metainfo.Hash) (_ storage.TorrentImpl, err error) { 31 | dir, err := GetDir(s.baseDir, infoHash.HexString()) 32 | if err != nil { 33 | return 34 | } 35 | span, err := mMapTorrent(info, dir) 36 | t := &mmapTorrentStorage{ 37 | infoHash: infoHash, 38 | span: span, 39 | pc: pieceCompletionForDir(dir, info, infoHash), 40 | } 41 | return storage.TorrentImpl{Piece: t.Piece, Close: t.Close, Flush: t.Flush}, err 42 | } 43 | 44 | func (s *mmapClientImpl) Close() error { 45 | return nil 46 | } 47 | 48 | type mmapTorrentStorage struct { 49 | infoHash metainfo.Hash 50 | span *mmap_span.MMapSpan 51 | pc storage.PieceCompletion 52 | } 53 | 54 | func (ts *mmapTorrentStorage) Piece(p metainfo.Piece) storage.PieceImpl { 55 | return mmapStoragePiece{ 56 | pc: ts.pc, 57 | p: p, 58 | ih: ts.infoHash, 59 | ReaderAt: io.NewSectionReader(ts.span, p.Offset(), p.Length()), 60 | WriterAt: missinggo.NewSectionWriter(ts.span, p.Offset(), p.Length()), 61 | } 62 | } 63 | 64 | func (ts *mmapTorrentStorage) Close() error { 65 | ts.pc.Close() 66 | errs := ts.span.Close() 67 | if len(errs) > 0 { 68 | return errs[0] 69 | } 70 | return nil 71 | } 72 | func (ts *mmapTorrentStorage) Flush() error { 73 | errs := ts.span.Flush() 74 | if len(errs) > 0 { 75 | return errs[0] 76 | } 77 | return nil 78 | } 79 | 80 | type mmapStoragePiece struct { 81 | pc storage.PieceCompletionGetSetter 82 | p metainfo.Piece 83 | ih metainfo.Hash 84 | io.ReaderAt 85 | io.WriterAt 86 | } 87 | 88 | func (me mmapStoragePiece) pieceKey() metainfo.PieceKey { 89 | return metainfo.PieceKey{me.ih, me.p.Index()} 90 | } 91 | 92 | func (sp mmapStoragePiece) Completion() storage.Completion { 93 | c, err := sp.pc.Get(sp.pieceKey()) 94 | if err != nil { 95 | panic(err) 96 | } 97 | return c 98 | } 99 | 100 | func (sp mmapStoragePiece) MarkComplete() error { 101 | sp.pc.Set(sp.pieceKey(), true) 102 | return nil 103 | } 104 | 105 | func (sp mmapStoragePiece) MarkNotComplete() error { 106 | sp.pc.Set(sp.pieceKey(), false) 107 | return nil 108 | } 109 | 110 | func mMapTorrent(md *metainfo.Info, location string) (mms *mmap_span.MMapSpan, err error) { 111 | mms = &mmap_span.MMapSpan{} 112 | defer func() { 113 | if err != nil { 114 | mms.Close() 115 | } 116 | }() 117 | for _, miFile := range md.UpvertedFiles() { 118 | var safeName string 119 | safeName, err = storage.ToSafeFilePath(append([]string{md.Name}, miFile.Path...)...) 120 | if err != nil { 121 | return 122 | } 123 | hash := sha1.Sum([]byte(safeName)) 124 | hexHash := fmt.Sprintf("%x", hash) 125 | subPath := hexHash[:2] 126 | fileName := filepath.Join(location, "content", subPath, hexHash) 127 | var mm FileMapping 128 | mm, err = mmapFile(fileName, miFile.Length) 129 | if err != nil { 130 | err = fmt.Errorf("file %q: %s", miFile.DisplayPath(md), err) 131 | return 132 | } 133 | if mm != nil { 134 | mms.Append(mm) 135 | } 136 | } 137 | mms.InitIndex() 138 | return 139 | } 140 | 141 | func mmapFile(name string, size int64) (_ FileMapping, err error) { 142 | dir := filepath.Dir(name) 143 | err = os.MkdirAll(dir, 0o750) 144 | if err != nil { 145 | err = fmt.Errorf("making directory %q: %s", dir, err) 146 | return 147 | } 148 | var file *os.File 149 | file, err = os.OpenFile(name, os.O_CREATE|os.O_RDWR, 0o666) 150 | if err != nil { 151 | return 152 | } 153 | defer func() { 154 | if err != nil { 155 | _ = file.Close() 156 | } 157 | }() 158 | var fi os.FileInfo 159 | fi, err = file.Stat() 160 | if err != nil { 161 | return 162 | } 163 | if fi.Size() < size { 164 | // I think this is necessary on HFS+. Maybe Linux will SIGBUS too if 165 | // you overmap a file but I'm not sure. 166 | err = file.Truncate(size) 167 | if err != nil { 168 | return 169 | } 170 | } 171 | return func() (ret mmapWithFile, err error) { 172 | ret.f = file 173 | if size == 0 { 174 | // Can't mmap() regions with length 0. 175 | return 176 | } 177 | intLen := int(size) 178 | if int64(intLen) != size { 179 | err = errors.New("size too large for system") 180 | return 181 | } 182 | ret.mmap, err = mmap.MapRegion(file, intLen, mmap.RDWR, 0, 0) 183 | if err != nil { 184 | err = fmt.Errorf("error mapping region: %s", err) 185 | return 186 | } 187 | if int64(len(ret.mmap)) != size { 188 | panic(len(ret.mmap)) 189 | } 190 | return 191 | }() 192 | } 193 | 194 | type FileMapping = mmap_span.Mmap 195 | 196 | // Handles closing the mmap's file handle (needed for Windows). Could be implemented differently by 197 | // OS. 198 | type mmapWithFile struct { 199 | f *os.File 200 | mmap mmap.MMap 201 | } 202 | 203 | func (m mmapWithFile) Flush() error { 204 | return m.mmap.Flush() 205 | } 206 | 207 | func (m mmapWithFile) Unmap() (err error) { 208 | if m.mmap != nil { 209 | err = m.mmap.Unmap() 210 | } 211 | fileErr := m.f.Close() 212 | if err == nil { 213 | err = fileErr 214 | } 215 | return 216 | } 217 | 218 | func (m mmapWithFile) Bytes() []byte { 219 | if m.mmap == nil { 220 | return nil 221 | } 222 | return m.mmap 223 | } 224 | 225 | func pieceCompletionForDir(dir string, info *metainfo.Info, hash metainfo.Hash) (ret storage.PieceCompletion) { 226 | ret, err := NewPieceCompletion(dir, info, hash) 227 | if err != nil { 228 | log.Printf("couldn't open piece completion db in %q: %s", dir, err) 229 | ret = storage.NewMapPieceCompletion() 230 | } 231 | return 232 | } 233 | -------------------------------------------------------------------------------- /server/services/piece_completion.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "errors" 5 | "github.com/anacrolix/torrent/metainfo" 6 | "github.com/anacrolix/torrent/storage" 7 | "github.com/go-llsqlite/adapter" 8 | "github.com/go-llsqlite/adapter/sqlitex" 9 | "path/filepath" 10 | "strings" 11 | "sync" 12 | "time" 13 | ) 14 | 15 | type completions struct { 16 | pieces []bool 17 | completedCount int 18 | completedFiles map[string]bool 19 | completed bool 20 | mux sync.Mutex 21 | info *metainfo.Info 22 | } 23 | 24 | func (s *completions) Complete(index int) { 25 | s.mux.Lock() 26 | defer s.mux.Unlock() 27 | s.completedCount++ 28 | s.pieces[index] = true 29 | s.completed = s.completedCount == len(s.pieces) 30 | } 31 | 32 | func (s *completions) GetCompletedFiles() []string { 33 | s.mux.Lock() 34 | defer s.mux.Unlock() 35 | var files []string 36 | if len(s.info.Files) == 0 { 37 | completed := true 38 | if !s.completed { 39 | for _, b := range s.pieces { 40 | if !b { 41 | completed = false 42 | break 43 | } 44 | } 45 | } 46 | if completed { 47 | files = append(files, s.info.Name) 48 | } 49 | return files 50 | } 51 | offset := 0 52 | for _, f := range s.info.Files { 53 | path := s.info.Name + "/" + strings.Join(f.Path, "/") 54 | completed := true 55 | startPiece := offset / int(s.info.PieceLength) 56 | endPiece := (offset + int(f.Length)) / int(s.info.PieceLength) 57 | offset += int(f.Length) 58 | if !s.completed && !s.completedFiles[path] { 59 | for i := startPiece; i <= endPiece; i++ { 60 | if i >= len(s.pieces) { 61 | break 62 | } 63 | if !s.pieces[i] { 64 | completed = false 65 | break 66 | } 67 | } 68 | } 69 | if completed { 70 | files = append(files, s.info.Name+"/"+strings.Join(f.Path, "/")) 71 | s.completedFiles[path] = true 72 | } 73 | } 74 | return files 75 | } 76 | 77 | type pieceCompletion struct { 78 | mu sync.Mutex 79 | closed bool 80 | db *sqlite.Conn 81 | info *metainfo.Info 82 | hash metainfo.Hash 83 | completions *completions 84 | } 85 | 86 | var _ storage.PieceCompletion = (*pieceCompletion)(nil) 87 | 88 | func NewPieceCompletion(dir string, info *metainfo.Info, hash metainfo.Hash) (ret *pieceCompletion, err error) { 89 | p := filepath.Join(dir, ".torrent.db") 90 | db, err := sqlite.OpenConn(p, 0) 91 | if err != nil { 92 | return 93 | } 94 | err = sqlitex.ExecScript(db, `create table if not exists piece_completion("index", complete, unique("index"))`) 95 | if err != nil { 96 | db.Close() 97 | return 98 | } 99 | err = sqlitex.ExecScript(db, `create table if not exists file_completion("path", unique("path"))`) 100 | if err != nil { 101 | db.Close() 102 | return 103 | } 104 | pieces := make([]bool, info.NumPieces()) 105 | for i := 0; i < info.NumPieces(); i++ { 106 | pieces[i] = false 107 | } 108 | completedCount := 0 109 | err = sqlitex.Exec(db, `select "index", complete from piece_completion`, 110 | func(stmt *sqlite.Stmt) error { 111 | if stmt.ColumnInt(1) == 1 { 112 | index := stmt.ColumnInt(0) 113 | pieces[index] = true 114 | completedCount++ 115 | } 116 | return nil 117 | }, 118 | ) 119 | if err != nil { 120 | db.Close() 121 | return 122 | } 123 | completions := &completions{ 124 | pieces: pieces, 125 | completedCount: completedCount, 126 | completed: completedCount == len(pieces), 127 | info: info, 128 | completedFiles: make(map[string]bool), 129 | } 130 | ret = &pieceCompletion{ 131 | db: db, 132 | info: info, 133 | hash: hash, 134 | completions: completions, 135 | } 136 | go func() { 137 | completedFiles := make(map[string]bool) 138 | for { 139 | for _, f := range completions.GetCompletedFiles() { 140 | if completedFiles[f] { 141 | continue 142 | } 143 | err = ret.CompleteFile(f) 144 | if err != nil { 145 | return 146 | } 147 | completedFiles[f] = true 148 | } 149 | if completions.completed || ret.closed { 150 | return 151 | } 152 | <-time.After(5 * time.Second) 153 | } 154 | }() 155 | return 156 | } 157 | 158 | func (s *pieceCompletion) Get(pk metainfo.PieceKey) (c storage.Completion, err error) { 159 | s.mu.Lock() 160 | defer s.mu.Unlock() 161 | err = sqlitex.Exec( 162 | s.db, `select complete from piece_completion where "index"=?`, 163 | func(stmt *sqlite.Stmt) error { 164 | c.Complete = stmt.ColumnInt(0) != 0 165 | c.Ok = true 166 | return nil 167 | }, 168 | pk.Index) 169 | return 170 | } 171 | 172 | func (s *pieceCompletion) Set(pk metainfo.PieceKey, b bool) error { 173 | s.mu.Lock() 174 | defer s.mu.Unlock() 175 | if s.closed { 176 | return errors.New("closed") 177 | } 178 | if b { 179 | s.completions.Complete(pk.Index) 180 | } 181 | return sqlitex.Exec( 182 | s.db, 183 | `insert or replace into piece_completion("index", complete) values(?, ?)`, 184 | nil, 185 | pk.Index, 186 | b, 187 | ) 188 | } 189 | 190 | func (s *pieceCompletion) CompleteFile(path string) error { 191 | s.mu.Lock() 192 | defer s.mu.Unlock() 193 | if s.closed { 194 | return errors.New("closed") 195 | } 196 | return sqlitex.Exec( 197 | s.db, 198 | `insert or replace into file_completion("path") values(?)`, 199 | nil, 200 | path, 201 | ) 202 | } 203 | 204 | func (s *pieceCompletion) Close() (err error) { 205 | s.mu.Lock() 206 | defer s.mu.Unlock() 207 | if s.closed { 208 | return 209 | } 210 | err = s.db.Close() 211 | s.db = nil 212 | s.closed = true 213 | return 214 | } 215 | -------------------------------------------------------------------------------- /server/services/piece_reader.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/anacrolix/torrent" 7 | ) 8 | 9 | type PieceReader struct { 10 | p *torrent.Piece 11 | r torrent.Reader 12 | } 13 | 14 | func NewPieceReader(r torrent.Reader, p *torrent.Piece) *PieceReader { 15 | return &PieceReader{p: p, r: r} 16 | } 17 | 18 | func (s *PieceReader) Read(p []byte) (n int, err error) { 19 | return s.r.Read(p) 20 | } 21 | 22 | func (s *PieceReader) Close() error { 23 | return s.r.Close() 24 | } 25 | 26 | func (s *PieceReader) Seek(offset int64, whence int) (int64, error) { 27 | pieceOffset := int64(s.p.Info().Offset()) 28 | pieceLength := s.p.Info().Length() + offset 29 | 30 | switch whence { 31 | case io.SeekStart: 32 | _, err := s.r.Seek(pieceOffset+offset, io.SeekStart) 33 | if err != nil { 34 | return 0, err 35 | } 36 | return offset, nil 37 | case io.SeekCurrent: 38 | n, err := s.r.Seek(offset, io.SeekCurrent) 39 | if err != nil { 40 | return 0, err 41 | } 42 | return n - pieceOffset, nil 43 | case io.SeekEnd: 44 | n, err := s.r.Seek(pieceOffset+pieceLength+offset, io.SeekStart) 45 | if err != nil { 46 | return 0, err 47 | } 48 | return n - pieceOffset, nil 49 | } 50 | return 0, nil 51 | } 52 | -------------------------------------------------------------------------------- /server/services/stat.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "context" 5 | "os" 6 | "os/signal" 7 | "syscall" 8 | "time" 9 | 10 | "google.golang.org/grpc/codes" 11 | "google.golang.org/grpc/metadata" 12 | "google.golang.org/grpc/status" 13 | 14 | "github.com/anacrolix/torrent" 15 | "github.com/pkg/errors" 16 | log "github.com/sirupsen/logrus" 17 | pb "github.com/webtor-io/torrent-web-seeder/proto" 18 | ) 19 | 20 | type Stat struct { 21 | pb.UnimplementedTorrentWebSeederServer 22 | tm *TorrentMap 23 | } 24 | 25 | func NewStat(tm *TorrentMap) *Stat { 26 | return &Stat{ 27 | tm: tm, 28 | } 29 | } 30 | 31 | func fileBytesCompleted(f *torrent.File) int64 { 32 | var res int64 33 | for _, p := range f.State() { 34 | if p.Complete { 35 | res += p.Bytes 36 | } 37 | } 38 | return res 39 | } 40 | 41 | func (s *Stat) torrentStat(t *torrent.Torrent) (*pb.StatReply, error) { 42 | completed := t.BytesCompleted() 43 | rStatus := pb.StatReply_SEEDING 44 | if completed == 0 { 45 | rStatus = pb.StatReply_WAITING_FOR_PEERS 46 | } 47 | var pieces []*pb.Piece 48 | for i := 0; i < t.NumPieces(); i++ { 49 | p := t.Piece(i) 50 | ps := p.State() 51 | pr := pb.Piece_NONE 52 | if ps.Priority == torrent.PiecePriorityNormal { 53 | pr = pb.Piece_NORMAL 54 | } else if ps.Priority > torrent.PiecePriorityNormal { 55 | pr = pb.Piece_HIGH 56 | } 57 | pieces = append(pieces, &pb.Piece{Position: int64(i), Complete: ps.Complete, Priority: pr}) 58 | 59 | } 60 | peers := t.Stats().ActivePeers 61 | seeders := t.Stats().ConnectedSeeders 62 | leechers := peers - seeders 63 | return &pb.StatReply{ 64 | Completed: completed, 65 | Total: t.Info().TotalLength(), 66 | Peers: int32(peers), 67 | Status: rStatus, 68 | Seeders: int32(seeders), 69 | Leechers: int32(leechers), 70 | Pieces: pieces, 71 | }, nil 72 | } 73 | 74 | func (s *Stat) fileStat(t *torrent.Torrent, f *torrent.File) (*pb.StatReply, error) { 75 | completed := fileBytesCompleted(f) 76 | rStatus := pb.StatReply_SEEDING 77 | if completed == 0 { 78 | rStatus = pb.StatReply_WAITING_FOR_PEERS 79 | } 80 | var pieces []*pb.Piece 81 | for i, p := range f.State() { 82 | pr := pb.Piece_NONE 83 | if p.Priority == torrent.PiecePriorityNormal { 84 | pr = pb.Piece_NORMAL 85 | } else if p.Priority > torrent.PiecePriorityNormal { 86 | pr = pb.Piece_HIGH 87 | } 88 | pieces = append(pieces, &pb.Piece{Position: int64(i), Complete: p.Complete, Priority: pr}) 89 | } 90 | peers := t.Stats().ActivePeers 91 | seeders := t.Stats().ConnectedSeeders 92 | leechers := peers - seeders 93 | return &pb.StatReply{ 94 | Completed: completed, 95 | Total: f.FileInfo().Length, 96 | Peers: int32(peers), 97 | Status: rStatus, 98 | Seeders: int32(seeders), 99 | Leechers: int32(leechers), 100 | Pieces: pieces, 101 | }, nil 102 | } 103 | 104 | func findFile(t *torrent.Torrent, path string) *torrent.File { 105 | for _, f := range t.Files() { 106 | if f.Path() == path { 107 | return f 108 | } 109 | } 110 | return nil 111 | } 112 | 113 | func (s *Stat) Stat(ctx context.Context, in *pb.StatRequest) (*pb.StatReply, error) { 114 | md, _ := metadata.FromIncomingContext(ctx) 115 | if len(md.Get("info-hash")) == 0 || md.Get("info-hash")[0] == "" { 116 | return nil, errors.Errorf("No info-hash provided") 117 | } 118 | h := md.Get("info-hash")[0] 119 | t, err := s.tm.Get(h) 120 | if err != nil { 121 | return nil, err 122 | } 123 | if in.GetPath() == "" { 124 | return s.torrentStat(t) 125 | } 126 | f := findFile(t, in.GetPath()) 127 | if f == nil { 128 | return nil, status.Errorf(codes.NotFound, "unable to find file for path=%v", in.GetPath()) 129 | } 130 | return s.fileStat(t, f) 131 | } 132 | 133 | func diff(a []*pb.Piece, b []*pb.Piece) []*pb.Piece { 134 | var d []*pb.Piece 135 | for _, aa := range a { 136 | found := false 137 | for _, bb := range b { 138 | if aa.GetPosition() == bb.GetPosition() && aa.GetComplete() == bb.GetComplete() && aa.GetPriority() == bb.GetPriority() { 139 | found = true 140 | break 141 | } 142 | } 143 | if !found { 144 | d = append(d, aa) 145 | } 146 | } 147 | return d 148 | } 149 | 150 | func (s *Stat) StatStream(in *pb.StatRequest, stream pb.TorrentWebSeeder_StatStreamServer) error { 151 | md, _ := metadata.FromIncomingContext(stream.Context()) 152 | if len(md.Get("info-hash")) == 0 || md.Get("info-hash")[0] == "" { 153 | return errors.Errorf("no info-hash provided") 154 | } 155 | h := md.Get("info-hash")[0] 156 | t, err := s.tm.Get(h) 157 | if err != nil { 158 | return err 159 | } 160 | ticker := time.NewTicker(time.Second) 161 | errCh := make(chan error) 162 | done := make(chan bool) 163 | defer func() { 164 | ticker.Stop() 165 | done <- true 166 | }() 167 | go func() { 168 | var prevRep *pb.StatReply 169 | for { 170 | rep, err := s.Stat(stream.Context(), in) 171 | if err != nil { 172 | log.WithError(err).Error("failed to get stat") 173 | errCh <- err 174 | return 175 | } 176 | if prevRep == nil || 177 | rep.GetCompleted() != prevRep.GetCompleted() || 178 | rep.GetPeers() != prevRep.GetPeers() { 179 | var diffPieces []*pb.Piece 180 | if prevRep == nil { 181 | diffPieces = rep.GetPieces() 182 | } else { 183 | diffPieces = diff(rep.GetPieces(), prevRep.GetPieces()) 184 | } 185 | prevRep = rep 186 | diffRep := &pb.StatReply{ 187 | Completed: rep.GetCompleted(), 188 | Peers: rep.GetPeers(), 189 | Status: rep.GetStatus(), 190 | Total: rep.GetTotal(), 191 | Pieces: diffPieces, 192 | } 193 | if err := stream.Send(diffRep); err != nil { 194 | log.WithError(err).Error("failed to send stat") 195 | errCh <- err 196 | return 197 | } 198 | if rep.GetTotal() == rep.GetCompleted() && rep.GetStatus() != pb.StatReply_INITIALIZATION && rep.GetStatus() != pb.StatReply_RESTORING { 199 | errCh <- nil 200 | return 201 | } 202 | } 203 | select { 204 | case <-done: 205 | return 206 | case <-ticker.C: 207 | continue 208 | } 209 | } 210 | }() 211 | 212 | sigs := make(chan os.Signal, 1) 213 | signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) 214 | select { 215 | case <-t.Closed(): 216 | _ = stream.Send(&pb.StatReply{ 217 | Status: pb.StatReply_TERMINATED, 218 | }) 219 | return nil 220 | case <-sigs: 221 | _ = stream.Send(&pb.StatReply{ 222 | Status: pb.StatReply_TERMINATED, 223 | }) 224 | return nil 225 | case <-stream.Context().Done(): 226 | err := stream.Context().Err() 227 | if err != nil { 228 | log.WithError(err).Error("failed to send stat") 229 | } else { 230 | log.WithField("path", in.GetPath()).Info("sending stats completed") 231 | } 232 | return err 233 | case <-time.After(30 * time.Minute): 234 | log.WithField("path", in.GetPath()).Info("sending stats timeout") 235 | return nil 236 | case err := <-errCh: 237 | if err != nil { 238 | return status.Errorf(codes.Internal, "got error=%v", err) 239 | } 240 | return nil 241 | } 242 | } 243 | 244 | func (s *Stat) Files(ctx context.Context, _ *pb.FilesRequest) (*pb.FilesReply, error) { 245 | md, _ := metadata.FromIncomingContext(ctx) 246 | if len(md.Get("info-hash")) == 0 || md.Get("info-hash")[0] == "" { 247 | return nil, errors.Errorf("no info-hash provided") 248 | } 249 | h := md.Get("info-hash")[0] 250 | t, err := s.tm.Get(h) 251 | if err != nil { 252 | return nil, err 253 | } 254 | var fs []*pb.File 255 | for _, f := range t.Files() { 256 | fs = append(fs, &pb.File{Path: f.Path()}) 257 | } 258 | return &pb.FilesReply{Files: fs}, nil 259 | } 260 | -------------------------------------------------------------------------------- /server/services/stat_grpc.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | "sync" 7 | 8 | "github.com/pkg/errors" 9 | "github.com/urfave/cli" 10 | 11 | "google.golang.org/grpc" 12 | 13 | "google.golang.org/grpc/reflection" 14 | 15 | log "github.com/sirupsen/logrus" 16 | pb "github.com/webtor-io/torrent-web-seeder/proto" 17 | ) 18 | 19 | type StatGRPC struct { 20 | s *grpc.Server 21 | host string 22 | port int 23 | l net.Listener 24 | err error 25 | st *Stat 26 | once sync.Once 27 | } 28 | 29 | const ( 30 | StatHostFlag = "stat-host" 31 | StatPortFlag = "stat-port" 32 | StatUseFlag = "use-stat" 33 | ) 34 | 35 | func RegisterStatFlags(f []cli.Flag) []cli.Flag { 36 | return append(f, 37 | cli.StringFlag{ 38 | Name: StatHostFlag, 39 | Usage: "stat listening host", 40 | Value: "", 41 | EnvVar: "STAT_HOST", 42 | }, 43 | cli.IntFlag{ 44 | Name: StatPortFlag, 45 | Usage: "stat listening port", 46 | Value: 50051, 47 | EnvVar: "STAT_PORT", 48 | }, 49 | cli.BoolTFlag{ 50 | Name: StatUseFlag, 51 | Usage: "enable stat service", 52 | EnvVar: "USE_STAT", 53 | }, 54 | ) 55 | } 56 | 57 | func NewStatGRPC(c *cli.Context, st *Stat) *StatGRPC { 58 | if !c.BoolT(StatHostFlag) { 59 | return nil 60 | } 61 | return &StatGRPC{ 62 | st: st, 63 | host: c.String(StatHostFlag), 64 | port: c.Int(StatPortFlag), 65 | } 66 | } 67 | 68 | func (ss *StatGRPC) Serve() error { 69 | s, err := ss.Get() 70 | if err != nil { 71 | return err 72 | } 73 | addr := fmt.Sprintf("%s:%d", ss.host, ss.port) 74 | l, err := net.Listen("tcp", addr) 75 | if err != nil { 76 | return errors.Wrap(err, "failed to listen to tcp connection") 77 | } 78 | ss.l = l 79 | log.Infof("serving Stat at %v", addr) 80 | return s.Serve(l) 81 | } 82 | 83 | func (ss *StatGRPC) Close() { 84 | if ss.l != nil { 85 | _ = ss.l.Close() 86 | } 87 | } 88 | 89 | func (ss *StatGRPC) get() (*grpc.Server, error) { 90 | log.Info("initializing Stat") 91 | s := grpc.NewServer() 92 | pb.RegisterTorrentWebSeederServer(s, ss.st) 93 | reflection.Register(s) 94 | return s, nil 95 | } 96 | 97 | func (s *StatGRPC) Get() (*grpc.Server, error) { 98 | s.once.Do(func() { 99 | s.s, s.err = s.get() 100 | }) 101 | return s.s, s.err 102 | } 103 | -------------------------------------------------------------------------------- /server/services/stat_web.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | "net/http" 8 | "sync" 9 | "time" 10 | 11 | "google.golang.org/grpc/metadata" 12 | 13 | logrusmiddleware "github.com/bakins/logrus-middleware" 14 | "github.com/pkg/errors" 15 | 16 | pb "github.com/webtor-io/torrent-web-seeder/proto" 17 | ) 18 | 19 | type StatWeb struct { 20 | st *Stat 21 | } 22 | 23 | func NewStatWeb(st *Stat) *StatWeb { 24 | return &StatWeb{ 25 | st: st, 26 | } 27 | } 28 | 29 | func (s *StatWeb) Serve(w http.ResponseWriter, r *http.Request, h string, p string) error { 30 | ha, ok := w.(*logrusmiddleware.Handler) 31 | if !ok { 32 | return errors.Errorf("unable to get writer") 33 | } 34 | 35 | f, ok := ha.ResponseWriter.(http.Flusher) 36 | if !ok { 37 | return errors.Errorf("streaming unsupported") 38 | } 39 | 40 | w.Header().Set("Content-Type", "text/event-stream") 41 | w.Header().Set("Cache-Control", "no-cache") 42 | w.Header().Set("Connection", "keep-alive") 43 | w.Header().Set("Access-Control-Allow-Origin", "*") 44 | 45 | ctx := metadata.NewIncomingContext(r.Context(), metadata.MD{ 46 | "info-hash": []string{h}, 47 | }) 48 | stream := NewStatStreamServer(ctx, ha, f) 49 | ticker := time.NewTicker(10 * time.Second) 50 | go func() { 51 | for { 52 | select { 53 | case <-ticker.C: 54 | stream.Ping() 55 | case <-ctx.Done(): 56 | return 57 | } 58 | } 59 | }() 60 | err := s.st.StatStream(&pb.StatRequest{Path: p}, stream) 61 | ticker.Stop() 62 | return err 63 | } 64 | 65 | type StatStreamServer struct { 66 | ctx context.Context 67 | w http.ResponseWriter 68 | f http.Flusher 69 | counter int 70 | mux sync.Mutex 71 | } 72 | 73 | func NewStatStreamServer(ctx context.Context, w http.ResponseWriter, f http.Flusher) *StatStreamServer { 74 | return &StatStreamServer{ 75 | ctx: ctx, 76 | w: w, 77 | f: f, 78 | } 79 | } 80 | 81 | func (s *StatStreamServer) Context() context.Context { 82 | return s.ctx 83 | } 84 | 85 | func (s *StatStreamServer) RecvMsg(m interface{}) error { 86 | return errors.Errorf("not implemented") 87 | } 88 | 89 | func (s *StatStreamServer) SendMsg(m interface{}) error { 90 | return errors.Errorf("not implemented") 91 | } 92 | 93 | func (s *StatStreamServer) SendHeader(m metadata.MD) error { 94 | return errors.Errorf("not implemented") 95 | } 96 | 97 | func (s *StatStreamServer) SetHeader(m metadata.MD) error { 98 | return errors.Errorf("not implemented") 99 | } 100 | 101 | func (s *StatStreamServer) SetTrailer(m metadata.MD) {} 102 | 103 | func (s *StatStreamServer) Ping() { 104 | s.mux.Lock() 105 | defer s.mux.Unlock() 106 | 107 | fmt.Fprintf(s.w, "id: %v\n", s.counter) 108 | fmt.Fprintf(s.w, "event: ping\n") 109 | fmt.Fprintf(s.w, "data: %v\n\n", time.Now().Unix()) 110 | s.counter++ 111 | s.f.Flush() 112 | } 113 | 114 | func (s *StatStreamServer) Send(m *pb.StatReply) error { 115 | s.mux.Lock() 116 | defer s.mux.Unlock() 117 | data, err := json.Marshal(m) 118 | if err != nil { 119 | return err 120 | } 121 | fmt.Fprintf(s.w, "id: %v\n", s.counter) 122 | fmt.Fprintf(s.w, "event: statupdate\n") 123 | fmt.Fprintf(s.w, "data: %s\n\n", string(data)) 124 | s.counter++ 125 | s.f.Flush() 126 | return nil 127 | } 128 | -------------------------------------------------------------------------------- /server/services/throttled_reader.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/juju/ratelimit" 7 | ) 8 | 9 | type ThrottledReader struct { 10 | io.ReadSeeker 11 | r io.Reader 12 | } 13 | 14 | func (r ThrottledReader) Read(p []byte) (int, error) { 15 | return r.r.Read(p) 16 | } 17 | 18 | func NewThrottledReader(r io.ReadSeeker, b *ratelimit.Bucket) io.ReadSeeker { 19 | return ThrottledReader{r, ratelimit.Reader(r, b)} 20 | } 21 | -------------------------------------------------------------------------------- /server/services/torrent_client.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "net/http" 5 | "net/url" 6 | "os" 7 | "sync" 8 | "time" 9 | 10 | "code.cloudfoundry.org/bytefmt" 11 | tlog "github.com/anacrolix/log" 12 | "github.com/anacrolix/torrent" 13 | "github.com/pkg/errors" 14 | log "github.com/sirupsen/logrus" 15 | "github.com/urfave/cli" 16 | 17 | "golang.org/x/time/rate" 18 | ) 19 | 20 | type TorrentClient struct { 21 | cl *torrent.Client 22 | mux sync.Mutex 23 | err error 24 | inited bool 25 | rLimit int64 26 | dataDir string 27 | proxy string 28 | ua string 29 | noUpload bool 30 | seed bool 31 | dUTP bool 32 | dWebTorrent bool 33 | establishedConnsPerTorrent int 34 | halfOpenConnsPerTorrent int 35 | torrentPeersHighWater int 36 | torrentPeersLowWater int 37 | } 38 | 39 | const ( 40 | TorrentClientDownloadRateFlag = "download-rate" 41 | TorrentClientUserAgentFlag = "user-agent" 42 | HttpProxyFlag = "http-proxy" 43 | NoUploadFlag = "no-upload" 44 | SeedFlag = "seed" 45 | DisableUtpFlag = "disable-utp" 46 | DisableWebTorrentFlag = "disable-webtorrent" 47 | EstablishedConnsPerTorrentFlag = "established-conns-per-torrent" 48 | HalfOpenConnsPerTorrentFlag = "half-open-conns-per-torrent" 49 | TorrentPeersHighWaterFlag = "torrent-peers-high-water" 50 | TorrentPeersLowWaterFlag = "torrent-peers-low-water" 51 | ) 52 | 53 | func RegisterTorrentClientFlags(f []cli.Flag) []cli.Flag { 54 | return append(f, 55 | cli.StringFlag{ 56 | Name: TorrentClientDownloadRateFlag, 57 | Usage: "download rate", 58 | Value: "", 59 | EnvVar: "DOWNLOAD_RATE", 60 | }, 61 | cli.StringFlag{ 62 | Name: TorrentClientUserAgentFlag, 63 | Usage: "user agent", 64 | Value: "", 65 | EnvVar: "USER_AGENT", 66 | }, 67 | cli.StringFlag{ 68 | Name: HttpProxyFlag, 69 | Usage: "http proxy", 70 | Value: "", 71 | EnvVar: "HTTP_PROXY", 72 | }, 73 | cli.StringFlag{ 74 | Name: DataDirFlag, 75 | Usage: "data dir", 76 | Value: os.TempDir(), 77 | EnvVar: "DATA_DIR", 78 | }, 79 | cli.BoolFlag{ 80 | Name: NoUploadFlag, 81 | Usage: "no upload", 82 | EnvVar: "NO_UPLOAD", 83 | }, 84 | cli.BoolFlag{ 85 | Name: SeedFlag, 86 | Usage: "seed", 87 | EnvVar: "SEED", 88 | }, 89 | cli.BoolFlag{ 90 | Name: DisableWebTorrentFlag, 91 | Usage: "disables WebTorrent", 92 | EnvVar: "DISABLE_WEBTORRENT", 93 | }, 94 | cli.BoolFlag{ 95 | Name: DisableUtpFlag, 96 | Usage: "disables utp", 97 | EnvVar: "DISABLE_UTP", 98 | }, 99 | cli.IntFlag{ 100 | Name: EstablishedConnsPerTorrentFlag, 101 | Usage: "established conns per torrent", 102 | EnvVar: "ESTABLISHED_CONNS_PER_TORRENT", 103 | }, 104 | cli.IntFlag{ 105 | Name: HalfOpenConnsPerTorrentFlag, 106 | Usage: "half-open conns per torrent", 107 | EnvVar: "HALF_OPEN_CONNS_PER_TORRENT", 108 | }, 109 | cli.IntFlag{ 110 | Name: TorrentPeersHighWaterFlag, 111 | Usage: "torrent peers high water", 112 | EnvVar: "TORRENT_PEERS_HIGH_WATER", 113 | }, 114 | cli.IntFlag{ 115 | Name: TorrentPeersLowWaterFlag, 116 | Usage: "torrent peers low water", 117 | EnvVar: "TORRENT_PEERS_LOW_WATER", 118 | }, 119 | ) 120 | } 121 | 122 | func NewTorrentClient(c *cli.Context) (*TorrentClient, error) { 123 | dr := int64(-1) 124 | if c.String(TorrentClientDownloadRateFlag) != "" { 125 | drp, err := bytefmt.ToBytes(c.String(TorrentClientDownloadRateFlag)) 126 | if err != nil { 127 | return nil, errors.Wrap(err, "failed to parse download rate flag") 128 | 129 | } 130 | dr = int64(drp) 131 | } 132 | return &TorrentClient{ 133 | rLimit: dr, 134 | dataDir: c.String(DataDirFlag), 135 | proxy: c.String(HttpProxyFlag), 136 | ua: c.String(TorrentClientUserAgentFlag), 137 | dUTP: c.Bool(DisableUtpFlag), 138 | dWebTorrent: c.Bool(DisableWebTorrentFlag), 139 | establishedConnsPerTorrent: c.Int(EstablishedConnsPerTorrentFlag), 140 | halfOpenConnsPerTorrent: c.Int(HalfOpenConnsPerTorrentFlag), 141 | torrentPeersHighWater: c.Int(TorrentPeersHighWaterFlag), 142 | torrentPeersLowWater: c.Int(TorrentPeersLowWaterFlag), 143 | noUpload: c.Bool(NoUploadFlag), 144 | seed: c.Bool(SeedFlag), 145 | }, nil 146 | } 147 | 148 | func (s *TorrentClient) get() (*torrent.Client, error) { 149 | log.Infof("initializing TorrentClient dataDir=%v", s.dataDir) 150 | cfg := torrent.NewDefaultClientConfig() 151 | // cfg.DisableIPv6 = true 152 | cfg.Logger = tlog.Default.WithNames("main", "client") 153 | // cfg.Debug = true 154 | cfg.DefaultStorage = NewMMap(s.dataDir) 155 | if s.ua != "" { 156 | cfg.HTTPUserAgent = s.ua 157 | } 158 | cfg.NoUpload = s.noUpload 159 | cfg.Seed = s.seed 160 | cfg.DisableUTP = s.dUTP 161 | cfg.DisableWebtorrent = s.dWebTorrent 162 | if s.proxy != "" { 163 | u, err := url.Parse(s.proxy) 164 | if err != nil { 165 | return nil, errors.Wrapf(err, "failed to parse proxy u=%v", s.proxy) 166 | } 167 | cfg.HTTPProxy = http.ProxyURL(u) 168 | } 169 | if s.establishedConnsPerTorrent != 0 { 170 | cfg.EstablishedConnsPerTorrent = s.establishedConnsPerTorrent 171 | } 172 | if s.halfOpenConnsPerTorrent != 0 { 173 | cfg.HalfOpenConnsPerTorrent = s.halfOpenConnsPerTorrent 174 | } 175 | if s.torrentPeersHighWater != 0 { 176 | cfg.TorrentPeersHighWater = s.torrentPeersHighWater 177 | } 178 | if s.torrentPeersLowWater != 0 { 179 | cfg.TorrentPeersLowWater = s.torrentPeersLowWater 180 | } 181 | if s.rLimit != -1 { 182 | cfg.DownloadRateLimiter = rate.NewLimiter(rate.Limit(s.rLimit), int(s.rLimit)) 183 | } 184 | cl, err := torrent.NewClient(cfg) 185 | if err != nil { 186 | return nil, errors.Wrap(err, "failed to create new torrent client") 187 | } 188 | log.Infof("TorrentClient started") 189 | ticker := time.NewTicker(60 * time.Second) 190 | go func() { 191 | for { 192 | <-ticker.C 193 | if len(cl.Torrents()) != 0 { 194 | continue 195 | } 196 | s.mux.Lock() 197 | defer s.mux.Unlock() 198 | s.cl.Close() 199 | s.cl = nil 200 | s.inited = false 201 | ticker.Stop() 202 | log.Infof("closing TorrentClient") 203 | return 204 | } 205 | }() 206 | return cl, nil 207 | } 208 | 209 | func (s *TorrentClient) Get() (*torrent.Client, error) { 210 | s.mux.Lock() 211 | defer s.mux.Unlock() 212 | if s.inited { 213 | return s.cl, s.err 214 | } 215 | s.cl, s.err = s.get() 216 | s.inited = true 217 | return s.cl, s.err 218 | } 219 | 220 | func (s *TorrentClient) Close() { 221 | if s.cl != nil { 222 | log.Infof("closing TorrentClient") 223 | s.cl.Close() 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /server/services/torrent_map.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "github.com/prometheus/client_golang/prometheus" 5 | "sort" 6 | "sync" 7 | "time" 8 | 9 | "github.com/anacrolix/torrent" 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | //const ( 14 | // MagnetFlag = "magnet" 15 | //) 16 | 17 | //func RegisterTorrentMapFlags(f []cli.Flag) []cli.Flag { 18 | // return append(f, 19 | // cli.StringFlag{ 20 | // Name: MagnetFlag, 21 | // Usage: "magnet", 22 | // EnvVar: "MagnetFlag", 23 | // }, 24 | // ) 25 | //} 26 | 27 | var ( 28 | promActiveTorrentCount = prometheus.NewGauge(prometheus.GaugeOpts{ 29 | Name: "torrent_web_seeder_active_torrents_count", 30 | Help: "Web Seeder active torrents count", 31 | }) 32 | ) 33 | 34 | func init() { 35 | prometheus.MustRegister(promActiveTorrentCount) 36 | } 37 | 38 | type TorrentMap struct { 39 | tc *TorrentClient 40 | tsm *TorrentStoreMap 41 | fsm *FileStoreMap 42 | timers map[string]*time.Timer 43 | ttl time.Duration 44 | mux sync.Mutex 45 | } 46 | 47 | func NewTorrentMap(tc *TorrentClient, tsm *TorrentStoreMap, fsm *FileStoreMap) *TorrentMap { 48 | return &TorrentMap{ 49 | tc: tc, 50 | tsm: tsm, 51 | fsm: fsm, 52 | timers: map[string]*time.Timer{}, 53 | ttl: time.Duration(600) * time.Second, 54 | } 55 | } 56 | 57 | func (s *TorrentMap) Touch(h string) { 58 | s.mux.Lock() 59 | defer s.mux.Unlock() 60 | ti, ok := s.timers[h] 61 | if ok { 62 | ti.Reset(s.ttl) 63 | } 64 | } 65 | 66 | func (s *TorrentMap) Get(h string) (*torrent.Torrent, error) { 67 | s.mux.Lock() 68 | defer s.mux.Unlock() 69 | cl, err := s.tc.Get() 70 | if err != nil { 71 | return nil, err 72 | } 73 | var t *torrent.Torrent 74 | mi, err := s.fsm.Get(h) 75 | if err != nil { 76 | return nil, err 77 | } 78 | if mi == nil { 79 | mi, err = s.tsm.Get(h) 80 | if err != nil { 81 | return nil, err 82 | } 83 | } 84 | if mi == nil { 85 | return nil, nil 86 | 87 | } 88 | t, err = cl.AddTorrent(mi) 89 | if err != nil { 90 | return nil, err 91 | } 92 | ti, ok := s.timers[h] 93 | if ok { 94 | ti.Reset(s.ttl) 95 | } else { 96 | log.Infof("torrent added infohash=%v", h) 97 | promActiveTorrentCount.Inc() 98 | ti := time.NewTimer(s.ttl) 99 | s.timers[h] = ti 100 | go func(h string, ti *time.Timer) { 101 | <-ti.C 102 | s.mux.Lock() 103 | defer s.mux.Unlock() 104 | delete(s.timers, h) 105 | log.Infof("torrent dropped infohash=%v", h) 106 | t.Drop() 107 | promActiveTorrentCount.Dec() 108 | }(h, ti) 109 | } 110 | return t, nil 111 | } 112 | 113 | func (s *TorrentMap) List() ([]string, error) { 114 | r := map[string]bool{} 115 | l, err := s.fsm.List() 116 | if err != nil { 117 | return nil, err 118 | } 119 | for _, t := range l { 120 | r[t] = true 121 | } 122 | rr := []string{} 123 | for k := range r { 124 | rr = append(rr, k) 125 | } 126 | sort.Strings(rr) 127 | return rr, nil 128 | } 129 | -------------------------------------------------------------------------------- /server/services/torrent_store.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "fmt" 5 | "sync" 6 | 7 | "github.com/urfave/cli" 8 | 9 | "github.com/pkg/errors" 10 | log "github.com/sirupsen/logrus" 11 | ts "github.com/webtor-io/torrent-store/proto" 12 | "google.golang.org/grpc" 13 | "google.golang.org/grpc/credentials/insecure" 14 | ) 15 | 16 | type TorrentStore struct { 17 | cl ts.TorrentStoreClient 18 | host string 19 | port int 20 | conn *grpc.ClientConn 21 | mux sync.Mutex 22 | err error 23 | inited bool 24 | } 25 | 26 | const ( 27 | TorrentStoreHostFlag = "torrent-store-host" 28 | TorrentStorePortFlag = "torrent-store-port" 29 | ) 30 | 31 | func RegisterTorrentStoreFlags(f []cli.Flag) []cli.Flag { 32 | return append(f, 33 | cli.StringFlag{ 34 | Name: TorrentStoreHostFlag, 35 | Usage: "torrent store host", 36 | Value: "", 37 | EnvVar: "TORRENT_STORE_SERVICE_HOST, TORRENT_STORE_HOST", 38 | }, 39 | cli.IntFlag{ 40 | Name: TorrentStorePortFlag, 41 | Usage: "torrent store port", 42 | Value: 50051, 43 | EnvVar: "TORRENT_STORE_SERVICE_PORT, TORRENT_STORE_PORT", 44 | }, 45 | ) 46 | } 47 | 48 | func NewTorrentStore(c *cli.Context) *TorrentStore { 49 | return &TorrentStore{ 50 | host: c.String(TorrentStoreHostFlag), 51 | port: c.Int(TorrentStorePortFlag), 52 | } 53 | } 54 | 55 | func (s *TorrentStore) get() (ts.TorrentStoreClient, error) { 56 | log.Info("initializing TorrentStoreClient") 57 | addr := fmt.Sprintf("%s:%d", s.host, s.port) 58 | conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) 59 | s.conn = conn 60 | if err != nil { 61 | return nil, errors.Wrapf(err, "failed to dial torrent store addr=%v", addr) 62 | } 63 | return ts.NewTorrentStoreClient(s.conn), nil 64 | } 65 | 66 | func (s *TorrentStore) Get() (ts.TorrentStoreClient, error) { 67 | s.mux.Lock() 68 | defer s.mux.Unlock() 69 | if s.inited { 70 | return s.cl, s.err 71 | } 72 | s.cl, s.err = s.get() 73 | s.inited = true 74 | return s.cl, s.err 75 | } 76 | 77 | func (s *TorrentStore) Close() { 78 | if s.conn != nil { 79 | _ = s.conn.Close() 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /server/services/torrent_store_map.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "time" 7 | 8 | "github.com/anacrolix/torrent/metainfo" 9 | "github.com/pkg/errors" 10 | log "github.com/sirupsen/logrus" 11 | "github.com/webtor-io/lazymap" 12 | ts "github.com/webtor-io/torrent-store/proto" 13 | ) 14 | 15 | type TorrentStoreMap struct { 16 | lazymap.LazyMap[*metainfo.MetaInfo] 17 | ts *TorrentStore 18 | } 19 | 20 | func NewTorrentStoreMap(ts *TorrentStore) *TorrentStoreMap { 21 | return &TorrentStoreMap{ 22 | ts: ts, 23 | LazyMap: lazymap.New[*metainfo.MetaInfo](&lazymap.Config{ 24 | Capacity: 1000, 25 | }), 26 | } 27 | } 28 | 29 | func (s *TorrentStoreMap) get(h string) (*metainfo.MetaInfo, error) { 30 | c, err := s.ts.Get() 31 | if err != nil { 32 | return nil, errors.Wrap(err, "failed to get torrent store client") 33 | } 34 | ctx, cancel := context.WithTimeout(context.Background(), time.Minute) 35 | defer cancel() 36 | r, err := c.Pull(ctx, &ts.PullRequest{InfoHash: h}) 37 | if err != nil { 38 | return nil, errors.Wrap(err, "failed to pull torrent from the torrent store") 39 | } 40 | reader := bytes.NewReader(r.Torrent) 41 | mi, err := metainfo.Load(reader) 42 | if err != nil { 43 | return nil, errors.Wrap(err, "failed to parse torrent") 44 | } 45 | log.Info("torrent pulled successfully") 46 | return mi, nil 47 | } 48 | 49 | func (s *TorrentStoreMap) Get(h string) (*metainfo.MetaInfo, error) { 50 | return s.LazyMap.Get(h, func() (*metainfo.MetaInfo, error) { 51 | return s.get(h) 52 | }) 53 | } 54 | -------------------------------------------------------------------------------- /server/services/touch_map.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "os" 5 | "time" 6 | 7 | "github.com/urfave/cli" 8 | "github.com/webtor-io/lazymap" 9 | ) 10 | 11 | type TouchMap struct { 12 | lazymap.LazyMap[bool] 13 | p string 14 | } 15 | 16 | func NewTouchMap(c *cli.Context) *TouchMap { 17 | return &TouchMap{ 18 | p: c.String(DataDirFlag), 19 | LazyMap: lazymap.New[bool](&lazymap.Config{ 20 | Expire: 30 * time.Second, 21 | }), 22 | } 23 | } 24 | 25 | func (s *TouchMap) touch(h string) (bool, error) { 26 | dir, err := GetDir(s.p, h) 27 | if err != nil { 28 | return false, err 29 | } 30 | f := dir + ".touch" 31 | _, err = os.Stat(f) 32 | if os.IsNotExist(err) { 33 | file, err := os.Create(f) 34 | if err != nil { 35 | return false, err 36 | } 37 | defer func(file *os.File) { 38 | _ = file.Close() 39 | }(file) 40 | } else { 41 | currentTime := time.Now().Local() 42 | err = os.Chtimes(f, currentTime, currentTime) 43 | if err != nil { 44 | return false, err 45 | } 46 | } 47 | return true, nil 48 | } 49 | 50 | func (s *TouchMap) Touch(h string) (bool, error) { 51 | return s.LazyMap.Get(h, func() (bool, error) { 52 | return s.touch(h) 53 | }) 54 | } 55 | -------------------------------------------------------------------------------- /server/services/touch_writer.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "bufio" 5 | "github.com/pkg/errors" 6 | "net" 7 | "net/http" 8 | ) 9 | 10 | type TouchWriter struct { 11 | http.ResponseWriter 12 | tm *TorrentMap 13 | h string 14 | } 15 | 16 | func NewTouchWriter(w http.ResponseWriter, tm *TorrentMap, h string) *TouchWriter { 17 | return &TouchWriter{ 18 | ResponseWriter: w, 19 | tm: tm, 20 | h: h, 21 | } 22 | } 23 | 24 | func (w *TouchWriter) WriteHeader(statusCode int) { 25 | w.ResponseWriter.WriteHeader(statusCode) 26 | } 27 | 28 | func (w *TouchWriter) Write(p []byte) (int, error) { 29 | w.tm.Touch(w.h) 30 | return w.ResponseWriter.Write(p) 31 | } 32 | 33 | func (w *TouchWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) { 34 | h, ok := w.ResponseWriter.(http.Hijacker) 35 | if !ok { 36 | return nil, nil, errors.New("type assertion failed http.ResponseWriter not a http.Hijacker") 37 | } 38 | return h.Hijack() 39 | } 40 | 41 | func (w *TouchWriter) Flush() { 42 | f, ok := w.ResponseWriter.(http.Flusher) 43 | if !ok { 44 | return 45 | } 46 | 47 | f.Flush() 48 | } 49 | 50 | // Check interface implementations. 51 | var ( 52 | _ http.ResponseWriter = &TouchWriter{} 53 | _ http.Hijacker = &TouchWriter{} 54 | _ http.Flusher = &TouchWriter{} 55 | ) 56 | -------------------------------------------------------------------------------- /server/services/web.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | "net/http" 7 | "runtime/debug" 8 | 9 | logrusmiddleware "github.com/bakins/logrus-middleware" 10 | log "github.com/sirupsen/logrus" 11 | "github.com/urfave/cli" 12 | ) 13 | 14 | const ( 15 | WebHostFlag = "host" 16 | WebPortFlag = "port" 17 | ) 18 | 19 | func RegisterWebFlags(f []cli.Flag) []cli.Flag { 20 | return append(f, 21 | cli.StringFlag{ 22 | Name: WebHostFlag, 23 | Usage: "listening host", 24 | Value: "", 25 | EnvVar: "WEB_HOST", 26 | }, 27 | cli.IntFlag{ 28 | Name: WebPortFlag, 29 | Usage: "http listening port", 30 | Value: 8080, 31 | EnvVar: "WEB_PORT", 32 | }, 33 | ) 34 | } 35 | 36 | type Web struct { 37 | ws *WebSeeder 38 | host string 39 | port int 40 | ln net.Listener 41 | } 42 | 43 | func NewWeb(c *cli.Context, ws *WebSeeder) *Web { 44 | return &Web{ 45 | host: c.String(WebHostFlag), 46 | port: c.Int(WebPortFlag), 47 | ws: ws, 48 | } 49 | } 50 | 51 | // RecoverMiddleware is a middleware that recovers from panics and logs the error. 52 | func RecoverMiddleware(next http.Handler) http.Handler { 53 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 54 | defer func() { 55 | if err := recover(); err != nil { 56 | // Log the error and stack trace 57 | log.WithFields(log.Fields{ 58 | "error": fmt.Sprintf("%v", err), 59 | "stack": string(debug.Stack()), 60 | }).Error("Recovered from panic") 61 | 62 | // Return 500 Internal Server Error 63 | http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) 64 | } 65 | }() 66 | next.ServeHTTP(w, r) 67 | }) 68 | } 69 | 70 | func (s *Web) Serve() error { 71 | addr := fmt.Sprintf("%s:%d", s.host, s.port) 72 | ln, err := net.Listen("tcp", addr) 73 | if err != nil { 74 | return nil 75 | } 76 | s.ln = ln 77 | 78 | mux := http.NewServeMux() 79 | logger := log.New() 80 | l := logrusmiddleware.Middleware{ 81 | Logger: logger, 82 | } 83 | mux.Handle("/", l.Handler(RecoverMiddleware(s.ws), "")) 84 | log.Infof("serving Web at %v", fmt.Sprintf("%s:%d", s.host, s.port)) 85 | return http.Serve(s.ln, mux) 86 | 87 | } 88 | 89 | func (s *Web) Close() { 90 | if s.ln != nil { 91 | _ = s.ln.Close() 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /server/services/web_seeder.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "crypto/sha1" 5 | "fmt" 6 | "io" 7 | "net/http" 8 | "net/url" 9 | "os" 10 | "path/filepath" 11 | "regexp" 12 | "strings" 13 | "time" 14 | 15 | "github.com/anacrolix/torrent/bencode" 16 | 17 | log "github.com/sirupsen/logrus" 18 | ) 19 | 20 | var sha1R = regexp.MustCompile("^[0-9a-f]{5,40}$") 21 | 22 | const ( 23 | SourceTorrentPath = "source.torrent" 24 | ) 25 | 26 | type WebSeeder struct { 27 | tm *TorrentMap 28 | st *StatWeb 29 | fcm *FileCacheMap 30 | tom *TouchMap 31 | } 32 | 33 | func NewWebSeeder(tm *TorrentMap, fcm *FileCacheMap, tom *TouchMap, st *StatWeb) *WebSeeder { 34 | return &WebSeeder{ 35 | tm: tm, 36 | st: st, 37 | fcm: fcm, 38 | tom: tom, 39 | } 40 | } 41 | 42 | func (s *WebSeeder) renderTorrent(w http.ResponseWriter, h string) { 43 | log.Info("serve torrent") 44 | 45 | t, err := s.tm.Get(h) 46 | 47 | if err != nil { 48 | log.Error(err) 49 | http.Error(w, "failed to get torrent", http.StatusInternalServerError) 50 | return 51 | } 52 | w.Header().Set("Content-Type", "application/x-bittorrent") 53 | 54 | err = bencode.NewEncoder(w).Encode(t.Metainfo()) 55 | if err != nil { 56 | log.WithError(err).Error("failed to encode torrent") 57 | http.Error(w, "failed to encode torrent", http.StatusInternalServerError) 58 | return 59 | } 60 | } 61 | 62 | func (s *WebSeeder) addA(path string, w http.ResponseWriter, r *http.Request) { 63 | uHref := url.URL{ 64 | Path: path, 65 | RawQuery: r.URL.RawQuery, 66 | } 67 | uName := url.URL{ 68 | Path: path, 69 | } 70 | href := uHref.String() 71 | name := uName.String() 72 | _, _ = fmt.Fprintln(w, fmt.Sprintf("%s
", href, name)) 73 | } 74 | func (s *WebSeeder) addH(h string, w http.ResponseWriter) { 75 | _, _ = fmt.Fprintln(w, fmt.Sprintf("

%s

", h)) 76 | } 77 | 78 | func (s *WebSeeder) renderTorrentIndex(w http.ResponseWriter, r *http.Request, h string) { 79 | log.Info("Serve file index") 80 | 81 | t, err := s.tm.Get(h) 82 | 83 | if err != nil { 84 | log.Error(err) 85 | http.Error(w, "failed to get torrent", http.StatusInternalServerError) 86 | return 87 | } 88 | s.addH(h, w) 89 | s.addA("..", w, r) 90 | s.addA(SourceTorrentPath, w, r) 91 | for _, f := range t.Info().UpvertedFiles() { 92 | s.addA(strings.Join(append([]string{t.Info().Name}, f.Path...), "/"), w, r) 93 | } 94 | } 95 | 96 | func (s *WebSeeder) serveFile(w http.ResponseWriter, r *http.Request, h string, p string) { 97 | _, err := s.tom.Touch(h) 98 | if err != nil { 99 | log.Error(err) 100 | } 101 | 102 | _, download := r.URL.Query()["download"] 103 | 104 | logWIthField := log.WithFields(log.Fields{ 105 | "hash": h, 106 | "path": r.URL.Path, 107 | "method": r.Method, 108 | "remoteAddr": r.RemoteAddr, 109 | "download": download, 110 | "range": r.Header.Get("Range"), 111 | }) 112 | 113 | w, reader, err := s.getReader(w, h, p) 114 | if err != nil { 115 | log.WithError(err).Error("failed to get reader") 116 | http.Error(w, "failed to get reader", http.StatusInternalServerError) 117 | return 118 | } 119 | if reader == nil { 120 | logWIthField.Info("file not found") 121 | http.NotFound(w, r) 122 | return 123 | } 124 | defer func(reader io.ReadSeekCloser) { 125 | _ = reader.Close() 126 | }(reader) 127 | 128 | logWIthField.Info("serve file") 129 | if download { 130 | w.Header().Add("Content-Type", "application/octet-stream") 131 | w.Header().Add("Content-Disposition", "attachment; filename=\""+filepath.Base(p)+"\"") 132 | } 133 | if r.Header.Get("Origin") != "" { 134 | w.Header().Set("Access-Control-Allow-Credentials", "true") 135 | w.Header().Set("Access-Control-Allow-Origin", "*") 136 | } 137 | w.Header().Set("Last-Modified", time.Unix(0, 0).Format(http.TimeFormat)) 138 | w.Header().Set("Etag", fmt.Sprintf("\"%x\"", sha1.Sum([]byte(h+p)))) 139 | http.ServeContent(w, r, p, time.Unix(0, 0), reader) 140 | } 141 | 142 | func (s *WebSeeder) getReader(w http.ResponseWriter, h string, p string) (http.ResponseWriter, io.ReadSeekCloser, error) { 143 | cp, err := s.fcm.Get(h, p) 144 | if err != nil { 145 | return nil, nil, err 146 | } 147 | 148 | if cp != "" { 149 | return s.openCachedFile(w, cp) 150 | } 151 | 152 | return s.getTorrentReader(w, h, p) 153 | } 154 | 155 | func (s *WebSeeder) openCachedFile(w http.ResponseWriter, cp string) (http.ResponseWriter, io.ReadSeekCloser, error) { 156 | file, err := os.Open(cp) 157 | if err != nil { 158 | return w, nil, err 159 | } 160 | return w, file, nil 161 | } 162 | 163 | func (s *WebSeeder) getTorrentReader(w http.ResponseWriter, h string, p string) (http.ResponseWriter, io.ReadSeekCloser, error) { 164 | t, err := s.tm.Get(h) 165 | if err != nil { 166 | return w, nil, err 167 | } 168 | 169 | for _, f := range t.Files() { 170 | if f.Path() == p { 171 | torReader := f.NewReader() 172 | torReader.SetResponsive() 173 | return NewTouchWriter(w, s.tm, h), torReader, nil 174 | } 175 | } 176 | return w, nil, nil 177 | } 178 | 179 | func (s *WebSeeder) serveStats(w http.ResponseWriter, r *http.Request, h string, p string) { 180 | cp, err := s.fcm.Get(h, p) 181 | if err != nil { 182 | log.Error(err) 183 | http.Error(w, "failed to get torrent", http.StatusInternalServerError) 184 | return 185 | } 186 | if cp != "" { 187 | http.NotFound(w, r) 188 | return 189 | } 190 | err = s.st.Serve(w, r, h, p) 191 | if err != nil { 192 | log.Error(err) 193 | http.Error(w, err.Error(), http.StatusInternalServerError) 194 | return 195 | } 196 | } 197 | 198 | func (s *WebSeeder) getHash(r *http.Request) string { 199 | if r.Header.Get("X-Info-Hash") != "" { 200 | return r.Header.Get("X-Info-Hash") 201 | } 202 | parts := strings.Split(strings.Trim(r.URL.Path, "/"), "/") 203 | if len(parts) > 0 { 204 | p := parts[0] 205 | f := sha1R.Find([]byte(p)) 206 | if f != nil { 207 | return string(f) 208 | } 209 | } 210 | return "" 211 | } 212 | 213 | func (s *WebSeeder) renderIndex(w http.ResponseWriter, r *http.Request) { 214 | l, err := s.tm.List() 215 | if err != nil { 216 | log.Error(err) 217 | http.Error(w, err.Error(), http.StatusInternalServerError) 218 | return 219 | } 220 | s.addH("Index", w) 221 | for _, v := range l { 222 | s.addA(v+"/", w, r) 223 | } 224 | } 225 | 226 | func (s *WebSeeder) ServeHTTP(w http.ResponseWriter, r *http.Request) { 227 | h := s.getHash(r) 228 | if h == "" { 229 | s.renderIndex(w, r) 230 | } else { 231 | p := r.URL.Path[1:] 232 | p = strings.TrimPrefix(p, h+"/") 233 | if p == "" { 234 | s.renderTorrentIndex(w, r, h) 235 | } else if p == SourceTorrentPath { 236 | s.renderTorrent(w, s.getHash(r)) 237 | } else if _, ok := r.URL.Query()["stats"]; ok { 238 | s.serveStats(w, r, h, p) 239 | } else if _, ok := r.URL.Query()["done"]; ok { 240 | s.serveDone(w, r, h, p) 241 | } else { 242 | s.serveFile(w, r, s.getHash(r), p) 243 | } 244 | } 245 | } 246 | 247 | func (s *WebSeeder) serveDone(w http.ResponseWriter, r *http.Request, h string, p string) { 248 | cp, err := s.fcm.Get(h, p) 249 | if err != nil { 250 | log.Error(err) 251 | http.Error(w, "failed to get torrent", http.StatusInternalServerError) 252 | return 253 | } 254 | if cp != "" { 255 | return 256 | } else { 257 | http.NotFound(w, r) 258 | } 259 | } 260 | -------------------------------------------------------------------------------- /torrents/Sintel.torrent: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webtor-io/torrent-web-seeder/8dd2cda768940552eadb598f487c5d5230f78590/torrents/Sintel.torrent -------------------------------------------------------------------------------- /up.sh: -------------------------------------------------------------------------------- 1 | docker build . -t torrent-web-seeder:latest && 2 | telepresence --new-deployment torrent-web-seeder-debug --expose 8080 --expose 8081 --expose 50051 --docker-run -e INFO_HASH=08ada5a7a6183aae1e09d831df6748d566095a10 -p 8080:8080 -p 8081:8081 -p 50051:50051 -it torrent-web-seeder:latest 3 | --------------------------------------------------------------------------------