Skip to content

Commit

Permalink
add default options for proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantin Wenz committed Jul 10, 2021
1 parent 8f1cc11 commit 2a47d6c
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions Lantern/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@

namespace Lantern
{

[Verb("default", HelpText = "Default options, not visible")]
class DefaultOptions
{
[Option(HelpText = "Set Proxy")]
public string Proxy { get; set; }
}

[Verb("devicekeys", HelpText = "Play with Device Keys - Ask for PRT and SessionKey for a certificate")]
class DeviceKeyOptions
class DeviceKeyOptions : DefaultOptions
{
[Option(HelpText = "Specify path to device certificate (PFX).", Required = true)]
public string PFXPath { get; set; }
Expand All @@ -20,13 +28,10 @@ class DeviceKeyOptions

[Option(HelpText = "Set Refreshtoken")]
public string RefreshToken { get; set; }

[Option(HelpText = "Set Proxy")]
public string Proxy { get; set; }
}

[Verb("p2pcert", HelpText = "Ask for a P2P Certificate")]
class P2POptions
class P2POptions : DefaultOptions
{
[Option(HelpText = "Specify path to device certificate (PFX).")]
public string PFXPath { get; set; }
Expand All @@ -44,8 +49,6 @@ class P2POptions

[Option(HelpText = "Set password")]
public string Password { get; set; }
[Option(HelpText = "Set Proxy")]
public string Proxy { get; set; }

[Option(HelpText = "Set PRT")]
public string PRT { get; set; }
Expand All @@ -61,17 +64,13 @@ class P2POptions
}

[Verb("nonce", HelpText = "Request a nonce from Azure.")]
class NonceOptions
class NonceOptions : DefaultOptions
{
[Option(HelpText = "Set Proxy")]
public string Proxy { get; set; }
}

[Verb("cookie", HelpText = "Create a PRT Cookie for further usage or your browser")]
class CookieOptions
class CookieOptions : DefaultOptions
{
[Option(HelpText = "Set Proxy")]
public string Proxy { get; set; }
[Option(HelpText = "Set PRT")]
public string PRT { get; set; }

Expand All @@ -85,11 +84,8 @@ class CookieOptions
public string SessionKey { get; set; }
}
[Verb("token", HelpText = "Play with Azure Tokens")]
class TokenOptions
class TokenOptions : DefaultOptions
{
[Option(HelpText = "Set Proxy")]
public string Proxy { get; set; }

[Option(HelpText = "Set PRT")]
public string PRT { get; set; }

Expand Down Expand Up @@ -132,10 +128,8 @@ class TokenOptions
}

[Verb("device", HelpText = "Join a device to Azure")]
class DeviceOptions
class DeviceOptions : DefaultOptions
{
[Option(HelpText = "Set Proxy")]
public string Proxy { get; set; }

[Option(HelpText = "Set device name", Required = true)]
public string DeviceName { get; set; }
Expand Down

0 comments on commit 2a47d6c

Please sign in to comment.