Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 52.14.165.32
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp /
vendor /
fideloper /
proxy /
src /
Delete
Unzip
Name
Size
Permission
Date
Action
TrustProxies.php
2.93
KB
-rw-r--r--
2018-02-07 09:00
TrustedProxyServiceProvider.php
1.02
KB
-rw-r--r--
2018-02-07 09:00
Save
Rename
<?php namespace Fideloper\Proxy; use Closure; use Illuminate\Http\Request; use Illuminate\Contracts\Config\Repository; class TrustProxies { /** * The config repository instance. * * @var \Illuminate\Contracts\Config\Repository */ protected $config; /** * The trusted proxies for the application. * * @var array */ protected $proxies; /** * The proxy header mappings. * * @var array */ protected $headers; /** * Create a new trusted proxies middleware instance. * * @param \Illuminate\Contracts\Config\Repository $config */ public function __construct(Repository $config) { $this->config = $config; } /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * * @throws \Symfony\Component\HttpKernel\Exception\HttpException * * @return mixed */ public function handle(Request $request, Closure $next) { $request::setTrustedProxies([], $this->getTrustedHeaderNames()); // Reset trusted proxies between requests $this->setTrustedProxyIpAddresses($request); return $next($request); } /** * Sets the trusted proxies on the request to the value of trustedproxy.proxies * * @param \Illuminate\Http\Request $request */ protected function setTrustedProxyIpAddresses(Request $request) { $trustedIps = $this->proxies ?: $this->config->get('trustedproxy.proxies'); // Only trust specific IP addresses if (is_array($trustedIps)) { return $this->setTrustedProxyIpAddressesToSpecificIps($request, $trustedIps); } // Trust any IP address that calls us // `**` for backwards compatibility, but is depreciated if ($trustedIps === '*' || $trustedIps === '**') { return $this->setTrustedProxyIpAddressesToTheCallingIp($request); } } /** * Specify the IP addresses to trust explicitly. * * @param \Illuminate\Http\Request $request * @param array $trustedIps */ private function setTrustedProxyIpAddressesToSpecificIps(Request $request, $trustedIps) { $request->setTrustedProxies((array) $trustedIps, $this->getTrustedHeaderNames()); } /** * Set the trusted proxy to be the IP address calling this servers * * @param \Illuminate\Http\Request $request */ private function setTrustedProxyIpAddressesToTheCallingIp(Request $request) { $request->setTrustedProxies([$request->server->get('REMOTE_ADDR')], $this->getTrustedHeaderNames()); } /** * Retrieve trusted header name(s), falling back to defaults if config not set. * * @return array */ protected function getTrustedHeaderNames() { return $this->headers ?: $this->config->get('trustedproxy.headers'); } }