Submit
Path:
~
/
home
/
decas683
/
public_html
/
wordpress
/
wp-includes
/
File Content:
class-wp-http-proxy.php
<?php /** * HTTP API: WP_HTTP_Proxy class * * @package WordPress * @subpackage HTTP * @since 4.4.0 */ /** * Core class used to implement HTTP API proxy support. * * There are caveats to proxy support. It requires that defines be made in the wp-config.php file to * enable proxy support. There are also a few filters that plugins can hook into for some of the * constants. * * Please note that only BASIC authentication is supported by most transports. * cURL MAY support more methods (such as NTLM authentication) depending on your environment. * * The constants are as follows: * <ol> * <li>WP_PROXY_HOST - Enable proxy support and host for connecting.</li> * <li>WP_PROXY_PORT - Proxy port for connection. No default, must be defined.</li> * <li>WP_PROXY_USERNAME - Proxy username, if it requires authentication.</li> * <li>WP_PROXY_PASSWORD - Proxy password, if it requires authentication.</li> * <li>WP_PROXY_BYPASS_HOSTS - Will prevent the hosts in this list from going through the proxy. * You do not need to have localhost and the site host in this list, because they will not be passed * through the proxy. The list should be presented in a comma separated list, wildcards using * are supported, eg. *.wordpress.org</li> * </ol> * * An example can be as seen below. * * define('WP_PROXY_HOST', '192.168.84.101'); * define('WP_PROXY_PORT', '8080'); * define('WP_PROXY_BYPASS_HOSTS', 'localhost, www.example.com, *.wordpress.org'); * * @link https://core.trac.wordpress.org/ticket/4011 Proxy support ticket in WordPress. * @link https://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_PROXY_BYPASS_HOSTS * * @since 2.8.0 */ class WP_HTTP_Proxy { /** * Whether proxy connection should be used. * * @since 2.8.0 * * @use WP_PROXY_HOST * @use WP_PROXY_PORT * * @return bool */ public function is_enabled() { return defined('WP_PROXY_HOST') && defined('WP_PROXY_PORT'); } /** * Whether authentication should be used. * * @since 2.8.0 * * @use WP_PROXY_USERNAME * @use WP_PROXY_PASSWORD * * @return bool */ public function use_authentication() { return defined('WP_PROXY_USERNAME') && defined('WP_PROXY_PASSWORD'); } /** * Retrieve the host for the proxy server. * * @since 2.8.0 * * @return string */ public function host() { if ( defined('WP_PROXY_HOST') ) return WP_PROXY_HOST; return ''; } /** * Retrieve the port for the proxy server. * * @since 2.8.0 * * @return string */ public function port() { if ( defined('WP_PROXY_PORT') ) return WP_PROXY_PORT; return ''; } /** * Retrieve the username for proxy authentication. * * @since 2.8.0 * * @return string */ public function username() { if ( defined('WP_PROXY_USERNAME') ) return WP_PROXY_USERNAME; return ''; } /** * Retrieve the password for proxy authentication. * * @since 2.8.0 * * @return string */ public function password() { if ( defined('WP_PROXY_PASSWORD') ) return WP_PROXY_PASSWORD; return ''; } /** * Retrieve authentication string for proxy authentication. * * @since 2.8.0 * * @return string */ public function authentication() { return $this->username() . ':' . $this->password(); } /** * Retrieve header string for proxy authentication. * * @since 2.8.0 * * @return string */ public function authentication_header() { return 'Proxy-Authorization: Basic ' . base64_encode( $this->authentication() ); } /** * Whether URL should be sent through the proxy server. * * We want to keep localhost and the site URL from being sent through the proxy server, because * some proxies can not handle this. We also have the constant available for defining other * hosts that won't be sent through the proxy. * * @since 2.8.0 * * @staticvar array|null $bypass_hosts * @staticvar array $wildcard_regex * * @param string $uri URI to check. * @return bool True, to send through the proxy and false if, the proxy should not be used. */ public function send_through_proxy( $uri ) { /* * parse_url() only handles http, https type URLs, and will emit E_WARNING on failure. * This will be displayed on sites, which is not reasonable. */ $check = @parse_url($uri); // Malformed URL, can not process, but this could mean ssl, so let through anyway. if ( $check === false ) return true; $home = parse_url( get_option('siteurl') ); /** * Filters whether to preempt sending the request through the proxy server. * * Returning false will bypass the proxy; returning true will send * the request through the proxy. Returning null bypasses the filter. * * @since 3.5.0 * * @param null $override Whether to override the request result. Default null. * @param string $uri URL to check. * @param array $check Associative array result of parsing the URI. * @param array $home Associative array result of parsing the site URL. */ $result = apply_filters( 'pre_http_send_through_proxy', null, $uri, $check, $home ); if ( ! is_null( $result ) ) return $result; if ( 'localhost' == $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) ) return false; if ( !defined('WP_PROXY_BYPASS_HOSTS') ) return true; static $bypass_hosts = null; static $wildcard_regex = array(); if ( null === $bypass_hosts ) { $bypass_hosts = preg_split('|,\s*|', WP_PROXY_BYPASS_HOSTS); if ( false !== strpos(WP_PROXY_BYPASS_HOSTS, '*') ) { $wildcard_regex = array(); foreach ( $bypass_hosts as $host ) $wildcard_regex[] = str_replace( '\*', '.+', preg_quote( $host, '/' ) ); $wildcard_regex = '/^(' . implode('|', $wildcard_regex) . ')$/i'; } } if ( !empty($wildcard_regex) ) return !preg_match($wildcard_regex, $check['host']); else return !in_array( $check['host'], $bypass_hosts ); } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
ID3
---
0755
IXR
---
0755
Requests
---
0755
SimplePie
---
0755
Text
---
0755
blocks
---
0755
certificates
---
0755
css
---
0755
customize
---
0755
fonts
---
0755
images
---
0755
js
---
0755
pomo
---
0755
random_compat
---
0755
rest-api
---
0755
theme-compat
---
0755
widgets
---
0755
admin-bar.php
28868 bytes
0644
aejsnhgb.php
760 bytes
0644
atomlib.php
11839 bytes
0644
author-template.php
16354 bytes
0644
blocks.php
16243 bytes
0644
bookmark-template.php
11699 bytes
0644
bookmark.php
13682 bytes
0644
cache.php
21621 bytes
0644
canonical.php
27583 bytes
0644
capabilities.php
28649 bytes
0644
category-template.php
51758 bytes
0644
category.php
11984 bytes
0644
class-IXR.php
2573 bytes
0644
class-feed.php
522 bytes
0644
class-http.php
36164 bytes
0644
class-json.php
40472 bytes
0644
class-oembed.php
33148 bytes
0644
class-phpass.php
7317 bytes
0644
class-phpmailer.php
148234 bytes
0644
class-pop3.php
20919 bytes
0644
class-requests.php
29790 bytes
0644
class-simplepie.php
89264 bytes
0644
class-smtp.php
39478 bytes
0644
class-snoopy.php
37785 bytes
0644
class-walker-category-dropdown.php
2099 bytes
0644
class-walker-category.php
6646 bytes
0644
class-walker-comment.php
11173 bytes
0644
class-walker-nav-menu.php
8392 bytes
0644
class-walker-page-dropdown.php
2279 bytes
0644
class-walker-page.php
6713 bytes
0644
class-wp-admin-bar.php
16969 bytes
0644
class-wp-ajax-response.php
5024 bytes
0644
class-wp-block-parser.php
15215 bytes
0644
class-wp-block-type-registry.php
5089 bytes
0644
class-wp-block-type.php
4815 bytes
0644
class-wp-comment-query.php
41780 bytes
0644
class-wp-comment.php
8936 bytes
0644
class-wp-customize-control.php
24984 bytes
0644
class-wp-customize-manager.php
199201 bytes
0644
class-wp-customize-nav-menus.php
53561 bytes
0644
class-wp-customize-panel.php
9576 bytes
0644
class-wp-customize-section.php
10197 bytes
0644
class-wp-customize-setting.php
28132 bytes
0644
class-wp-customize-widgets.php
65752 bytes
0644
class-wp-dependency.php
1992 bytes
0644
class-wp-editor.php
61023 bytes
0644
class-wp-embed.php
14509 bytes
0644
class-wp-error.php
4585 bytes
0644
class-wp-feed-cache-transient.php
2537 bytes
0644
class-wp-feed-cache.php
745 bytes
0644
class-wp-hook.php
14052 bytes
0644
class-wp-http-cookie.php
6456 bytes
0644
class-wp-http-curl.php
11679 bytes
0644
class-wp-http-encoding.php
6444 bytes
0644
class-wp-http-ixr-client.php
3250 bytes
0644
class-wp-http-proxy.php
5957 bytes
0644
class-wp-http-requests-hooks.php
1872 bytes
0644
class-wp-http-requests-response.php
4273 bytes
0644
class-wp-http-response.php
2871 bytes
0644
class-wp-http-streams.php
14995 bytes
0644
class-wp-image-editor-gd.php
12921 bytes
0644
class-wp-image-editor-imagick.php
21676 bytes
0644
class-wp-image-editor.php
11730 bytes
0644
class-wp-list-util.php
6369 bytes
0644
class-wp-locale-switcher.php
5005 bytes
0644
class-wp-locale.php
14547 bytes
0644
class-wp-matchesmapregex.php
1796 bytes
0644
class-wp-meta-query.php
22283 bytes
0644
class-wp-metadata-lazyloader.php
5372 bytes
0644
class-wp-network-query.php
17160 bytes
0644
class-wp-network.php
12129 bytes
0644
class-wp-oembed-controller.php
5944 bytes
0644
class-wp-post-type.php
18236 bytes
0644
class-wp-post.php
6355 bytes
0644
class-wp-query.php
125035 bytes
0644
class-wp-rewrite.php
58908 bytes
0644
class-wp-role.php
2614 bytes
0644
class-wp-roles.php
8187 bytes
0644
class-wp-session-tokens.php
7338 bytes
0644
class-wp-simplepie-file.php
2272 bytes
0644
class-wp-simplepie-sanitize-kses.php
1774 bytes
0644
class-wp-site-query.php
23221 bytes
0644
class-wp-site.php
7318 bytes
0644
class-wp-tax-query.php
19370 bytes
0644
class-wp-taxonomy.php
9993 bytes
0644
class-wp-term-query.php
34167 bytes
0644
class-wp-term.php
5273 bytes
0644
class-wp-text-diff-renderer-inline.php
712 bytes
0644
class-wp-text-diff-renderer-table.php
16180 bytes
0644
class-wp-theme.php
48760 bytes
0644
class-wp-user-meta-session-tokens.php
2916 bytes
0644
class-wp-user-query.php
29525 bytes
0644
class-wp-user.php
20679 bytes
0644
class-wp-walker.php
12378 bytes
0644
class-wp-widget-factory.php
3746 bytes
0644
class-wp-widget.php
17658 bytes
0644
class-wp-xmlrpc-server.php
202146 bytes
0644
class-wp.php
23974 bytes
0644
class.wp-dependencies.php
11185 bytes
0644
class.wp-scripts.php
16749 bytes
0644
class.wp-styles.php
9794 bytes
0644
comment-template.php
88643 bytes
0644
comment.php
111793 bytes
0644
compat.php
17451 bytes
0644
cron.php
16467 bytes
0644
date.php
35454 bytes
0644
default-constants.php
9561 bytes
0644
default-filters.php
28500 bytes
0644
default-widgets.php
2180 bytes
0644
deprecated.php
114267 bytes
0644
embed-template.php
344 bytes
0644
embed.php
45000 bytes
0644
feed-atom-comments.php
5357 bytes
0644
feed-atom.php
3090 bytes
0644
feed-rdf.php
2670 bytes
0644
feed-rss.php
1246 bytes
0644
feed-rss2-comments.php
4064 bytes
0644
feed-rss2.php
3773 bytes
0644
feed.php
19550 bytes
0644
formatting.php
274103 bytes
0644
functions.php
191048 bytes
0644
functions.wp-scripts.php
12538 bytes
0644
functions.wp-styles.php
8080 bytes
0644
general-template.php
140624 bytes
0644
http.php
22182 bytes
0644
jisakwkc.php
760 bytes
0644
kses.php
54239 bytes
0644
l10n.php
50874 bytes
0644
link-template.php
136453 bytes
0644
load.php
34885 bytes
0644
locale.php
141 bytes
0644
media-template.php
46469 bytes
0644
media.php
141152 bytes
0644
meta.php
45613 bytes
0644
ms-blogs.php
39181 bytes
0644
ms-default-constants.php
4715 bytes
0644
ms-default-filters.php
4653 bytes
0644
ms-deprecated.php
16158 bytes
0644
ms-files.php
2620 bytes
0644
ms-functions.php
91131 bytes
0644
ms-load.php
19248 bytes
0644
ms-settings.php
4088 bytes
0644
nav-menu-template.php
20871 bytes
0644
nav-menu.php
39756 bytes
0644
option.php
67744 bytes
0644
p.php
2819 bytes
0644
pluggable-deprecated.php
6262 bytes
0644
pluggable.php
92744 bytes
0644
plugin.php
31677 bytes
0644
post-formats.php
6976 bytes
0644
post-template.php
58915 bytes
0644
post-thumbnail-template.php
8444 bytes
0644
post.php
227295 bytes
0644
query.php
31500 bytes
0644
registration-functions.php
178 bytes
0644
registration.php
178 bytes
0644
rest-api.php
41411 bytes
0644
revision.php
21305 bytes
0644
rewrite.php
17502 bytes
0644
rss-functions.php
191 bytes
0644
rss.php
23208 bytes
0644
script-loader.php
103362 bytes
0644
session.php
242 bytes
0644
setting.php
26825 bytes
0644
shortcodes.php
21396 bytes
0644
spl-autoload-compat.php
2574 bytes
0644
taxonomy.php
150943 bytes
0644
template-loader.php
2896 bytes
0644
template.php
19792 bytes
0644
theme.php
100092 bytes
0644
update.php
24691 bytes
0644
user.php
121518 bytes
0644
vars.php
5582 bytes
0644
version.php
620 bytes
0644
widgets.php
56164 bytes
0644
wlwmanifest.xml
1045 bytes
0644
wp-db.php
99564 bytes
0644
wp-diff.php
661 bytes
0644
N4ST4R_ID | Naxtarrr