Skip to content

1F47E/go-btc-xray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

bitcoin nodes scanner CLI with GUI (WIP)

Resources

License

Stars

Watchers

Forks

Languages