-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for >REMOTE/remote interaction added
- Loading branch information
Showing
8 changed files
with
177 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
eduOpenVPN - OpenVPN Management Library for eduVPN (and beyond) | ||
Copyright: 2017, The Commons Conservancy eduVPN Programme | ||
SPDX-License-Identifier: GPL-3.0+ | ||
*/ | ||
|
||
namespace eduOpenVPN.Management | ||
{ | ||
/// <summary> | ||
/// OpenVPN Management session remote "ACCEPT" command action | ||
/// </summary> | ||
public class RemoteAcceptAction : RemoteAction | ||
{ | ||
#region Methods | ||
|
||
public override string ToString() | ||
{ | ||
return "ACCEPT"; | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
eduOpenVPN - OpenVPN Management Library for eduVPN (and beyond) | ||
Copyright: 2017, The Commons Conservancy eduVPN Programme | ||
SPDX-License-Identifier: GPL-3.0+ | ||
*/ | ||
|
||
namespace eduOpenVPN.Management | ||
{ | ||
/// <summary> | ||
/// OpenVPN Management session "remote" command action base class | ||
/// </summary> | ||
public class RemoteAction | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
eduOpenVPN - OpenVPN Management Library for eduVPN (and beyond) | ||
Copyright: 2017, The Commons Conservancy eduVPN Programme | ||
SPDX-License-Identifier: GPL-3.0+ | ||
*/ | ||
|
||
namespace eduOpenVPN.Management | ||
{ | ||
/// <summary> | ||
/// OpenVPN Management session remote "MOD" command action | ||
/// </summary> | ||
public class RemoteModAction : RemoteAction | ||
{ | ||
#region Properties | ||
|
||
/// <summary> | ||
/// Hostname or IP address | ||
/// </summary> | ||
public string Host { get; } | ||
|
||
/// <summary> | ||
/// IP port | ||
/// </summary> | ||
public int Port { get; } | ||
|
||
#endregion | ||
|
||
#region Constructors | ||
|
||
/// <summary> | ||
/// Constructs a command action | ||
/// </summary> | ||
/// <param name="host">Hostname or IP address</param> | ||
/// <param name="port">IP port</param> | ||
public RemoteModAction(string host, int port) | ||
{ | ||
Host = host; | ||
Port = port; | ||
} | ||
|
||
#endregion | ||
|
||
#region Methods | ||
|
||
public override string ToString() | ||
{ | ||
return string.Format("MOD {0} {1:D}", Configuration.EscapeParamValue(Host), Port); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
eduOpenVPN - OpenVPN Management Library for eduVPN (and beyond) | ||
Copyright: 2017, The Commons Conservancy eduVPN Programme | ||
SPDX-License-Identifier: GPL-3.0+ | ||
*/ | ||
|
||
namespace eduOpenVPN.Management | ||
{ | ||
/// <summary> | ||
/// OpenVPN Management session remote "SKIP" command action | ||
/// </summary> | ||
public class RemoteSkipAction : RemoteAction | ||
{ | ||
#region Methods | ||
|
||
public override string ToString() | ||
{ | ||
return "SKIP"; | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
eduOpenVPN - OpenVPN Management Library for eduVPN (and beyond) | ||
Copyright: 2017, The Commons Conservancy eduVPN Programme | ||
SPDX-License-Identifier: GPL-3.0+ | ||
*/ | ||
|
||
namespace eduOpenVPN | ||
{ | ||
public enum ProtoType | ||
{ | ||
/// <summary> | ||
/// UDP | ||
/// </summary> | ||
[ParameterValue("udp")] | ||
UDP = 0, | ||
|
||
/// <summary> | ||
/// TCP client | ||
/// </summary> | ||
[ParameterValue("tcp-client")] | ||
TCPClient, | ||
|
||
/// <summary> | ||
/// TCP server | ||
/// </summary> | ||
[ParameterValue("tcp-server")] | ||
TCPServer, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters