-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTODO
46 lines (45 loc) · 2.32 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[x] agent/server STUN hole punching
[x] create bittorrent file from given binary file
[x] http on unix socket so that a user can
[x] submit a new update
[x] query overlay's peers (session-table)
[x] gossip protocol over UDP multicast
[x] send torrent-file from one to another peer
[x] multicast torrent-file
[x] re-multicast newer torrent-file
[x] start bittorrent seeding to serve update file
[x] start bittorrent download/seeding when it receives a new update notification
[x] update metadata file must have path of 'metadata/<uuid>-v<version>'
[x] save update metadata when its state changed
[x] delete older version of update
[x] load updates from local database when starting the agent
[x] allow `admin` command to submit update from any working directory
[x] copy the update file to agent's `data/` directory
[x] use format `<uuid>-v<version>-<original-filename>` as the new name of update file
[x] modify torrent-file to apply above format
[x] allow proxy mode -- the agent will not deploy the update on local node
[x] probe available port at NAT router before starting torrent client
- see https://github.com/anacrolix/torrent/blob/5a7c4fc135eda0996079a46b43bc0ee8116d7093/portfwd.go#L12
- the port can be picked randomly (between 50000 - 60000)
[x] the agent sends the port used by BitTorrent to the server
[x] the server advertises session-table with BitTorrent ports
[?] if the update file is a directory, then execute `<dir>/main.sh`
[x] implement fallback to TCP when UDP does not work e.g. DCS firewall
[ ] enable multiple servers -- this allows an agent to join two difference clusters
[x] test bittorrent on node behind DCS network
[x] auto-detect internal IP address (see: https://golang.org/pkg/net/#DialIP)
[x] specify network interface to use
[x] NoUDP option in config -- if true then overlay and torrent-DHT will be deactivated
[ ] use STUN discovery to auto enabled/disabled overlay
see:
- RFC 3489 and RFC 5389
- https://github.com/ccding/go-stun/blob/master/stun/discover.go
[ ] peer lifetime in session table, delete the entry if it expires
[x] APK package:
- stop service before upgrade
- start service after upgrade if it was running before
[x] GET /overlay - return the overlay's id, state, address, and port
Legends:
[x] implemented
[?] implemented but not tested
[ ] not implemented