承接 glooby/http-client-bundle 相关项目开发

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

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

glooby/http-client-bundle

Composer 安装命令:

composer require glooby/http-client-bundle

包简介

Advanced http proxying

README 文档

README

Requirements

  • PHP 5.6 or above
  • [Guzzle PHP Framework][guzzle] (included by composer)
  • Symfony 2.7 or above (including Symfony 3.x)

Installation

To install this bundle, run the command below and you will get the latest version by [Packagist][packagist].

composer require glooby/http-client-bundle dev-master

To use the newest (maybe unstable) version please add following into your composer.json:

{
    "require": {
        "glooby/http-client-bundle": "dev-master"
    }
}

Load bundle in AppKernel.php:

    public function registerBundles()
    {
        $bundles = [
            ...
            new Glooby\HttpClientBundle\GloobyHttpClientBundle(),
            ...
        ];
    }

Configuration

Configure in app/config/parameters.yml:

single

parameters:
...
    glooby.http.proxy: socks5://127.0.0.1:1080

file

parameters:
...
    glooby.http.proxy: /etc/proxyfile
$ cat /etc/proxy

socks5://127.0.0.1:1080

Supports single/multiple lines

multiple

parameters:
...
    glooby.http.proxy:
        - http://127.0.0.1:1081
        - socks5://127.0.0.1:1080
        - socks4://127.0.0.1:1082

mix

parameters:
...
    glooby.http.proxy:
        - socks5://127.0.0.1:1080
        - socks5://john:doe@127.0.0.1:1081
        - /etc/proxy1
        - /etc/proxy2

When providing multiple proxies a random one will be select each time creating a new client

Usage

$ip = $this->get('glooby.http.client')->get('http://api.ipify.org')->getBody();

Support

Supported proxy types

  • http
  • https
  • socks4
  • socks4a
  • socks5
  • socks5h

License

This bundle is released under the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固