OSDN Git Service

Support mDNS LAN peer discover (#1687)
authoryahtoo <yahtoo.ma@gmail.com>
Mon, 15 Apr 2019 08:57:09 +0000 (16:57 +0800)
committerPaladz <yzhu101@uottawa.ca>
Mon, 15 Apr 2019 08:57:09 +0000 (16:57 +0800)
commit08fde427c7be4d48d29fbff0bb363604d874daa6
tree8ace8538575e58e870ef520884865ceeb8f3c78c
parent6cc273b9126f1df4406ed125a3fc506a00ead8c9
Support mDNS LAN peer discover (#1687)

* mv kad discover module to dht

* Add mdns function

* Add lan peer discover func

* Del unused files

* Add lib

* add test info

* Add debug info

* opz code format

* Add LAN peer field

* Del unused files

* Fix lib dependency error

* Change bestPeer logic preferred LAN peer

* Fix test file error

* Del unused file

* Del unused files

* del debug print

* Fix review bug

* change zeroconf lib directory

github.com/zeroconf->github.com/grandcat/zeroconf

* Fix review bugs

* Fix review bugs

* Fix review bugs
107 files changed:
crypto/ed25519/ed25519.go
netsync/peer.go
netsync/tool_test.go
p2p/defaults.go [new file with mode: 0644]
p2p/discover/dht/database.go [moved from p2p/discover/database.go with 99% similarity]
p2p/discover/dht/database_test.go [moved from p2p/discover/database_test.go with 99% similarity]
p2p/discover/dht/dns_seeds.go [moved from p2p/discover/dns_seeds.go with 98% similarity]
p2p/discover/dht/dns_seeds_test.go [moved from p2p/discover/dns_seeds_test.go with 99% similarity]
p2p/discover/dht/net.go [moved from p2p/discover/net.go with 99% similarity]
p2p/discover/dht/node.go [moved from p2p/discover/node.go with 99% similarity]
p2p/discover/dht/nodeevent_string.go [moved from p2p/discover/nodeevent_string.go with 97% similarity]
p2p/discover/dht/ntp.go [moved from p2p/discover/ntp.go with 99% similarity]
p2p/discover/dht/sim_run_test.go [moved from p2p/discover/sim_run_test.go with 99% similarity]
p2p/discover/dht/sim_testmain_test.go [moved from p2p/discover/sim_testmain_test.go with 98% similarity]
p2p/discover/dht/table.go [moved from p2p/discover/table.go with 99% similarity]
p2p/discover/dht/ticket.go [moved from p2p/discover/ticket.go with 99% similarity]
p2p/discover/dht/topic.go [moved from p2p/discover/topic.go with 99% similarity]
p2p/discover/dht/udp.go [moved from p2p/discover/udp.go with 99% similarity]
p2p/discover/mdns/lan_discover.go [new file with mode: 0644]
p2p/discover/mdns/lan_discover_test.go [new file with mode: 0644]
p2p/discover/mdns/mdns.go [new file with mode: 0644]
p2p/netaddress.go
p2p/peer.go
p2p/peer_test.go
p2p/switch.go
p2p/switch_test.go
p2p/test_util.go
vendor/github.com/cenkalti/backoff/LICENSE [new file with mode: 0644]
vendor/github.com/cenkalti/backoff/README.md [new file with mode: 0644]
vendor/github.com/cenkalti/backoff/backoff.go [new file with mode: 0644]
vendor/github.com/cenkalti/backoff/context.go [new file with mode: 0644]
vendor/github.com/cenkalti/backoff/exponential.go [new file with mode: 0644]
vendor/github.com/cenkalti/backoff/retry.go [new file with mode: 0644]
vendor/github.com/cenkalti/backoff/ticker.go [new file with mode: 0644]
vendor/github.com/cenkalti/backoff/tries.go [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/LICENSE [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/README.md [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/client.go [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/connection.go [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/doc.go [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/examples/proxyservice/.gitignore [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/examples/proxyservice/server.go [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/examples/register/.gitignore [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/examples/register/server.go [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/examples/resolv/.gitignore [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/examples/resolv/README.md [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/examples/resolv/client.go [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/server.go [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/service.go [new file with mode: 0644]
vendor/github.com/grandcat/zeroconf/utils.go [new file with mode: 0644]
vendor/github.com/miekg/dns/AUTHORS [new file with mode: 0644]
vendor/github.com/miekg/dns/CONTRIBUTORS [new file with mode: 0644]
vendor/github.com/miekg/dns/COPYRIGHT [new file with mode: 0644]
vendor/github.com/miekg/dns/Gopkg.lock [new file with mode: 0644]
vendor/github.com/miekg/dns/Gopkg.toml [new file with mode: 0644]
vendor/github.com/miekg/dns/LICENSE [new file with mode: 0644]
vendor/github.com/miekg/dns/Makefile.fuzz [new file with mode: 0644]
vendor/github.com/miekg/dns/Makefile.release [new file with mode: 0644]
vendor/github.com/miekg/dns/README.md [new file with mode: 0644]
vendor/github.com/miekg/dns/acceptfunc.go [new file with mode: 0644]
vendor/github.com/miekg/dns/client.go [new file with mode: 0644]
vendor/github.com/miekg/dns/clientconfig.go [new file with mode: 0644]
vendor/github.com/miekg/dns/dane.go [new file with mode: 0644]
vendor/github.com/miekg/dns/defaults.go [new file with mode: 0644]
vendor/github.com/miekg/dns/dns.go [new file with mode: 0644]
vendor/github.com/miekg/dns/dnssec.go [new file with mode: 0644]
vendor/github.com/miekg/dns/dnssec_keygen.go [new file with mode: 0644]
vendor/github.com/miekg/dns/dnssec_keyscan.go [new file with mode: 0644]
vendor/github.com/miekg/dns/dnssec_privkey.go [new file with mode: 0644]
vendor/github.com/miekg/dns/dnsutil/util.go [new file with mode: 0644]
vendor/github.com/miekg/dns/dnsutil/util_test.go [new file with mode: 0644]
vendor/github.com/miekg/dns/doc.go [new file with mode: 0644]
vendor/github.com/miekg/dns/duplicate.go [new file with mode: 0644]
vendor/github.com/miekg/dns/duplicate_generate.go [new file with mode: 0644]
vendor/github.com/miekg/dns/edns.go [new file with mode: 0644]
vendor/github.com/miekg/dns/format.go [new file with mode: 0644]
vendor/github.com/miekg/dns/fuzz.go [new file with mode: 0644]
vendor/github.com/miekg/dns/generate.go [new file with mode: 0644]
vendor/github.com/miekg/dns/labels.go [new file with mode: 0644]
vendor/github.com/miekg/dns/listen_go111.go [new file with mode: 0644]
vendor/github.com/miekg/dns/listen_go_not111.go [new file with mode: 0644]
vendor/github.com/miekg/dns/msg.go [new file with mode: 0644]
vendor/github.com/miekg/dns/msg_generate.go [new file with mode: 0644]
vendor/github.com/miekg/dns/msg_helpers.go [new file with mode: 0644]
vendor/github.com/miekg/dns/nsecx.go [new file with mode: 0644]
vendor/github.com/miekg/dns/privaterr.go [new file with mode: 0644]
vendor/github.com/miekg/dns/reverse.go [new file with mode: 0644]
vendor/github.com/miekg/dns/sanitize.go [new file with mode: 0644]
vendor/github.com/miekg/dns/scan.go [new file with mode: 0644]
vendor/github.com/miekg/dns/scan_rr.go [new file with mode: 0644]
vendor/github.com/miekg/dns/serve_mux.go [new file with mode: 0644]
vendor/github.com/miekg/dns/server.go [new file with mode: 0644]
vendor/github.com/miekg/dns/sig0.go [new file with mode: 0644]
vendor/github.com/miekg/dns/singleinflight.go [new file with mode: 0644]
vendor/github.com/miekg/dns/smimea.go [new file with mode: 0644]
vendor/github.com/miekg/dns/tlsa.go [new file with mode: 0644]
vendor/github.com/miekg/dns/tsig.go [new file with mode: 0644]
vendor/github.com/miekg/dns/types.go [new file with mode: 0644]
vendor/github.com/miekg/dns/types_generate.go [new file with mode: 0644]
vendor/github.com/miekg/dns/udp.go [new file with mode: 0644]
vendor/github.com/miekg/dns/udp_windows.go [new file with mode: 0644]
vendor/github.com/miekg/dns/update.go [new file with mode: 0644]
vendor/github.com/miekg/dns/version.go [new file with mode: 0644]
vendor/github.com/miekg/dns/xfr.go [new file with mode: 0644]
vendor/github.com/miekg/dns/zduplicate.go [new file with mode: 0644]
vendor/github.com/miekg/dns/zmsg.go [new file with mode: 0644]
vendor/github.com/miekg/dns/ztypes.go [new file with mode: 0644]