{"id":23459856,"url":"https://github.com/trylife/yii2-ip-access","last_synced_at":"2026-02-15T12:40:05.706Z","repository":{"id":57073137,"uuid":"85310319","full_name":"trylife/yii2-ip-access","owner":"trylife","description":"YII2 IP访问权限","archived":false,"fork":false,"pushed_at":"2019-12-09T03:44:52.000Z","size":7,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T07:47:07.559Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trylife.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-17T12:39:54.000Z","updated_at":"2025-02-21T17:44:22.000Z","dependencies_parsed_at":"2022-08-24T10:51:36.543Z","dependency_job_id":null,"html_url":"https://github.com/trylife/yii2-ip-access","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/trylife/yii2-ip-access","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trylife%2Fyii2-ip-access","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trylife%2Fyii2-ip-access/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trylife%2Fyii2-ip-access/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trylife%2Fyii2-ip-access/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trylife","download_url":"https://codeload.github.com/trylife/yii2-ip-access/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trylife%2Fyii2-ip-access/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29478356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T11:35:25.641Z","status":"ssl_error","status_checked_at":"2026-02-15T11:34:57.128Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-12-24T06:18:42.771Z","updated_at":"2026-02-15T12:40:05.658Z","avatar_url":"https://github.com/trylife.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yii2-ip-access IP访问限制\n\n\n## Installation\n\n```\ncomposer require trylife/yii2-ip-access\n```\n## Configure\n\n### 迁移数据\n\n```\n./yii migrate --migrationPath=@vendor/trylife/yii2-ip-access/migrations\n```\n\n### 配置模块\n\n```\n'modules' =\u003e [\n    ...\n    'ip-access' =\u003e [\n        'class' =\u003e 'trylife\\ipAccess\\Module',\n        'controllerMap' =\u003e [\n            'ping' =\u003e [\n                'class' =\u003e 'trylife\\ipAccess\\controllers\\PingController',\n                'accessKey' =\u003e 'jGajhDpsy2kKqDslFNcFt0zNF17BYqnT',\n            ],\n        ],\n    ],\n    ...\n],\n```\n\n### crontab 定时访问\n\n```\ncurl yourDomain/ip-access/ping/ping?accessKey=jGajhDpsy2kKqDslFNcFt0zNF17BYqnT\n```\n\n### 白名单访问控制\n```\n    'as IpWhiteListBehavior' =\u003e [\n        'class' =\u003e 'trylife\\ipAccess\\behaviors\\IpWhiteListBehavior',\n        'open' =\u003e true,\n        'allowIps' =\u003e [\n            '127.0.0.1',\n        ],\n        'allowRoutes' =\u003e [\n            'ip-access/ping/ping'\n        ],\n    ],\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrylife%2Fyii2-ip-access","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrylife%2Fyii2-ip-access","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrylife%2Fyii2-ip-access/lists"}