Initial LisgloSIPS V2 implementation

This commit is contained in:
hectorzhao
2026-06-22 10:56:38 +08:00
commit 5fa1bd35e9
303 changed files with 35644 additions and 0 deletions
@@ -0,0 +1,22 @@
[Unit]
Description=Load LisgloSIPS Server A nftables rules
Documentation=file:/etc/nftables.d/
After=network-online.target
Wants=network-online.target
Before=rtpengine-daemon.service opensips.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=-/usr/sbin/nft delete table inet lisglosips_s20_observability
ExecStartPre=-/usr/sbin/nft delete table inet lisglosips_s19_rtpengine
ExecStartPre=-/usr/sbin/nft delete table inet lisglosips_s18_opensips
ExecStart=/usr/sbin/nft -f /etc/nftables.d/lisglosips-s18-opensips.nft
ExecStart=/usr/sbin/nft -f /etc/nftables.d/lisglosips-s19-rtpengine.nft
ExecStart=/usr/sbin/nft -f /etc/nftables.d/lisglosips-s20-observability.nft
ExecStop=-/usr/sbin/nft delete table inet lisglosips_s20_observability
ExecStop=-/usr/sbin/nft delete table inet lisglosips_s19_rtpengine
ExecStop=-/usr/sbin/nft delete table inet lisglosips_s18_opensips
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,33 @@
[Unit]
Description=LisgloSIPS local Redis AUTH proxy for OpenSIPS
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=opensips
Group=opensips
LoadCredentialEncrypted=redis_password:/etc/credstore.encrypted/lisglosips-redis-password.cred
Environment=LISTEN_HOST=127.0.0.1
Environment=LISTEN_PORT=6380
Environment=REDIS_HOST=100.90.90.91
Environment=REDIS_PORT=6379
Environment=REDIS_USER=lisglosips
ExecStart=/usr/local/sbin/lisglosips-redis-auth-proxy
Restart=always
RestartSec=3
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/run
RestrictSUIDSGID=true
LockPersonality=true
CapabilityBoundingSet=
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
IPAddressDeny=any
IPAddressAllow=127.0.0.0/8
IPAddressAllow=100.90.90.91/32
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,12 @@
[Unit]
Description=Load LisgloSIPS Redis hot path Lua script
After=lisglosips-redis-auth-proxy.service
Requires=lisglosips-redis-auth-proxy.service
Before=opensips.service
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/lisglosips-redis-load-hotpath
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,7 @@
[Unit]
Description=Collect LisgloSIPS Server A textfile metrics
After=rtpengine-daemon.service lisglosips-redis-auth-proxy.service
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/lisglosips-s20-metrics /var/lib/prometheus/node-exporter
@@ -0,0 +1,11 @@
[Unit]
Description=Run LisgloSIPS Server A textfile metrics collector
[Timer]
OnBootSec=20s
OnUnitActiveSec=15s
AccuracySec=2s
Unit=lisglosips-s20-metrics.service
[Install]
WantedBy=timers.target
@@ -0,0 +1,6 @@
[Unit]
After=lisglosips-redis-auth-proxy.service lisglosips-redis-hotpath-load.service
Wants=lisglosips-redis-auth-proxy.service lisglosips-redis-hotpath-load.service
[Service]
Environment=OPENSIPS_REDIS_URL=redis:s20://127.0.0.1:6380/