mirror of
https://github.com/jakobadam/RDSFactor.git
synced 2025-06-05 12:07:14 +02:00
Remove ClientList config option
This commit is contained in:
parent
fdfe54dcf7
commit
973ef3a63e
2 changed files with 18 additions and 31 deletions
|
@ -15,7 +15,7 @@ Public Class RDSFactor
|
|||
Public Shared ADField As String = ""
|
||||
Public Shared ADMailField As String = ""
|
||||
Public Shared EnableOTP As Boolean
|
||||
Public Shared secrets As NASAuthList
|
||||
Public Shared secrets As New NASAuthList
|
||||
|
||||
Public Shared SessionTimeOut As Integer = 30 ' in minutes
|
||||
Public Shared LaunchTimeOut As Integer = 30 ' in seconds
|
||||
|
@ -57,13 +57,6 @@ Public Class RDSFactor
|
|||
End Sub
|
||||
|
||||
Public Sub StartUpServer()
|
||||
secrets = New NASAuthList
|
||||
|
||||
For Each cl As DictionaryEntry In clientHash
|
||||
ServerLog("Adding Shared Secrets to Radius Server")
|
||||
secrets.AddSharedSecret(cl.Key, cl.Value)
|
||||
Next
|
||||
|
||||
Try
|
||||
server = New RADIUSServer(serverPort, AddressOf ProcessPacket, secrets)
|
||||
ServerLog("Starting Radius Server on Port " & serverPort & " ...OK")
|
||||
|
@ -194,15 +187,10 @@ Public Class RDSFactor
|
|||
|
||||
End If
|
||||
|
||||
Dim ClientList As String = ""
|
||||
ClientList = RConfig.GetKeyValue("RDSFactor", "ClientList")
|
||||
|
||||
Dim ClientArray() As String
|
||||
ClientArray = Split(ClientList, ",")
|
||||
|
||||
For i As Integer = 0 To ClientArray.Length - 1
|
||||
ServerLog("Loading Shared Secret for Client: " & ClientArray(i))
|
||||
clientHash.Add(ClientArray(i), RConfig.GetKeyValue("Clients", ClientArray(i)))
|
||||
For Each client In RConfig.GetSection("clients").Keys
|
||||
Dim address = client.Name
|
||||
ServerLog("Adding Shared Secret for: " & address)
|
||||
secrets.AddSharedSecret(address, client.Value)
|
||||
Next
|
||||
|
||||
If ConfOk = True Then
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
[RDSFactor]
|
||||
ClientList=127.0.0.1
|
||||
SenderEmail=noreply@example.com
|
||||
ADField=telephoneNumber
|
||||
EnableOTP=0
|
||||
Provider=https://www.cpsms.dk/sms/?username=myuser&password=mypassword&recipient=***NUMBER***&message=***TEXTMESSAGE***&from=CPSMS
|
||||
Debug=1
|
||||
MailServer=
|
||||
TSGW=1
|
||||
LDAPDomain=ad.example.com
|
||||
EnableEmail=0
|
||||
USELOCALMODEM=0
|
||||
SMSC=+4540390999
|
||||
EnableSMS=1
|
||||
COMPORT=com1
|
||||
ADMailfield=mail
|
||||
Debug=1
|
||||
EnableOTP=0
|
||||
EnableSMS=1
|
||||
LDAPDomain=ad.example.com
|
||||
MailServer=
|
||||
Provider=https://www.cpsms.dk/sms/?username=myuser&password=mypassword&recipient=***NUMBER***&message=***TEXTMESSAGE***&from=CPSMS
|
||||
EnableEmail=0
|
||||
SenderEmail=noreply@example.com
|
||||
COMPORT=com1
|
||||
SMSC=+4540390999
|
||||
USELOCALMODEM=0
|
||||
[Clients]
|
||||
127.0.0.1=helloworld
|
||||
127.0.0.1=helloworld
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue