Compare commits
14 Commits
master
...
svxreflect
| Author | SHA1 | Date |
|---|---|---|
|
|
204604a182 | |
|
|
8a33513d29 | |
|
|
f33328765e | |
|
|
24eb3dbf9a | |
|
|
4473d1aa2c | |
|
|
cdf85606ba | |
|
|
87d00a2917 | |
|
|
569f2a7a3a | |
|
|
df1d44c8b1 | |
|
|
d78b273235 | |
|
|
47f86c194a | |
|
|
a145dc09b2 | |
|
|
444c401b6e | |
|
|
44475dd24c |
|
|
@ -140,6 +140,12 @@ the risk of some client overwhelming the reflector with requests causing
|
|||
disturbances in the reflector operation.
|
||||
|
||||
Example: HTTP_SRV_PORT=8080
|
||||
.TP
|
||||
.B AUTH_KEY
|
||||
Set a key used by nodes that are not configured in [USERS] section without
|
||||
defining an USER=password combination. This can be used for reflectors that
|
||||
should be open for everyone and/or a big number of clients to keep the
|
||||
configuration effort as low as possible.
|
||||
.
|
||||
.SS USERS and PASSWORDS sections
|
||||
.
|
||||
|
|
|
|||
|
|
@ -884,13 +884,19 @@ void ReflectorClient::handleHeartbeat(Async::Timer *t)
|
|||
std::string ReflectorClient::lookupUserKey(const std::string& callsign)
|
||||
{
|
||||
string auth_group;
|
||||
string auth_key;
|
||||
if (!m_cfg->getValue("USERS", callsign, auth_group) || auth_group.empty())
|
||||
{
|
||||
cout << "*** WARNING: Unknown user \"" << callsign << "\""
|
||||
<< endl;
|
||||
return "";
|
||||
cout << "*** User \"" << callsign << "\" not found in config, checking "
|
||||
<< "if AUTH_KEY is valid." << endl;
|
||||
if (!m_cfg->getValue("GLOBAL", "AUTH_KEY", auth_key) || auth_key.empty())
|
||||
{
|
||||
cout << "*** ERROR: AUTH_KEY not defined or empty." << endl;
|
||||
return "";
|
||||
}
|
||||
return auth_key;
|
||||
}
|
||||
string auth_key;
|
||||
|
||||
if (!m_cfg->getValue("PASSWORDS", auth_group, auth_key) || auth_key.empty())
|
||||
{
|
||||
cout << "*** ERROR: User \"" << callsign << "\" found in SvxReflector "
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ LISTEN_PORT=5300
|
|||
TG_FOR_V1_CLIENTS=999
|
||||
#RANDOM_QSY_RANGE=12399:100
|
||||
#HTTP_SRV_PORT=8080
|
||||
AUTH_KEY=abc123
|
||||
|
||||
[USERS]
|
||||
#SM0ABC-1=MyNodes
|
||||
|
|
|
|||
Loading…
Reference in New Issue