lan discovery will be done soon

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2021-12-19 19:58:08 +08:00
parent bcbe9ccbe5
commit 5682b088de
11 changed files with 254 additions and 31 deletions

View File

@@ -8,3 +8,8 @@ message Discovery {
/// response port for current listening port(udp for now)
int32 port = 2;
}
message DiscoveryBack {
string id = 1;
base.PeerInfo peer = 2;
}

View File

@@ -55,6 +55,8 @@ pub const RENDEZVOUS_SERVERS: &'static [&'static str] = &[
pub const RENDEZVOUS_PORT: i32 = 21116;
pub const RELAY_PORT: i32 = 21117;
pub const SERVER_UDP_PORT: u16 = 21001; // udp
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
pub struct Config {
#[serde(default)]