{"id":16179755,"url":"https://github.com/bep/killswitch","last_synced_at":"2025-06-25T05:07:27.747Z","repository":{"id":57535371,"uuid":"48262360","full_name":"bep/killswitch","owner":"bep","description":"Wrap your sensitive application in a kill switch","archived":false,"fork":false,"pushed_at":"2017-07-29T08:39:08.000Z","size":25,"stargazers_count":41,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T21:11:07.954Z","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/bep.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":"2015-12-19T00:18:07.000Z","updated_at":"2024-10-24T05:35:59.000Z","dependencies_parsed_at":"2022-08-29T00:30:20.576Z","dependency_job_id":null,"html_url":"https://github.com/bep/killswitch","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bep/killswitch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bep%2Fkillswitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bep%2Fkillswitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bep%2Fkillswitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bep%2Fkillswitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bep","download_url":"https://codeload.github.com/bep/killswitch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bep%2Fkillswitch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261808046,"owners_count":23212688,"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-10T05:43:57.966Z","updated_at":"2025-06-25T05:07:27.717Z","avatar_url":"https://github.com/bep.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Application Kill Switch\n\n\n[![GoDoc](https://godoc.org/github.com/bep/killswitch?status.svg)](https://godoc.org/github.com/bep/killswitch)\n[![Build Status](https://travis-ci.org/bep/killswitch.svg)](https://travis-ci.org/bep/killswitch) [![Build status](https://ci.appveyor.com/api/projects/status/7mbikfi6sxyq7phh?svg=true)](https://ci.appveyor.com/project/bjornerik/killswitch)\n\nThis is a general-purpose and cross-platform application kill switch written in Go. The main use case is to protect applications running with the VPN when the VPN dies, and still keep general network connectivity. But it's extendable, so a time based kill switch for your develpoment IDE should also be possible: \"Sorry, boss. My development environment will not start during Christmas!\"\n\n\u003e\"A kill switch, also known as an emergency stop or e-stop, is a safety mechanism used to shut off a device in an emergency situation in which it cannot be shut down in the usual manner. (Wikipedia)\"\n\n## Install\n\n**Killswitch** is a Go application. The easiest way to intall it is via `go get`:\n\n```bash\n go get -v github.com/bep/killswitch\n```\n\nThis application has been confirmed to work fine on OS X, and Linux, and Windows. Desktop notifications implemented on OS X and Linux.\n\n## Is it any good?\n\n[Yes](https://news.ycombinator.com/item?id=3067434)\n\n## Use\n\nWrap your sensitive application with a kill switch.\n\nProvide a path to the program to watch and its arguments (optional), and then a conditional.\n\nThe conditional can be a built-in (see the `net` command) or a heartbeat-script\nyou can write yourself (see the `exec` command).\n\n\n```\n  -a, --args string    The program argument list\n  -e, --exec string    The program to watch\n      --interval int   Interval between checks in seconds (default 5)\n```\n\n## Kill Switches\n\n### killswitch net\n\nWill kill your executable if a given network interface vanishes.\n\n```\nkillswitch net\n```\n\n```\n  -n, --name string   The name of the network interface that must be present\n```\n\nTo get the correct interface name to use with this command, try \n\n```\nkillswitch net list\n```\n\n## killswitch exec\n\nWill kill your executable if your provided script exits with an error code.\n\nThe script (typically a shell script on *nix or a cmd- or bat-script on Windows) must exit with a non-0 exit-code\nto signal that the application under watch should be killed.\n\nSee /testfiles for example scripts for both *nix and Windows.\n\nIf the script is not present on the PATH, the full path must be provided in name.\n\n\n```\nkillswitch exec\n```\n\n```\n  -n, --name string   The name of the script to use as heartbeat script. If not on PATH, the full path must be provided.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbep%2Fkillswitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbep%2Fkillswitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbep%2Fkillswitch/lists"}