feat: add account enforcement background service and update docker-compose for network containerization
Build and Push Docker Image to Gitea Container Registry / build-and-push (push) Successful in 1m10s

This commit is contained in:
Tygozwolle
2026-07-24 19:55:59 +02:00
parent 74326870f7
commit f5d2144f79
3 changed files with 8 additions and 5 deletions
+6 -3
View File
@@ -19,17 +19,20 @@ services:
image: cablon.vanolst.tech/tygozwolle/radius:latest
container_name: radius_web_controller
restart: always
network_mode: "host"
depends_on:
- postgres
ports:
- "8080:8080"
- "1812:1812/udp"
- "1813:1813/udp"
environment:
- DB_HOST=127.0.0.1
- DB_HOST=postgres
- DB_PORT=5432
- DB_USER=radius
- DB_PASS=radpass
- DB_NAME=radius
- RADIUS_SECRET=radpass
- ConnectionStrings__DefaultConnection=Host=127.0.0.1;Port=5432;Database=radius;Username=radius;Password=radpass;
- ConnectionStrings__DefaultConnection=Host=postgres;Port=5432;Database=radius;Username=radius;Password=radpass;
- ASPNETCORE_ENVIRONMENT=Production
# Change 8080 below to whatever port you want the web UI to run on (e.g., 8090)
- ASPNETCORE_URLS=http://+:8080
@@ -118,7 +118,7 @@ public class AccountEnforcementService : BackgroundService
try
{
var payload = $"User-Name=\\\"{profile.Username}\\\"\\nCalling-Station-Id=\\\"{session.CallingStationId}\\\"\\nAcct-Session-Id=\\\"{session.AcctSessionId}\\\"\\nNAS-IP-Address=\\\"{session.NasIpAddress}\\\"\\n";
var payload = $"User-Name=\\\"{profile.Username}\\\"\\nCalling-Station-Id=\\\"{session.CallingStationId}\\\"\\nAcct-Session-Id=\\\"{session.AcctSessionId}\\\"\\nNAS-IP-Address=\\\"{session.NasIpAddress}\\\"\\nMessage-Authenticator=0x00\\n";
var process = new System.Diagnostics.Process
{
StartInfo = new System.Diagnostics.ProcessStartInfo
+1 -1
View File
@@ -390,7 +390,7 @@ public class RadiusService : IRadiusService
try
{
var payload = $"User-Name=\\\"{username}\\\"\\nCalling-Station-Id=\\\"{session.CallingStationId}\\\"\\nAcct-Session-Id=\\\"{session.AcctSessionId}\\\"\\nNAS-IP-Address=\\\"{session.NasIpAddress}\\\"\\n";
var payload = $"User-Name=\\\"{username}\\\"\\nCalling-Station-Id=\\\"{session.CallingStationId}\\\"\\nAcct-Session-Id=\\\"{session.AcctSessionId}\\\"\\nNAS-IP-Address=\\\"{session.NasIpAddress}\\\"\\nMessage-Authenticator=0x00\\n";
var process = new System.Diagnostics.Process
{
StartInfo = new System.Diagnostics.ProcessStartInfo