Skip to content

Commit

Permalink
Add new model fields
Browse files Browse the repository at this point in the history
  • Loading branch information
fvanroie committed Nov 13, 2018
1 parent f146cd0 commit da54c0b
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 8 deletions.
8 changes: 8 additions & 0 deletions Classes/FreeRadius.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ public class User {
public bool enabled { get; set; }
public string ip { get; set; }
public PSObject ip6 { get; set; }
public string logintime { get; set; }
public int mikrotik_vlan_id_number { get; set; }
public int mikrotik_vlan_id_type { get; set; }
public string password { get; set; }
public Object route { get; set; }
public int sessionlimit_max_session_limit { get; set; }
public uint simuse { get; set; }
public string subnet { get; set; }
public string username { get; set; }
public uint vlan { get; set; }
Expand All @@ -60,11 +62,13 @@ public class User {
enabled = true;
ip = null;
ip6 = null;
logintime = null;
mikrotik_vlan_id_number = 0;
mikrotik_vlan_id_type = 0;
password = null;
route = null;
sessionlimit_max_session_limit = 0;
simuse = 0;
subnet = null;
username = null;
vlan = 0;
Expand All @@ -81,11 +85,13 @@ public class User {
byte Enabled,
string Ip,
PSObject Ip6,
string Logintime,
int Mikrotik_Vlan_Id_Number,
int Mikrotik_Vlan_Id_Type,
string Password,
Object Route,
int Sessionlimit_Max_Session_Limit,
uint Simuse,
string Subnet,
string Username,
uint Vlan,
Expand All @@ -100,11 +106,13 @@ int Wispr_Bw_Min_Up
enabled = (Enabled == 0) ? false : true;
ip = Ip;
ip6 = Ip6;
logintime = Logintime;
mikrotik_vlan_id_number = Mikrotik_Vlan_Id_Number;
mikrotik_vlan_id_type = Mikrotik_Vlan_Id_Type;
password = Password;
route = Route;
sessionlimit_max_session_limit = Sessionlimit_Max_Session_Limit;
simuse = Simuse;
subnet = Subnet;
username = Username;
vlan = Vlan;
Expand Down
48 changes: 48 additions & 0 deletions Classes/HAProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
namespace OPNsense.HAProxy.acls {
public class Acl {
#region Parameters
public PSObject allowedGroups { get; set; }
public PSObject allowedUsers { get; set; }
public string custom_acl { get; set; }
public string description { get; set; }
public PSObject expression { get; set; }
Expand Down Expand Up @@ -67,6 +69,8 @@ public class Acl {
#endregion Parameters

public Acl () {
allowedGroups = null;
allowedUsers = null;
custom_acl = null;
description = null;
expression = null;
Expand Down Expand Up @@ -130,6 +134,8 @@ public class Acl {
}

public Acl (
PSObject AllowedGroups,
PSObject AllowedUsers,
string Custom_Acl,
string Description,
PSObject Expression,
Expand Down Expand Up @@ -191,6 +197,8 @@ public class Acl {
string Url_Param_Value,
string Value
) {
allowedGroups = AllowedGroups;
allowedUsers = AllowedUsers;
custom_acl = Custom_Acl;
description = Description;
expression = Expression;
Expand Down Expand Up @@ -451,6 +459,9 @@ namespace OPNsense.HAProxy.backends {
public class Backend {
#region Parameters
public PSObject algorithm { get; set; }
public bool basicAuthEnabled { get; set; }
public PSObject basicAuthGroups { get; set; }
public PSObject basicAuthUsers { get; set; }
public string checkDownInterval { get; set; }
public string checkInterval { get; set; }
public string customOptions { get; set; }
Expand Down Expand Up @@ -496,6 +507,9 @@ public class Backend {

public Backend () {
algorithm = null;
basicAuthEnabled = true;
basicAuthGroups = null;
basicAuthUsers = null;
checkDownInterval = null;
checkInterval = null;
customOptions = null;
Expand Down Expand Up @@ -541,6 +555,9 @@ public class Backend {

public Backend (
PSObject Algorithm,
byte BasicAuthEnabled,
PSObject BasicAuthGroups,
PSObject BasicAuthUsers,
string CheckDownInterval,
string CheckInterval,
string CustomOptions,
Expand Down Expand Up @@ -584,6 +601,9 @@ public class Backend {
string Tuning_TimeoutServer
) {
algorithm = Algorithm;
basicAuthEnabled = (BasicAuthEnabled == 0) ? false : true;
basicAuthGroups = BasicAuthGroups;
basicAuthUsers = BasicAuthUsers;
checkDownInterval = CheckDownInterval;
checkInterval = CheckInterval;
customOptions = CustomOptions;
Expand Down Expand Up @@ -664,6 +684,9 @@ string Name
namespace OPNsense.HAProxy.frontends {
public class Frontend {
#region Parameters
public bool basicAuthEnabled { get; set; }
public PSObject basicAuthGroups { get; set; }
public PSObject basicAuthUsers { get; set; }
public Object bind { get; set; }
public string bindOptions { get; set; }
public PSObject connectionBehaviour { get; set; }
Expand All @@ -686,6 +709,10 @@ public class Frontend {
public PSObject ssl_bindOptions { get; set; }
public PSObject ssl_certificates { get; set; }
public string ssl_cipherList { get; set; }
public PSObject ssl_clientAuthCAs { get; set; }
public PSObject ssl_clientAuthCRLs { get; set; }
public bool ssl_clientAuthEnabled { get; set; }
public PSObject ssl_clientAuthVerify { get; set; }
public string ssl_customOptions { get; set; }
public PSObject ssl_default_certificate { get; set; }
public bool ssl_enabled { get; set; }
Expand Down Expand Up @@ -713,6 +740,9 @@ public class Frontend {
#endregion Parameters

public Frontend () {
basicAuthEnabled = true;
basicAuthGroups = null;
basicAuthUsers = null;
bind = null;
bindOptions = null;
connectionBehaviour = null;
Expand All @@ -735,6 +765,10 @@ public class Frontend {
ssl_bindOptions = null;
ssl_certificates = null;
ssl_cipherList = "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256";
ssl_clientAuthCAs = null;
ssl_clientAuthCRLs = null;
ssl_clientAuthEnabled = true;
ssl_clientAuthVerify = null;
ssl_customOptions = null;
ssl_default_certificate = null;
ssl_enabled = true;
Expand Down Expand Up @@ -762,6 +796,9 @@ public class Frontend {
}

public Frontend (
byte BasicAuthEnabled,
PSObject BasicAuthGroups,
PSObject BasicAuthUsers,
Object Bind,
string BindOptions,
PSObject ConnectionBehaviour,
Expand All @@ -784,6 +821,10 @@ public class Frontend {
PSObject Ssl_BindOptions,
PSObject Ssl_Certificates,
string Ssl_CipherList,
PSObject Ssl_ClientAuthCAs,
PSObject Ssl_ClientAuthCRLs,
byte Ssl_ClientAuthEnabled,
PSObject Ssl_ClientAuthVerify,
string Ssl_CustomOptions,
PSObject Ssl_Default_Certificate,
byte Ssl_Enabled,
Expand All @@ -809,6 +850,9 @@ public class Frontend {
string Tuning_TimeoutHttpKeepAlive,
string Tuning_TimeoutHttpReq
) {
basicAuthEnabled = (BasicAuthEnabled == 0) ? false : true;
basicAuthGroups = BasicAuthGroups;
basicAuthUsers = BasicAuthUsers;
bind = Bind;
bindOptions = BindOptions;
connectionBehaviour = ConnectionBehaviour;
Expand All @@ -831,6 +875,10 @@ string Tuning_TimeoutHttpReq
ssl_bindOptions = Ssl_BindOptions;
ssl_certificates = Ssl_Certificates;
ssl_cipherList = Ssl_CipherList;
ssl_clientAuthCAs = Ssl_ClientAuthCAs;
ssl_clientAuthCRLs = Ssl_ClientAuthCRLs;
ssl_clientAuthEnabled = (Ssl_ClientAuthEnabled == 0) ? false : true;
ssl_clientAuthVerify = Ssl_ClientAuthVerify;
ssl_customOptions = Ssl_CustomOptions;
ssl_default_certificate = Ssl_Default_Certificate;
ssl_enabled = (Ssl_Enabled == 0) ? false : true;
Expand Down
8 changes: 0 additions & 8 deletions Classes/IDS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public class Rule {
public PSObject destination { get; set; }
public bool enabled { get; set; }
public string fingerprint { get; set; }
public PSObject geoip { get; set; }
public PSObject geoip_direction { get; set; }
public PSObject source { get; set; }
#endregion Parameters

Expand All @@ -45,8 +43,6 @@ public class Rule {
destination = null;
enabled = true;
fingerprint = null;
geoip = null;
geoip_direction = null;
source = null;
}

Expand All @@ -56,17 +52,13 @@ public class Rule {
PSObject Destination,
byte Enabled,
string Fingerprint,
PSObject Geoip,
PSObject Geoip_Direction,
PSObject Source
) {
action = Action;
description = Description;
destination = Destination;
enabled = (Enabled == 0) ? false : true;
fingerprint = Fingerprint;
geoip = Geoip;
geoip_direction = Geoip_Direction;
source = Source;
}
}
Expand Down
4 changes: 4 additions & 0 deletions Classes/Quagga.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ namespace OPNsense.quagga.ospf.interfaces {
public class Interface {
#region Parameters
public string authkey { get; set; }
public uint authkey_id { get; set; }
public PSObject authtype { get; set; }
public uint cost { get; set; }
public uint deadinterval { get; set; }
Expand All @@ -228,6 +229,7 @@ public class Interface {

public Interface () {
authkey = null;
authkey_id = 1;
authtype = null;
cost = 0;
deadinterval = 0;
Expand All @@ -242,6 +244,7 @@ public class Interface {

public Interface (
string Authkey,
uint Authkey_Id,
PSObject Authtype,
uint Cost,
uint Deadinterval,
Expand All @@ -254,6 +257,7 @@ public class Interface {
uint Transmitdelay
) {
authkey = Authkey;
authkey_id = Authkey_Id;
authtype = Authtype;
cost = Cost;
deadinterval = Deadinterval;
Expand Down

0 comments on commit da54c0b

Please sign in to comment.