PHPackages                             perfocard/gate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. perfocard/gate

ActiveLibrary[HTTP &amp; Networking](/categories/http)

perfocard/gate
==============

A package for Laravel that globally configures a proxy for all outgoing Http Client requests.

v2.0.0(9mo ago)03MITPHPPHP ^8.1

Since Aug 21Pushed 9mo agoCompare

[ Source](https://github.com/perfocard/gate)[ Packagist](https://packagist.org/packages/perfocard/gate)[ RSS](/packages/perfocard-gate/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Perfocard Gate
==============

[](#perfocard-gate)

A lightweight package for Laravel that globally configures the Laravel HTTP Client (`Illuminate\Support\Facades\Http`) to use a proxy for all outgoing requests.

---

Features
--------

[](#features)

- Globally injects the `proxy` option into all outgoing HTTP requests
- Configurable via `config/gate.php`
- Simple enable/disable switch
- Throws a clear exception if misconfigured
- Supports `http`, `https`, `socks5`, etc.

---

Installation
------------

[](#installation)

```
composer require perfocard/gate
```

---

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="Perfocard\Gate\GateServiceProvider" --tag=config
```

This will create a file at `config/gate.php`:

```
return [
    'enabled' => env('GATE_ENABLED', false),

    // You can specify a single URL or an array of URLs
    'urls' => env('GATE_URLS'), // e.g., http://localhost:8080 or socks5://127.0.0.1:9050
];
```

In your `.env` file:

```
GATE_ENABLED=true
GATE_URLS=http://localhost:8080,http://proxy2:8080,socks5://127.0.0.1:9050

```

---

Usage
-----

[](#usage)

Once enabled, **all HTTP requests** using Laravel's HTTP client will automatically include the `proxy` option:

```
use Illuminate\Support\Facades\Http;

$response = Http::get('https://example.com');
```

No manual configuration per request is needed.

If you specify multiple URLs in `GATE_URLS`, Gate will automatically select one of them at random for each application run.

---

Notes
-----

[](#notes)

- If `gate.enabled = true` but no valid proxy URLs are set, a `GateNotConfigured` exception will be thrown.
- You can specify multiple proxy URLs (comma-separated in the env file or as an array in the config file). One of them will be selected at random.
- Internally, this package uses `Http::globalOptions()` to apply the proxy globally.

---

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/license/MIT).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance58

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

270d ago

Major Versions

v1.0.1 → v2.0.02025-08-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ee3cd0b38434e9b288941933661c44a2ae54e8fba0a2a2f979920f1f02ff0f2?d=identicon)[perfocard](/maintainers/perfocard)

---

Top Contributors

[![goszowski](https://avatars.githubusercontent.com/u/10208931?v=4)](https://github.com/goszowski "goszowski (4 commits)")

### Embed Badge

![Health badge](/badges/perfocard-gate/health.svg)

```
[![Health](https://phpackages.com/badges/perfocard-gate/health.svg)](https://phpackages.com/packages/perfocard-gate)
```

###  Alternatives

[danharrin/livewire-rate-limiting

Apply rate limiters to Laravel Livewire actions.

40523.1M27](/packages/danharrin-livewire-rate-limiting)[mateusjunges/laravel-kafka

A kafka driver for laravel

7163.1M17](/packages/mateusjunges-laravel-kafka)[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)[ricorocks-digital-agency/soap

A SOAP client that provides a clean interface for handling requests and responses.

4281.8M5](/packages/ricorocks-digital-agency-soap)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
