{"id":21413260,"url":"https://github.com/devitools/arceau","last_synced_at":"2025-03-16T18:23:50.848Z","repository":{"id":47667085,"uuid":"397745560","full_name":"devitools/arceau","owner":"devitools","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-04T12:42:05.000Z","size":25,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-23T05:15:51.760Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devitools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-18T22:02:44.000Z","updated_at":"2021-11-04T12:42:07.000Z","dependencies_parsed_at":"2022-08-21T10:10:42.345Z","dependency_job_id":null,"html_url":"https://github.com/devitools/arceau","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devitools%2Farceau","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devitools%2Farceau/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devitools%2Farceau/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devitools%2Farceau/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devitools","download_url":"https://codeload.github.com/devitools/arceau/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910762,"owners_count":20367544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T18:17:43.068Z","updated_at":"2025-03-16T18:23:50.820Z","avatar_url":"https://github.com/devitools.png","language":"PHP","readme":"# Arceau Firewall\r\n\r\n## How to install\r\n\r\n`composer require devitools/arceau`\r\n\r\n## Get started\r\n\r\nCreate a PHP file as below\r\n\r\n```php\r\n\u003c?php\r\n\r\nuse Devitools\\Arceau\\Security\\Firewall;\r\n\r\nuse const Devitools\\Arceau\\Security\\Helper\\FIREWALL_ALLOW;\r\nuse const Devitools\\Arceau\\Security\\Helper\\FIREWALL_DENY;\r\n\r\n/**\r\n */\r\nreturn static function () {\r\n    $allowed = [\r\n        'query:code=10\u0026t=*',\r\n        '172.30.0.1',\r\n        '192.168.*',\r\n    ];\r\n\r\n    Firewall::instance()\r\n        -\u003esetDefaultMode(FIREWALL_DENY)\r\n        -\u003eaddItem('10.0.0.*', FIREWALL_ALLOW)\r\n        -\u003eaddItems($allowed, FIREWALL_ALLOW)\r\n        -\u003ehandle();\r\n};\r\n```\r\n\r\nThen use it anywhere\r\n\r\n```php\r\n$firewall = require __DIR__ . '/../../firewall.php';\r\n$firewall();\r\n```\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevitools%2Farceau","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevitools%2Farceau","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevitools%2Farceau/lists"}