{"id":16096354,"url":"https://github.com/sio/waitotp","last_synced_at":"2025-07-30T05:05:34.590Z","repository":{"id":62216598,"uuid":"558841200","full_name":"sio/waitotp","owner":"sio","description":"Listen for a valid TOTP token and exit","archived":false,"fork":false,"pushed_at":"2022-11-01T19:32:39.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T20:32:01.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sio.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":"2022-10-28T12:22:24.000Z","updated_at":"2022-10-31T10:06:52.000Z","dependencies_parsed_at":"2022-10-28T16:00:18.107Z","dependency_job_id":null,"html_url":"https://github.com/sio/waitotp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sio/waitotp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fwaitotp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fwaitotp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fwaitotp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fwaitotp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sio","download_url":"https://codeload.github.com/sio/waitotp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fwaitotp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267814646,"owners_count":24148328,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-09T17:13:42.647Z","updated_at":"2025-07-30T05:05:34.518Z","avatar_url":"https://github.com/sio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Listen for a valid TOTP token and exit\n\nThis small program will wait for a valid TOTP token to be sent on a TCP port\nand then will exit. This is useful for guarding low traffic single-user\nservices on Internet.\n\n## Service lifecycle (systemd)\n\n- Startup of the guarded service is delayed by a call to [waitotp], this is\n  achieved by overriding parts of the unit file (see [waitotp.conf] for example)\n- [waitotp] listens on the guarded service port but does not expose the service\n  itself and does not reply to any incoming packets\n- If a valid TOTP token is received, [waitotp] exits and lets the guarded\n  service to proceed with startup\n- Immediately after the guarded service becomes active, systemd launches\n  related [inactivity-@.service]\n- [inactivity.sh] tracks network usage of the guarded service and if it is\n  inactive for a specified amount of time, [inactivity-@.service] restarts\n- Systemd triggers a restart of guarded service unit which again ends up\n  asking for a TOTP token before proceeding\n\n[waitotp]: waitotp.go\n[waitotp.conf]: waitotp.conf\n[inactivity-@.service]: inactivity-@.service\n[inactivity.sh]: inactivity.sh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsio%2Fwaitotp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsio%2Fwaitotp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsio%2Fwaitotp/lists"}