⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.247
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.21
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
php
/
Composer
/
Util
/
Http
/
View File Name :
RequestProxy.php
* Jordi Boggiano
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Util\Http; use Composer\Util\Url; /** * @internal * @author John Stevenson
*/ class RequestProxy { /** @var mixed[] */ private $contextOptions; /** @var bool */ private $isSecure; /** @var string */ private $formattedUrl; /** @var string */ private $url; /** * @param string $url * @param mixed[] $contextOptions * @param string $formattedUrl */ public function __construct($url, array $contextOptions, $formattedUrl) { $this->url = $url; $this->contextOptions = $contextOptions; $this->formattedUrl = $formattedUrl; $this->isSecure = 0 === strpos($url, 'https://'); } /** * Returns an array of context options * * @return mixed[] */ public function getContextOptions() { return $this->contextOptions; } /** * Returns the safe proxy url from the last request * * @param string|null $format Output format specifier * @return string Safe proxy, no proxy or empty */ public function getFormattedUrl($format = '') { $result = ''; if ($this->formattedUrl) { $format = $format ?: '%s'; $result = sprintf($format, $this->formattedUrl); } return $result; } /** * Returns the proxy url * * @return string Proxy url or empty */ public function getUrl() { return $this->url; } /** * Returns true if this is a secure-proxy * * @return bool False if not secure or there is no proxy */ public function isSecure() { return $this->isSecure; } }