{"id":15022274,"url":"https://github.com/sukkaw/location-guard-ng","last_synced_at":"2025-04-04T01:10:49.368Z","repository":{"id":257025317,"uuid":"855176501","full_name":"SukkaW/location-guard-ng","owner":"SukkaW","description":"A UserScript that hide/spoof your geographic location from websites.","archived":false,"fork":false,"pushed_at":"2024-09-29T19:55:13.000Z","size":359,"stargazers_count":173,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T00:09:16.953Z","etag":null,"topics":["adguard","location-guard","location-guard-ng","privacy","privacy-protection","tampermonkey","userscript","violentmonkey","violentmonkey-script"],"latest_commit_sha":null,"homepage":"https://location-guard-ng.skk.moe","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SukkaW.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-10T12:51:16.000Z","updated_at":"2025-04-03T01:17:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"c81eea50-89ea-4456-9fa3-67c7909333f4","html_url":"https://github.com/SukkaW/location-guard-ng","commit_stats":null,"previous_names":["sukkaw/location-guard-ng","sukkaw/location-guard-userscript"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SukkaW%2Flocation-guard-ng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SukkaW%2Flocation-guard-ng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SukkaW%2Flocation-guard-ng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SukkaW%2Flocation-guard-ng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SukkaW","download_url":"https://codeload.github.com/SukkaW/location-guard-ng/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247103307,"owners_count":20884023,"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":["adguard","location-guard","location-guard-ng","privacy","privacy-protection","tampermonkey","userscript","violentmonkey","violentmonkey-script"],"created_at":"2024-09-24T19:57:43.772Z","updated_at":"2025-04-04T01:10:49.352Z","avatar_url":"https://github.com/SukkaW.png","language":"TypeScript","funding_links":["https://github.com/sponsors/SukkaW/"],"categories":[],"sub_categories":[],"readme":"# Location Guard Ng (UserScript)\n\n**Location Guard Ng** is a rewritten version of the original [Location Guard](https://github.com/chatziko/location-guard) browser extension (which has already became one of many victims of [the removal of MV2 support in Google Chrome](https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline)) that uses modern web technology and is now a UserScript. It allows to protect your location while using location-aware websites, by either adding controlled noise or completely spoof with the fixed coordinates. It supports the following UserScript managers:\n\n- [Tampermonkey](https://www.tampermonkey.net/)\n- [Violentmonkey](https://violentmonkey.github.io/)\n- [AdGuard](https://adguard.com/)\n\n\u003e Do note that AdGuard's userscript capabilities are limited (E.g. `GM_addValueChangeListener` and `registerMenuCommand`)\n\n## Installation\n\nhttps://unpkg.com/location-guard@latest/dist/location-guard-ng.user.js\n\n## Configuration\n\nAfter installing the UserScript, you can configure it by opening your user script manager menu, where the \"Options\" menu item can be found under the \"Location Guard Ng\" menu. You can also access the configuration page directly by visiting the following URL:\n\nhttps://location-guard-ng.skk.moe/options\n\n## TODO\n\n- [ ] New configuration UI\n  - The current configuration UI is back ported directly from the original browser extension. Need to rewrite in React and JoyUI.\n- [ ] Per domain configuration\n  - The original browser extension allows to set different privacy levels for different domains. This feature is not yet implemented in the UserScript version.\n\n## How to build\n\n- Clone the repository\n- Use [pnpm](https://pnpm.io/) to install dependencies (`pnpm i`)\n- Run `pnpm run build`\n- The built script will be available in `dist` folder\n\n\u003cdetails\u003e\n\u003csummary\u003e\n\u003ch2\u003eFAQ\u003c/h2\u003e\n\u003c/summary\u003e\n\n### What is Location Guard and Location Guard Ng?\n\nWebsites can ask the browser for your location (via JavaScript). When they do\nso, the browser first asks your permission, and if you accept, it detects your\nlocation (typically by transmitting a list of available wifi access points to a\ngeolocation provider such as Google Location Services, or via GPS if available)\nand gives it to the website.\n\nThe Location Guard browser extension project starts since 2013 and aims to\nintercepts this procedure. It has been discontinued in 2020 and now obsolete\n(due to [the removal of MV2 support in Google Chrome](https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline)).\n\nThe Location Guard Ng is a rewrite version of the original Location Guard browser\nextension that uses modern web technology (Like TypeScript, React, rollup, etc).\n\nThe permission dialog appears as usual, and you can still choose to deny. If\nyou give permission, then Location Guard Ng obtains your location and adds \"random noise\"\nto it or even completely spoofs it with a specified fixed location. Only\nthe fake location is then given to the website.\n\nTo see Location Guar Ng in action use [this demo](https://browserleaks.com/geo), a\n[geolocalized weather forecast](https://darksky.net/), or go to [Google\nMaps](https://www.google.com/maps) and press the \"pin\" button.\n\n### What kind of privacy does Location Guard Ng provide?\n\nLocation Guard Ng provides privacy within a certain _protection area_ by ensuring\nthat all locations within this area look _plausible_ for being the real one.\nThis is achieved by adding random noise in a way such that all locations within\nthe protection area can produce the same fake location with similar probability.\nAs a consequence, the fake location provides no information to the website for\ndistinguishing between locations within the protection area.\n\n**Warning:** _background knowledge_ can still be used by websites to guess the\nreal location within the protection area. For instance, if the protection area\nis in the middle of a lake containing only a small island, it will be easy to\ninfer that the real location is on the island. In scenarios like this you should\nchoose a higher privacy level, or deny disclosing your location at all, or specify\na fixed location.\n\n### What are \"privacy levels\"?\n\nThe privacy level determines the amount of noise added to your real location. A\nhigher level adds more noise, so the fake location will be further away from the\nreal one. This offers protection within a larger area, but it might make the\nservice provided by the website less useful.\n\nBy default all websites use the \"medium\" level (this can be changed from the\nextension's options). You can select a different level for a specific website\nusing the ![](src/images/pin_19.png) icon. For instance, you could select\na lower privacy level for websites that need an accurate location (eg. maps),\nand a higher one for websites that only need approximate information (eg.\nweather forecast).\n\nFor more flexibility, each level can be configured from the _Privacy Levels_\ntab. The red circle is the _protection area_: locations in this area look\nplausible to be the real one (see \"What kind of privacy does Location Guard\nprovide?\" above). The blue circle is the _accuracy_: the fake location will be\ninside this circle with high probability (note that the noise is random). Use\nthe slider to adapt the two areas to your needs.\n\n### What is a \"fixed location\"?\n\nThe privacy level can be set to \"Use fixed location\". In this case Location\nGuard always reports to the website a predefined fixed location that never\nchanges (instead of generating a fake location by adding noise to the real one).\nThis offers the highest privacy, since the reported location is completely\nindependent from the real one, at the cost of very low accuracy.\n\nYou can modify the fixed location from the extension's options (Fixed Location\ntab).\n\nWhen using a fixed location, the browser's geolocation is not performed at all.\nThis offers better privacy, since the list of wifi access points is not\ntransmitted to Google's servers. However, it has the side effect that the\n_permission dialog is not displayed at all_. This behaviour is usually\nacceptable when the fixed location is dummy, but it can be modified if you wish.\n\n### Why some websites detect my location although I use Location Guard Ng?\n\nSome websites detect your location based on your [IP address](https://en.wikipedia.org/wiki/IP_address)\nwhich is visible to all websites you visit. However, most of the time this type\nof geolocation is _not accurate_ and is limited to the city or postal/zip code level.\n\nLocation Guard Ng does not protect your IP address; it hides the location revealed\nby the browser through the JavaScript API, which is usually _very accurate_.\n\n### How Location Guard Ng uses my information?\n\nLocation Guard Ng takes your privacy seriously! First, the extension itself has no\n\"special permission\" to access your location, it can obtain it only when a\nwebsite asks for it and only if you allow access in the permission dialog.\n\nLocation Guard Ng runs locally in your browser and _sends no information_\nwhatsoever to the network. It only communicates your fake location to the\nwebsite that asks for it.\n\nLocation Guard Ng also never stores your real location. The _fake_ location is\ncached for a small period of time; if a website asks for your location during\nthis time the cached fake location will be returned. This improves privacy by\navoiding to generate too many fake locations which would be centered around the\nreal one. The cache period can be configured from the extension's options\n(Privacy Levels tab) and there is also a button to delete the cache.\n\n### What is the technology behind Location Guard Ng?\n\nLocation Guard Ng implements a [location obfuscation](https://en.wikipedia.org/wiki/Location_obfuscation)\ntechnique based on adding noise from a 2-dimensional\n[Laplace distribution](https://en.wikipedia.org/wiki/Laplace_distribution).\nThis method can be formally shown to provide a privacy guarantee which is a variant\nof [Differential Privacy](https://en.wikipedia.org/wiki/Differential_privacy).\nMore details can be found in the [CCS'13 paper](http://arxiv.org/abs/1212.1984),\nor in the [PhD thesis](https://pastel.archives-ouvertes.fr/tel-01098088/document)\nof Nicolas Bordenabe.\n\n\u003c/details\u003e\n\n----\n\n**Location Guard Ng** © [Sukka](https://github.com/SukkaW), Released under the [MIT](./LICENSE) License.\nAuthored and maintained by Sukka with help from contributors ([list](https://github.com/SukkaW/location-guard-ng/graphs/contributors)).\n\n\u003e [Personal Website](https://skk.moe) · [Blog](https://blog.skk.moe) · GitHub [@SukkaW](https://github.com/SukkaW) · Telegram Channel [@SukkaChannel](https://t.me/SukkaChannel) · Mastodon [@sukka@acg.mn](https://acg.mn/@sukka) · Twitter [@isukkaw](https://twitter.com/isukkaw) · Keybase [@sukka](https://keybase.io/sukka)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/sponsors/SukkaW/\"\u003e\n    \u003cimg src=\"https://sponsor.cdn.skk.moe/sponsors.svg\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukkaw%2Flocation-guard-ng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsukkaw%2Flocation-guard-ng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukkaw%2Flocation-guard-ng/lists"}