开发者

Python - Determine if ip is proxy or not

开发者 https://www.devze.com 2023-04-04 03:19 出处:网络
Is there any way how to find out, if ip address comming to the server is proxy in Python? I tried to scan most common ports, but i don\'t want to ban all ips with open 80 port, because it don\'t have

Is there any way how to find out, if ip address comming to the server is proxy in Python?

I tried to scan most common ports, but i don't want to ban all ips with open 80 port, because it don't have to be proxy.

Is there any开发者_运维百科 way how to do it in Python? I would prefere it before using some external/paid services.


If it's a HTTP traffic, you can scan for headers like X-Forwarded-For.

But whatever you do it will always be only a heuristic.

0

精彩评论

暂无评论...
验证码 换一张
取 消