[GH-ISSUE #548] Proxy Config for Guzzle client #389

Closed
opened 2026-02-26 02:33:03 +03:00 by kerem · 1 comment
Owner

Originally created by @vikyd on GitHub (Mar 3, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/548

While running behind a proxy server, why not provides a proxy setting to allow Guzzle client(app/Application/getLatestVersion/$client->get) to access Github.

Here is my temporary solution:

$v = json_decode($client->get('https://api.github.com/repos/phanan/koel/tags', [
    'proxy' => [
        'http' => 'proxyserver:port', // Use this proxy with "http"
        'https' => 'proxyserver:port', // Use this proxy with "https",
        'no' => ['localhost']    // Don't use a proxy with these
    ]
])->getBody())[0]->name;

Original:

$v = json_decode($client->get('https://api.github.com/repos/phanan/koel/tags')->getBody())[0]->name;

Version: github.com/phanan/koel@03fe4c7e18

or

https://github.com/phanan/koel/releases/tag/v3.5.5

Originally created by @vikyd on GitHub (Mar 3, 2017). Original GitHub issue: https://github.com/koel/koel/issues/548 While running behind a proxy server, why not provides **a proxy setting** to allow Guzzle client(`app/Application/getLatestVersion/$client->get`) to access Github. Here is my temporary solution: ```php $v = json_decode($client->get('https://api.github.com/repos/phanan/koel/tags', [ 'proxy' => [ 'http' => 'proxyserver:port', // Use this proxy with "http" 'https' => 'proxyserver:port', // Use this proxy with "https", 'no' => ['localhost'] // Don't use a proxy with these ] ])->getBody())[0]->name; ``` Original: ```php $v = json_decode($client->get('https://api.github.com/repos/phanan/koel/tags')->getBody())[0]->name; ``` Version: https://github.com/phanan/koel/commit/03fe4c7e18587dada786f1624ba2a4ee3f929140 or https://github.com/phanan/koel/releases/tag/v3.5.5
kerem 2026-02-26 02:33:03 +03:00
Author
Owner

@phanan commented on GitHub (Mar 3, 2017):

Isn't this an edge case? I personally am not behind a proxy server, and can't say I'm familiar with one. If you could send a PR, I'd be happy to consider.

<!-- gh-comment-id:283848535 --> @phanan commented on GitHub (Mar 3, 2017): Isn't this an edge case? I personally am not behind a proxy server, and can't say I'm familiar with one. If you could send a PR, I'd be happy to consider.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#389
No description provided.