Add support for FNE UDP AES; cleanup codeplug

pull/1/head
firealarmss 11 months ago
parent ab81d7d728
commit b9e61d58fb

@ -30,11 +30,14 @@ namespace DVMConsole
public class System public class System
{ {
public string Name { get; set; } public string Name { get; set; }
public string Identity { get; set; }
public string Address { get; set; } public string Address { get; set; }
public string Password { get; set; }
public string PresharedKey { get; set; }
public bool Encrypted { get; set; }
public uint PeerId { get; set; } public uint PeerId { get; set; }
public int Port { get; set; } public int Port { get; set; }
public string Rid { get; set; } public string Rid { get; set; }
public string AuthKey { get; set; }
public string AliasPath { get; set; } = "./alias.yml"; public string AliasPath { get; set; } = "./alias.yml";
public List<RadioAlias> RidAlias { get; set; } = null; public List<RadioAlias> RidAlias { get; set; } = null;

@ -44,7 +44,6 @@ namespace DVMConsole
private static FnePeer Create(Codeplug.System system) private static FnePeer Create(Codeplug.System system)
{ {
IPEndPoint endpoint = new IPEndPoint(IPAddress.Any, system.Port); IPEndPoint endpoint = new IPEndPoint(IPAddress.Any, system.Port);
string presharedKey = null;
if (system.Address == null) if (system.Address == null)
throw new NullReferenceException("address"); throw new NullReferenceException("address");
@ -63,17 +62,19 @@ namespace DVMConsole
endpoint = new IPEndPoint(addresses[0], system.Port); endpoint = new IPEndPoint(addresses[0], system.Port);
} }
FnePeer peer = new FnePeer("DVMCONSOLE", system.PeerId, endpoint, presharedKey); string key = system.Encrypted ? system.PresharedKey : null;
FnePeer peer = new FnePeer("DVMCONSOLE", system.PeerId, endpoint, key);
// set configuration parameters // set configuration parameters
peer.Passphrase = system.AuthKey; peer.Passphrase = system.Password;
peer.Information = new PeerInformation peer.Information = new PeerInformation
{ {
Details = new PeerDetails Details = new PeerDetails
{ {
ConventionalPeer = true, ConventionalPeer = true,
Software = "DVMCONSOLE", Software = "DVMCONSOLE",
Identity = "CONS OP" // TODO: Add to config Identity = system.Identity
} }
}; };

@ -1,20 +1,42 @@
# List of FNE master instances to connect to
systems: systems:
# Textual name for internal and external reference to this system
- name: "System 1" - name: "System 1"
# Textual name to idenitify this peer in the FNE
Identity: "CONS OP1"
# FNE Address
address: "localhost" address: "localhost"
# FNE Port
port: 3001 port: 3001
authKey: "RPT_PASSWORD" # Peer ID for FNE
peerId: 1234567 peerId: 1234567
# Radio ID transmitted traffic will come from
rid: "12345" rid: "12345"
# FNE Password
password: "RPT_PASSWORD"
# FNE Encrypted flag
encrypted: false
# Preshared FNE encryption key
presharedKey: "123ABC1234"
# List of Zones
zones: zones:
# Textual name of the zone
- name: "Zone 1" - name: "Zone 1"
# List of channels
channels: channels:
# Textual name of channel
- name: "Channel 1" - name: "Channel 1"
# System name this channel is linked to
system: "System 1" system: "System 1"
# Talkgroup Id to send and receive traffic
tgid: "2001" tgid: "2001"
# Encryption Key Id (If 0 or blank, will be assumed clear)
keyId: 0x50 keyId: 0x50
algoId: 0xaa # 0xAA or 0x84 (RC4 or AES) # Algorithm Id 0xAA or 0x84 (RC4 or AES) (If 0 or blank, will be assumed clear)
encryptionKey: null # Ignored now, we use dvmfne KMM support algoId: 0xaa
# Ignored now, we use dvmfne KMM support (This will be used in the future to ovveride FNE KMM support)
encryptionKey: null
- name: "Channel 2" - name: "Channel 2"
system: "System 1" system: "System 1"
tgid: "15002" tgid: "15002"

Loading…
Cancel
Save

Powered by TurnKey Linux.