承接 bramr/tor-exits 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bramr/tor-exits

Composer 安装命令:

composer require bramr/tor-exits

包简介

Retrieves tor exit list from the tor project and make that available in a convenient way.

README 文档

README

A simple library to retreive a convenient list of current Tor exit nodes/relays.

Build Status Code Coverage Scrutinizer Code Quality

Installation

The easiest way to install tor-exits is with Composer.

composer require bramr/tor-exits

Usage

$clientIp = '127.0.0.1';

//simplest example using tor project exit node list
$parser = new TorProjectParser(new TorProjectCollector());
$ipList = IpList::fromParserWithCache($parser, new IpListJsonCache());

if ($ipList->contains($clientIp)) {
    echo 'client uses Tor.';
}

There is a lot more to configure, for more complex examples see: example.php

Important

Please don't use this code to outright block users coming from the Tor network.
There are perfectly valid reasons to use Tor. (and better ways to block all Tor traffic to your site)

Also never refresh the list more than once an hour.
The consensus document is only updated hourly, so fetching an exit node list more often is pointless.

I don't use this code in production myself. I use most of it for a personal project.
If you're running into problems feel free to contact me. I don't mind helping out.

License

MIT, for details see LICENSE file.

统计信息

  • 总下载量: 25
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固