mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-06 00:00:03 +08:00
Add support to option "dhcp-option" in ovpn file
This commit is contained in:
@@ -663,6 +663,14 @@ namespace openvpn {
|
||||
se.friendlyName = i->friendlyName;
|
||||
eval.serverList.push_back(se);
|
||||
}
|
||||
// Added by Dener Araújo - 2020-09-06
|
||||
for (ParseClientConfig::DhcpOptionList::const_iterator i = cc.dhcpOptionList().begin(); i != cc.dhcpOptionList().end(); ++i)
|
||||
{
|
||||
DhcpOptionEntry de;
|
||||
de.type = i->type;
|
||||
de.address = i->address;
|
||||
eval.dhcpOptionList.push_back(de);
|
||||
}
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
|
||||
@@ -47,6 +47,15 @@ namespace openvpn {
|
||||
std::string friendlyName;
|
||||
};
|
||||
|
||||
// Added by Dener Araújo - 2020-09-06
|
||||
// Represents an "dhcp-option" with its type (DNS, WINS, etc) and its address
|
||||
// (client reads)
|
||||
struct DhcpOptionEntry
|
||||
{
|
||||
std::string type;
|
||||
std::string address;
|
||||
};
|
||||
|
||||
// return properties of config
|
||||
// (client reads)
|
||||
struct EvalConfig
|
||||
@@ -91,6 +100,10 @@ namespace openvpn {
|
||||
|
||||
// optional list of user-selectable VPN servers
|
||||
std::vector<ServerEntry> serverList;
|
||||
|
||||
// Added by Dener Araújo - 2020-09-06
|
||||
// optional list of "dhcp-option"
|
||||
std::vector<DhcpOptionEntry> dhcpOptionList;
|
||||
};
|
||||
|
||||
// used to pass credentials to VPN core
|
||||
|
||||
Reference in New Issue
Block a user