We're updating the issue view to help you get more done. 

Update JSON data structures sent to the dashboard

Description

The main JSON structure sent to the proxy is the following:

1 2 3 4 5 6 7 8 9 10 11 12 pub struct LogEntry { peer_requester: Peer, peer_responder: Peer, udp_hole_punch_result: NatTraversalResult, tcp_hole_punch_result: NatTraversalResult, is_direct_successful: bool, } pub enum NatTraversalResult { Failed, Succeeded, }

Notice that is_direct_successful: bool has been be added.
It will be represented as-is in JSON (i.e. just is_direct_sucessful: true/false).

And the Peer struct is now defined as follows:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 pub struct Peer { pub id: [u8; 32], pub name: Option<String>, pub ip: Ipv4Addr, pub nat_type: NatType, pub os: String, } pub enum NatType { Unknown, None, EIM, EDM, }

The changes here are:

  1. Added id and name fields.

  2. In JSON it will be represented as an array for ID (id: [1, 2, 3, ...]) and for name it's either null (when a user didn't set their name) or a string (name: "Abc").

  3. The EDMRandomPorts NAT type has been removed.

Environment

None

Status

Assignee

Nikita Baksalyar

Reporter

Nikita Baksalyar

Labels

None

External issue URL

None

External issue ID

None

Start date

2018/10/22

End date

2018/10/23

Task progress

None

Baseline start date

None

Baseline end date

None

Story Points

1

Components

Priority

Minor