{"id":16766366,"url":"https://github.com/joyrex2001/capport-detection","last_synced_at":"2025-03-16T12:45:24.292Z","repository":{"id":147690596,"uuid":"86147915","full_name":"joyrex2001/capport-detection","owner":"joyrex2001","description":"This is a proof of concept implementation of a capport api based on the draft specification 'draft-donnelly-capport-detection'.","archived":false,"fork":false,"pushed_at":"2017-03-25T10:26:56.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T00:28:51.870Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/joyrex2001.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-25T09:56:41.000Z","updated_at":"2023-05-26T16:52:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"d406a5e2-410a-4610-ba9d-ba6ac7ceffe9","html_url":"https://github.com/joyrex2001/capport-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyrex2001%2Fcapport-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyrex2001%2Fcapport-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyrex2001%2Fcapport-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyrex2001%2Fcapport-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joyrex2001","download_url":"https://codeload.github.com/joyrex2001/capport-detection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243871652,"owners_count":20361378,"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-10-13T06:06:08.627Z","updated_at":"2025-03-16T12:45:24.271Z","avatar_url":"https://github.com/joyrex2001.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CAPPORT API proof of concept\n\nThis is a proof of concept implementation of a capport api based on the draft\nspecification [draft-donnelly-capport-detection](https://datatracker.ietf.org/doc/draft-donnelly-capport-detection/). Note that this is not an\nexact implementation of this draft, but actually implements the [comments](https://www.ietf.org/mail-archive/web/captive-portals/current/msg00312.html)\nthat were given on this draft.\n\n# Running the capport\n\nThe capport api is written in Python, and uses MySQL/mariadb for the storage of the\nsessions. The accompanied docker-compose file will set-up a complete\nenvironment, however the capport-api can also run without it.\n\n## Run with docker-compose\n\nTo start with docker-compose: ```docker-compose up --force-recreate```.\n\n## Run without docker compose\n\nThis proof of concept can also run without docker, but requires some manual installation\nof the dependencies.\n\nOn centos7, install the following:\n```bash\nyum -y install epel-release gcc gcc-c++ python-devel mariadb-devel mariadb-server\nyum -y install python-pip\npip install -r capport-api/requirements.txt\n```\n\nCreate the database, and add a default user:\n```bash\nsudo systemctl start mariadb\nsudo mysql\nMariaDB [(none)]\u003e CREATE DATABASE capport CHARACTER SET utf8 COLLATE\nutf8_unicode_ci;\nMariaDB [(none)]\u003e GRANT ALL PRIVILEGES ON capport.* TO 'capport'@'%' IDENTIFIED\nBY 'capport';\n```\n\nFinally, to start the service:\n```cd capport-api; python app.py```.\n\n# Accessing the api\n\nThe following curl commands will be helpful;\n\n```\ncurl -H'Accept: application/json' http://localhost:5000/capport\n```\n```\ncurl -H'Accept: application/json' http://localhost:5000/capport/sessions -d '{\"identity\": \"1234567890\"}'\n```\n```\ncurl -H'Accept: application/json' http://localhost:5000/capport/sessions/9d09f746-10c7-11e7-a298-0242ac1b0003\n```\n```\ncurl -H'Accept: application/json' -X DELETE http://localhost:5000/capport/sessions/9d09f746-10c7-11e7-a298-0242ac1b0003\n```\n\n# References\n\n* https://www.ietf.org/mail-archive/web/captive-portals/current/msg00312.html\n* https://datatracker.ietf.org/doc/draft-larose-capport-architecture/\n* https://datatracker.ietf.org/doc/draft-donnelly-capport-detection/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoyrex2001%2Fcapport-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoyrex2001%2Fcapport-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoyrex2001%2Fcapport-detection/lists"}