diodechain / diode_client

Diode client written in GO that runs the Blockquick™ algorithm and a socks server to transmit data through diodechain.
https://diode.io/download
Other
65 stars 23 forks source link

Add fetch command template #86

Closed sc0Vu closed 3 years ago

sc0Vu commented 3 years ago

TODO:

http cookies (file/string)

-header "cookie: csrf=abcdefg;"
sc0Vu commented 3 years ago

The -verbose output looks like:

$ ./diode -dbpath=../db/priv.db fetch -method get -url http://pi-peter.diode.link/ -verbose
INFO Diode Client version : development                               
INFO Client address       : 0x49c1d58001c3109c0a4ad7cab3b84b2ef5d0b431
INFO Fleet address        : 0x6000000000000000000000000000000000000000
INFO Connected to host: as1.prenet.diode.io:41046, validating...
ERROR Failed to connect to: us2.prenet.diode.io:41046 (dial tcp 45.79.132.11:41046: connect: connection refused)
INFO Retry to connect to us2.prenet.diode.io:41046 (1/3), waiting 1s
INFO Network is validated, last valid block: 1370130 0x00000f34a3638b76d66fc1706eafac9e6b677ab3ee5760902296383821f8b006
INFO Resolving BNS: pi-peter server=as1.prenet.diode.io:41046 
INFO Retry to connect to us2.prenet.diode.io:41046 (2/3), waiting 1.897422278s
Found device 0x13ac4c74416ed3f59bd9d7dfca79326819631093 connected to 0x68e0bafdda9ef323f692fc080d612718c941d120
Connected to 0x13ac4c74416ed3f59bd9d7dfca79326819631093 80
Start E2E handshake to 0x13ac4c74416ed3f59bd9d7dfca79326819631093
Finish E2E handshake to 0x13ac4c74416ed3f59bd9d7dfca79326819631093
GET / HTTP/1.1
Host: pi-peter.diode.link
User-Agent: Go-http-client/1.1
Accept-Encoding: gzip

<!DOCTYPE html>
<html lang="en">
<head>
More content below......