hipudding / teslamate_fix_addrs

Fix empty address in teslamate
9 stars 5 forks source link

No socks proxy supported #11

Open DongZhaoXiong opened 1 month ago

DongZhaoXiong commented 1 month ago

由于没有socks支持,当使用socks proxy时,请求失败。自行构建image后,遇到如下报错:

ERROR:root:Http request failed by url: https://nominatim.openstreetmap.org/reverse?lat=39.968654&lon=116.485594&format=jsonv2&addressdetails=1&extratags=1&namedetails=1&zoom=18, code: 403, body:

Access blocked

Access blocked

You have been blocked because you have violated the usage policy of OSM's Nominatim geocoding service. Please be aware that OSM's resources are limited and shared between many users. The usage policy is there to ensure that the service remains usable for everybody.

Please review the terms and make sure that your software adheres to the terms. You should in particular verify that you have set a custom HTTP referrer or HTTP user agent that identifies your application, and that you are not overusing the service with massive bulk requests.

If you feel that this block is unjustified or remains after you have adopted your usage, you may contact the Nominatim system administrator at nominatim@openstreetmap.org to have this block lifted.

odinms commented 1 month ago

???报错明明说的是,你超出了osm的api调用限制。。不是你proxy有问题,连不到osm。反而实际情况是你连上了,还超出了限制。。改个特别的ua就可以了。

DongZhaoXiong commented 1 month ago

对的,开始由于镜像中没有执行socks协议的包所以一直在调用OSM API 失败retry,导致超限,之后我rebuild了一下镜像,添加了socks的依赖,proxy没问题了,但是由于之前的频繁调用,就出现这个报错了

hipudding commented 1 month ago

-ua teslamate/#v1.30.1 也可以更新镜像,默认ua已经设置

hipudding commented 1 month ago

对的,开始由于镜像中没有执行socks协议的包所以一直在调用OSM API 失败retry,导致超限,之后我rebuild了一下镜像,添加了socks的依赖,proxy没问题了,但是由于之前的频繁调用,就出现这个报错了

你好,可以提PR添加sockets协议么?

DongZhaoXiong commented 1 month ago

对的,开始由于镜像中没有执行socks协议的包所以一直在调用OSM API 失败retry,导致超限,之后我rebuild了一下镜像,添加了socks的依赖,proxy没问题了,但是由于之前的频繁调用,就出现这个报错了

你好,可以提PR添加sockets协议么?

ok的