go-btc-xray

command module
v0.0.0-...-6348706 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 13 Imported by: 0

README

Bitcoin nodes scanner Go Go Report Card



xray is a tool for scanning bitcoin network



Features

- resolves seed nodes via DNS, 
- connects to nodes, performs handshake dance (version, verack, ping), 
- retrieves more node addresses from peers, 
- good nodes are saved to json file

Run

go build -o xray

./xray

or to run with some envs

TESTNET=1 CONN=1 GUI=0 ./xray 

Environment variables

GUI=0 - disables GUI (by default GUI is enabled)

TESTNET=1 - enables testnet network (by default mainnet is used)

DEBUG=1 - enables debug mode logging (by default logging level is info + limit connections)

DRY_RUN=1 - disables RPC client for debugging other stuff

GUI_MEM=1 - display memory usage in gui instead of messages

CONN=42 - overwrite maximum number of connections (by default debug 50, with debug=1 10)

Protocol docs

https://en.bitcoin.it/wiki/Protocol_documentation

TODO

  • add a timer
  • DB
  • API server
  • download blocks
  • resolve seed nodes via dns
  • connect to nodes
  • do handshake (version, verack, ping)
  • get addr from peer
  • update and store peers
  • CLI GUI
  • gracefull shutdown
  • add msg window in gui
 __  __     ______     ______     __  __    
/\_\_\_\   /\  == \   /\  __ \   /\ \_\ \   
\/_/\_\/_  \ \  __<   \ \  __ \  \ \____ \  
  /\_\/\_\  \ \_\ \_\  \ \_\ \_\  \/\_____\ 
  \/_/\/_/   \/_/ /_/   \/_/\/_/   \/_____/ 
   bitcoin peers scanner

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
client
Client managing and connecting to a list of Bitcoin nodes.
Client managing and connecting to a list of Bitcoin nodes.
cmd
dns
resolve seed nodes via dns
resolve seed nodes via dns
gui
logger
custom logger accepts guiCh channel to send logs to the user interface
custom logger accepts guiCh channel to send logs to the user interface

Jump to

Keyboard shortcuts

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