How samaliyan/countryipfilter works
Country IP Filter is a Windows desktop firewall manager: users choose countries and TCP/UDP ports or programs, then enable protection so only selected-country IPv4 ranges can connect. The UI delegates actions to application logic, which obtains and aggregates country ranges, applies firewall rules, and checks the resulting firewall state for problems. The README documents scheduled monthly updates and restoration of pre-existing rules. Some subsystem links are documented rather than visible in the sampled excerpts; those are cited to the README.
Main entry points: gui_windows.go Windows window · core.go Protection and ranges · scripts.go Firewall and update scripts · app.go Button actions
Components 18
Desktop interface
- Windows window
gui_windows.go - Window layout
layout.go - English and Persian
i18n.go - Country names
countries.go - Service ports
ports.go
Protection workflow
- Button actions
app.go - Protection and ranges
core.go - Status and fixes view
view.go
Firewall operations
- Firewall state analysis
status.go - Firewall and update scripts
scripts.go - Windows execution and permissions
sys_windows.go
Supporting features
- Monthly scheduled update
scripts.go - Existing firewall rules
scripts.go - Language settings
i18n.go
Other components
- Server administrator
- RIPEstat
- Windows PowerShell
- Windows Firewall
Connections 19
- Server administrator → Windows window: uses
README.md - Windows window → Button actions: dispatches actions
gui_windows.go - Windows window → Window layout: uses layout
README.md - Windows window → English and Persian: shows text
gui_windows.go - Windows window → Country names: shows countries
README.md - Windows window → Service ports: offers services
README.md - Button actions → Protection and ranges: requests operations
app.go - Button actions → Status and fixes view: refreshes view
app.go - Protection and ranges → RIPEstat: downloads ranges
README.md - Protection and ranges → Firewall and update scripts: builds scripts
core.go - Protection and ranges → Firewall state analysis: parses status
core.go - Firewall and update scripts → Windows PowerShell: runs commands
README.md - Windows PowerShell → Windows Firewall: changes rules
README.md - Windows execution and permissions → Windows PowerShell: executes scripts
sys_windows.go - Firewall state analysis → Status and fixes view: informs assessment
- Firewall and update scripts → Monthly scheduled update: supports updates
README.md - Monthly scheduled update → RIPEstat: downloads ranges
README.md - Firewall and update scripts → Existing firewall rules: restores rules
README.md - Protection and ranges → Language settings: stores settings
i18n.go