Giter VIP home page Giter VIP logo

gdht's Introduction

gDHT

A distributed self-host DHT torrent search suite

demo site: guo.sh

Introduction

gDHT is a search engine suite that allows user to host their own torrent search engine. There are four major components of the suite: crawler, server, ElasticSearch, and web. The distributed crawler will monitor the traffic on DHT network to collect meta information of the torrent and then sent collected information to server via gRPC. Upon on receiving the information, the server will push them into Redis message queue and asynchronously process (Ex. filter unwanted torrent) and index them into ElasticSearch. Finally, you can search the torrent information at the React web interface.

Getting Started

Nginx

The nginx server is bound to YOURDOMAIN.COM by default. If you want to host your own torrent search engine, your can change Nginx's environment variable URL in docker-compose.yml.

Golang Crawler

You can leave the setting in docker-compose.yml unchanged if you run the suite with only one crawler. However, to add additional crawler to the system, change environment variable address under crawler to master-server-ip-address:50051.

ElasticSearch Security

The security features of the ElasticSearch is enabled by default. To ensure that crawler and web function normally, you need to create two user: web and crawler. Notice that crawler must have permission to write and read index and web must have permission to read index. Once you created those two users, you can pass the username and password to Golang crawler via the environment variables in docker-compose.yml. To pass username and password of web to web, change REACT_APP_USERNAME and REACT_APP_PASSWORD under web/src/.env. For more information on how to set up ElasticSearch, check those two articles Configuring security in Elasticsearchedit and Getting started with Elasticsearch security.

Then, start the server by

docker-compose build
docker-compose up

Acknowledge

DHT crawler from shiyanhui

Web CSS theme from Tania Rascia

gdht's People

Contributors

olament avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gdht's Issues

failed to build

=> ERROR [builder 7/7] RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go buil 2.4s

[builder 7/7] RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build:
#11 1.649 /go/pkg/mod/google.golang.org/[email protected]/internal/channelz/types_linux.go:26:2: missing go.sum entry for module providing package golang.org/x/sys/unix (imported by google.golang.org/grpc/internal/channelz); to add:
#11 1.649 go get google.golang.org/grpc/internal/[email protected]


ERROR: Service 'server' failed to build

Build error

DEBIAN 9
root@lamp ~/gdht/gDHT# uname -r 4.9.0-12-amd64

error:
Step 8/12 : RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ---> Running in c26e86e0b7d6 /go/pkg/mod/google.golang.org/[email protected]/internal/channelz/types_linux.go:26:2: missing go.sum entry for module providing package golang.org/x/sys/unix (imported by google.golang.org/grpc/internal/channelz); to add: go get google.golang.org/grpc/internal/[email protected] ERROR: Service 'server' failed to build: The command '/bin/sh -c CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build' returned a non-zero code: 1

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.