Giter VIP home page Giter VIP logo

dctoolkit's Introduction

dctoolkit

GoDoc Go Report Card Build Status

dctoolkit implements the client part of the Direct Connect peer-to-peer system (ADC and NMDC protocols) in the Go programming language. It includes:

  • a library, that allows the creation of clients capable of interacting with hubs and other clients;
  • a series of command line utilities that make use of the library.

Direct Connect is semi-centralized peer-to-peer system in which peers connect to servers (hubs) and exchange textual messages and files. Files are indexed by computing their Tiger Tree Hash (TTH), provided by users through their file list, and searchable on a hub-basis. There exist two variants, one based on the traditional NMDC protocol (NeoModus Direct Connect) and the other based on the newer ADC protocol (Advanced Direct Connect).

This project is based on the go-dc project, that provides a base layer for building DC-related software.

Features

  • ADC and NMDC transparent protocol support
  • Active and passive mode
  • Hub: connection with configurable try count, password authentication, keepalive, compression, encryption
  • Chat: bidirectional public and private chat
  • File search: by name or TTH, reply to requests
  • File download: by name or TTH, full or partial, on ram or disk, multiple in parallel, compression, encryption, configurable download slots, validation via TTH, client fingerprint validation
  • File upload: upload from personal share, asynchronous file indexing system, file list generation and serving, compression, encryption, configurable upload slots, tthl extension support, client fingerprint validation
  • Examples provided for every feature
  • Comprehensive test suite

Note: this project uses the rolling release development model, as it is used in a production environment which requires the latest updates. The public API may suffer minor changes. The master branch is to be considered stable.

Library

Installation

Go ≥ 1.11 is required. If modules are enabled (i.e. there's a go.mod file in your project folder), it is enough to write the library name in the import section of the source files that are referring to it. Go will take care of downloading the needed files:

import (
    dctk "github.com/gswly/dctoolkit"
)

If modules are not enabled, the library must be downloaded manually:

go get github.com/gswly/dctoolkit

Examples

Documentation

https://godoc.org/github.com/gswly/dctoolkit

Testing

If you want to edit this library and test the results, you can you automated tests through:

make test

Command-line utilities

Installation

Go ≥ 1.11 is required. Download, compile and install the binaries with a single command:

go get github.com/gswly/dctoolkit/cmd/...

Usage

dc-tth [<flags>] <filepath>

Compute the Tiger Tree Hash (TTH) of a given file.
dc-search --hub=HUB --nick=NICK [<flags>] <query>

Search files and directories by name in a given hub.
dc-download --hub=HUB --nick=NICK --outdir=OUTDIR [<flags>] <user> <fpath>

Download a file or a directory from a user in a given hub.
dc-share --hub=HUB --nick=NICK [<flags>] <share>

Share a directory in a given hub.

Links

Protocol references

Hubs

Clients

Other libraries

Inspired by

dctoolkit's People

Contributors

aler9 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.