{"id":44739238,"url":"https://github.com/zeroleo12345/radius_server_python","last_synced_at":"2026-02-15T20:13:55.213Z","repository":{"id":43865865,"uuid":"147985896","full_name":"zeroleo12345/radius_server_python","owner":"zeroleo12345","description":"AAA Server written by Python for WLAN or PPPoE. Support EAP-PEAP/MSCHAPv2 (both PEAPv0 and PEAPv1), EAP-PEAP/GTC (both PEAPv0 and PEAPv1), PAP and CHAP.","archived":false,"fork":false,"pushed_at":"2026-02-12T15:37:27.000Z","size":9760,"stargazers_count":26,"open_issues_count":1,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-12T19:09:52.764Z","etag":null,"topics":["chap","eap-gtc","mschapv2","pap","pppoe","wlan"],"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/zeroleo12345.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-09-09T02:17:46.000Z","updated_at":"2026-01-28T14:00:49.000Z","dependencies_parsed_at":"2024-01-29T14:13:20.286Z","dependency_job_id":"5dc7b8dd-d23d-4e82-860e-b31f645c89e3","html_url":"https://github.com/zeroleo12345/radius_server_python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zeroleo12345/radius_server_python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroleo12345%2Fradius_server_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroleo12345%2Fradius_server_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroleo12345%2Fradius_server_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroleo12345%2Fradius_server_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeroleo12345","download_url":"https://codeload.github.com/zeroleo12345/radius_server_python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroleo12345%2Fradius_server_python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29488010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","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":["chap","eap-gtc","mschapv2","pap","pppoe","wlan"],"created_at":"2026-02-15T20:13:54.754Z","updated_at":"2026-02-15T20:13:55.200Z","avatar_url":"https://github.com/zeroleo12345.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Radius Server (Python)\n\nThis Raidus Server is writtten by Python, and is used to Authentication, Authorization, Accounting for WLAN user or PPPoE user.\nTest authorization through supplicant on Windows10, Android 4.4.4 and iOS 13.\n\n**Support authenticate method:**\n\n- [x] [PAP](https://www.rfc-editor.org/rfc/rfc1334.html)\n\n- [x] [CHAP](https://www.rfc-editor.org/rfc/rfc1994.html)\n\n- [x] [MS-CHAPv2](https://www.rfc-editor.org/rfc/rfc2759.html)\n\n- [x] [PEAPv0, PEAPv1: EAP-GTC](https://tools.ietf.org/html/draft-josefsson-pppext-eap-tls-eap-05)\n\n- [x] [PEAPv0, PEAPv1: EAP-MSCHAPv2](https://tools.ietf.org/html/draft-kamath-pppext-peapv0-00)\n\n**Support Dynamic Authorization Extensions:**\n\n- Disconnect Messages\n- Change-of-Authorization (CoA) Messages\n\n\n## Pull submodule src code\n  ```\n  git submodule update --init --recursive --remote --checkout   # pull\n  ```\n\n\n## Installation and Usage\n\n- Setup database\n\n  start pg:  `docker compose -f docker-compose.yml up pg`\n\n  init database and table data with [mysql_insert.sql](https://github.com/zeroleo12345/radius_server_python/blob/master/data/db/mysql_insert.sql)\n\n- For authenticate\n\n  Build the docker image\n\n  `docker compose build auth`\n\n  Run the docker container\n\n  `docker compose up auth`\n\n- For accouting\n\n  similiar with authenticate, but reaplce `auth` with `acct`\n\n\n## Build\n\n### build lib `libhostapd.so` from project `hostapd`\n\n```bash\ndocker compose exec auth bash\n\ncd third_party/hostapd-2.10/hostapd/\ncat README.md\n```\n\n\n### build simulator `eapol_test` from project `wpa_supplicant`\n\n```bash\ndocker compose exec auth bash\n\ncd third_party/wpa_supplicant-2.10/wpa_supplicant/\ncat README.md\n```\n\n\n### build simulator `radclient` from project `freeradius`\n\u003e `freeradius` not support `OpenSSL 3.0` well in debian `bookworm`\n\n```bash\ndocker compose exec auth bash\n\ncd third_party/freeradius-3.2.3/\ncat README.md\n```\n\n\n## Send authenticate request with simulator\n\n### Authenticate: `CHAP`\n\n```bash\ndocker compose exec simulator bash\n\nradclient -D /app/tools/simulator/etc/dictionary -d /app/etc/dictionary auth:1812  auth  'testing123'  \u003c /app/tools/simulator/radius_test/auth/chap.conf\n```\n\n\n### Authenticate: `PAP`\n\n```bash\n\ndocker compose exec simulator bash\n\n# docker run --rm -it --network pppoe_system_network_name jumanjiman/radclient:latest \\\nradclient -D /app/tools/simulator/etc/dictionary -d /app/etc/dictionary auth:1812  auth  'testing123'  \u003c /app/tools/simulator/radius_test/auth/pap.conf\n```\n\n\n### Authenticate: `MSCHAPv2`\n\n1. `docker compose up -d auth_test`, listen on port 2812\n\n2. Access Controller route traffic to 2812\n\n\n\n### Authenticate: `EAP-GTC`\n\nadd `USE_GTC=1` in .env and restart docker container\n\nenter into authenticate container: `docker compose exec auth bash`\n\nrun simulator in container directory `/app/tools/simulator/bin`:\n\n```bash\neapol_test -c /app/tools/simulator/eap_test/eapol_test.conf.peapv1.gtc -a auth -p 1812 -s testing123 -r 0 -N 30:s:FF-FF-FF-FF-FF-FF -N 32:s:AC\n```\n\n\n### Authenticate: `EAP-MSCHAPv2`\n\nremove `USE_GTC=0` in .env and restart docker container\n\nenter into authenticate container: `docker compose exec auth bash`\n\nrun simulator in container directory `/app/tools/simulator/bin`:\n\n```bash\n./eapol_test -c /app/tools/simulator/eap_test/eapol_test.conf.peapv1.mschapv2 -a auth -p 1812 -s testing123 -r 0 -N 30:s:FF-FF-FF-FF-FF-FF -N 32:s:AC\n```\n\n\n## Send `Accounting` request with simulator\n\n```bash\ndocker compose exec simulator bash\n\n# i package\nradclient -D /app/tools/simulator/etc/dictionary -d /app/etc/dictionary acct:1813  acct  'testing123'  \u003c /app/tools/simulator/radius_test/acct/i.conf\n\n# u package\nradclient -D /app/tools/simulator/etc/dictionary -d /app/etc/dictionary acct:1813  acct  'testing123'  \u003c /app/tools/simulator/radius_test/acct/u.conf\n\n# t package\nradclient -D /app/tools/simulator/etc/dictionary -d /app/etc/dictionary acct:1813  acct  'testing123'  \u003c /app/tools/simulator/radius_test/acct/t.conf\n```\n\n\n## Send Dynamic Authorization Extensions request with simulator\n  \n### disconnect\n\nrun simulator in container directory `/app/tools/simulator/bin`:\n\n```bash\ndocker compose exec simulator bash\n\nradclient -D /app/tools/simulator/etc/dictionary -d /app/etc/dictionary dae:3799  disconnect  'testing123'  \u003c /app/tools/simulator/radius_test/dae/disconnect.conf\n```\n\n\n## gdb core\n```bash\ngdb /root/.pyenv/shims/python -c core.1 \n```\n\n\n## gdb segmentation fault\n```bash\nENTRYPOINT=\"tail -f /dev/null\" docker compose up -d auth_test\n\napt-get install gdb\n\n./bin/gdb.sh    # gdb python3\n\n(gdb) run /app/src/processor/auth_processor.py\n\n# wait for segfault ##\n\n(gdb) backtrace\n\n# stack trace of the c code\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroleo12345%2Fradius_server_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeroleo12345%2Fradius_server_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroleo12345%2Fradius_server_python/lists"}