Merge remote-tracking branch 'origin/master' into maintenance

# Conflicts:
#	server/server.js
#	src/components/settings/General.vue
This commit is contained in:
Louis Lam 2022-10-15 15:57:39 +08:00
commit 268cbdbf8d
26 changed files with 247 additions and 39 deletions

View file

@ -292,6 +292,17 @@ exports.postgresQuery = function (connectionString, query) {
});
};
/**
* Query radius server
* @param {string} hostname Hostname of radius server
* @param {string} username Username to use
* @param {string} password Password to use
* @param {string} calledStationId ID of called station
* @param {string} callingStationId ID of calling station
* @param {string} secret Secret to use
* @param {number} [port=1812] Port to contact radius server on
* @returns {Promise<any>}
*/
exports.radius = function (
hostname,
username,
@ -299,9 +310,11 @@ exports.radius = function (
calledStationId,
callingStationId,
secret,
port = 1812,
) {
const client = new radiusClient({
host: hostname,
hostPort: port,
dictionaries: [ file ],
});