Push Tracker
ria-ran--sim-drop/configs/nginx.conf
A ashkan@beigi.net 8672b0de6b Add Phase-1 eSIM provisioning implementation
Full working closed-loop eSIM provisioning stack (spec in claude.md / plan/):
Flask API, SQLite subscriber store, credential/profile generator, Open5GS
and free5gc core adapters, captive portal, operational scripts, systemd
units, network configs, and a 44-test suite.

Profile generation currently returns a mock JSON profile; real SGP.22
generation via pySim is the planned Phase-2 upgrade.

Fixes two bugs found while getting the suite green:
- generate_imsi hardcoded a 10-digit MSIN, producing 16-digit IMSIs for a
  3-digit MNC; MSIN length is now 15 - len(mcc) - len(mnc).
- check_rate_limit compared timestamps as strings across mismatched formats
  (SQLite CURRENT_TIMESTAMP vs Python isoformat); both sides now normalized
  via SQLite datetime() so the window check is chronologically correct.

Add .gitignore for venv, caches, runtime config.yaml, and databases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 05:56:31 +00:00

45 lines
1.2 KiB
Nginx Configuration File

# nginx configuration for eSIM provisioning captive portal
# Install: cp configs/nginx.conf /etc/nginx/sites-available/esim-provisioning
# ln -s /etc/nginx/sites-available/esim-provisioning /etc/nginx/sites-enabled/
# rm -f /etc/nginx/sites-enabled/default
server {
listen 80 default_server;
server_name _;
# Redirect bare root to activation portal
location = / {
return 302 http://192.168.4.1/activate;
}
# Serve captive portal static files
location /activate {
alias /opt/esim-provisioning/portal/;
index index.html;
try_files $uri $uri/ /index.html;
}
location /css/ {
alias /opt/esim-provisioning/portal/css/;
}
location /js/ {
alias /opt/esim-provisioning/portal/js/;
}
# Reverse proxy API calls to Flask backend
location /api/ {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 10s;
proxy_read_timeout 30s;
}
# Catch-all: redirect anything else to the portal
location / {
return 302 http://192.168.4.1/activate;
}
}