camouflagetorrentclients

package module
v0.0.0-...-2643317 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2025 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Camouflage Torrent Clients

This project provides utilities to modify anacrolix/torrent client requests, making them appear as if they originate from a different torrent client software. This can be useful for bypassing certain tracker restrictions or for privacy reasons.

Usage

cfg := torrent.NewDefaultClientConfig()

d := NewDirectors(transmission.New())
cfg.HttpRequestDirector = d.ChangeHttpRequest

c, err := torrent.NewClient(cfg)

Purpose

The primary goal is to "camouflage" the identity of the torrent client being used by altering the parameters sent in tracker announce requests.

Current Features

  • Transmission Camouflage: Currently, the project supports modifying requests to mimic the popular Transmission client.

How it Works (Conceptual)

The core logic intercepts outgoing tracker requests and replaces specific arguments (like peer_id, key, and potentially user-agent headers) with values typically associated with the target client (e.g., Transmission).

Future Development

  • Support for mimicking other clients (e.g., qBittorrent, uTorrent).
  • More sophisticated camouflage techniques.

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.

License

This project is licensed under Apache 2.0.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnounceLog

type AnnounceLog struct{}

func (*AnnounceLog) ChangeHttpRequest

func (a *AnnounceLog) ChangeHttpRequest(req *http.Request) error

type Directors

type Directors struct {
	// contains filtered or unexported fields
}

Directors holds a list of HttpRequestDirector implementations.

func NewDirectors

func NewDirectors(directors ...HttpRequestDirector) *Directors

NewDirectors creates a new Directors instance with the given directors.

func (*Directors) ChangeHttpRequest

func (d *Directors) ChangeHttpRequest(req *http.Request) error

ChangeHttpRequest iterates through the list of directors and calls their ChangeHttpRequest method on the provided request. It stops and returns the error if any director returns an error.

type HttpRequestDirector

type HttpRequestDirector interface {
	// ChangeHttpRequest modifies the given HTTP request.
	// It returns an error if the modification fails.
	ChangeHttpRequest(*http.Request) error
}

HttpRequestDirector defines an interface for modifying HTTP requests.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL