Firefox 上的虚假位置

Ham*_*ita 1 html firefox geolocation

我想更改浏览器上的位置,我导航到

about:config

我设置

geo.enabled 为真

然后在

geo.wifi.uri

我放

data:application/json,{"location":{"latitude":xxx,"longitude":yyy,"accuracy":10}}

我在这些更改后重新启动浏览器,我使用的是 Firefox 54,但是当我验证它时,它告诉我我的真实位置,为什么它不起作用?我在做什么错?

小智 6

我将 Firefox 74.0 与 Selenium/Python 3.141.0 一起使用,以下内容将我置于纽约市。这可以手动或使用硒工作。

geo.prompt.testing, True
geo.prompt.testing.allow, True
geo.provider.testing, True
geo.provider.network.url, "data:application/json,{"location": {"lat": 40.7590, "lng": -73.9845}, "accuracy": 27000.0}"
Run Code Online (Sandbox Code Playgroud)