How kmously/glars works
Main Components
a) Network Interfaces Layer:
• External Interface (WAN)
• Internal Interface (LAN)
b) Core GLARS Components:
• Main Script Engine
• Rules Processing System
• API Functions Layer
• Hook System (pre_glars, setup_rules_and_policies, post_glars)
c) Underlying Linux Components:
• iptables (Firewall)
• ipset (IP Set Management)
• tc (Traffic Control)
[Network Interfaces Layer]
• ↕
[GLARS Core Layer]
• ↕
[Linux System Layer]
Specific Elements
a) Network Traffic Flow:
• NAT translation point
• Default trust zones (LAN trusted, WAN untrusted)
b) GLARS Core Functions:
• Port Management (open, forward, lock, duplicate)
• Access Control (no_internet, safe zones)
• Rate Limiting
• Connection Management
c) Configuration Components:
• Rules File Processing
• Hook System Integration
• API Function Calls
Detailed Component Relationships
How the following interact:
• Rules file → Hook System → Core Functions
• API Functions → iptables/ipset/tc
• Network Interfaces ↔ Core Router Logic
• Safe Zones ↔ Access Control