Customize proxy URL connection. Method to allow derived handlers to customize the connection.
967616
protected void customizeConnection(String pathInContext, String pathParams, HttpRequest request, URLConnection connection) throws IOException
    {
    }
44802
def extend(self, http_api, route="", base_url="", **kwargs):
        """"""
        self.versions.update(http_api.versions)
        base_url = base_url or self.base_url

        for router_base_url, routes in http_api.routes.items():
            self.routes.setdefault(base_url, OrderedDict())
            for item_route, handler in routes.items():
                for method, versions in handler.items():
                    for version, function in versions.items():
                        function.interface.api = self.api
                self.routes[base_url].setdefault(route + item_route, {}).update(handler)

        for sink_base_url, sinks in http_api.sinks.items():
            for url, sink in sinks.items():
                self.add_sink(sink, route + url, base_url=base_url)

        for middleware in (http_api.middleware or ()):
            self.add_middleware(middleware)

        for version, handler in getattr(http_api, '_exception_handlers', {}).items():
            for exception_type, exception_handlers in handler.items():
                target_exception_handlers = self.exception_handlers(version) or {}
                for exception_handler in exception_handlers:
                    if exception_type not in target_exception_handlers:
                        self.add_exception_handler(exception_type, exception_handler, version)

        for input_format, input_format_handler in getattr(http_api, '_input_format', {}).items():
            if not input_format in getattr(self, '_input_format', {}):
                self.set_input_format(input_format, input_format_handler)

        for version, handler in http_api.not_found_handlers.items():
            if version not in self.not_found_handlers:
                self.set_not_found_handler(handler, version)
106312
def connection_made(self, address):
        """"""
        self._proxy = PickleProxy(self.loop, self)
        for d in self._proxy_deferreds:
            d.callback(self._proxy)
66579
def access(self, name: str, rename: Optional[str] = None) -> 'ProxyAttr':
        
        self.getter(name, rename)
        self.setter(name, rename)
        return self
19049
protected final void setHttpProxyHost(String proxyHost) {
        httpConf = new MyHttpClientConfiguration(proxyHost
                , httpConf.getHttpProxyUser()
                , httpConf.getHttpProxyPassword()
                , httpConf.getHttpProxyPort()
                , httpConf.isHttpProxySocks()
                , httpConf.getHttpConnectionTimeout()
                , httpConf.getHttpReadTimeout()
                , httpConf.isPrettyDebugEnabled(), httpConf.isGZIPEnabled()
        );
    }
712502
def connect(self, event, handler):
        """"""
        interface = self._proxy.get_interface_name()
        return self.object.connect(interface, event, handler)
675704
public static MethodHandleProxy proxyMethod(Object target,String methodName,Object ...args)
	{
		MethodHandle mh=findMethodHandle(target, methodName, args);
		if(mh!=null)
		{
			return new MethodHandleProxy(target, mh, args);
		}
		return null;
	}
411949
def _update_proxy(self, change):
        
        if change['type'] == 'event' and self.proxy_is_active:
            self.proxy.set_opened(change['name'] == 'show')
        else:
            super(ActionMenuView, self)._update_proxy(change)
799677
def _request(self, http_method, relative_url='', **kwargs):
        """"""
        # It could be possible to call api.resource.get('/index')
        # but it would be non-intuitive that the path would resolve
        # to root of domain
        relative_url = self._remove_leading_slash(relative_url)

        # Add default kwargs with possible custom kwargs returned by
        # before_request
        new_kwargs = self.default_kwargs().copy()
        custom_kwargs = self.before_request(
            http_method,
            relative_url,
            kwargs.copy()
        )
        new_kwargs.update(custom_kwargs)

        response = requests.request(
            http_method,
            self._join_url(relative_url),
            **new_kwargs
        )

        return self.after_request(response)
749981
def proxy(ctx, bind, port):
    
    app = web.Application()
    app.on_startup.append(startup_proxy)
    app.on_cleanup.append(cleanup_proxy)

    app.router.add_route("GET", r'/stream/{path:.*$}', websocket_handler)
    app.router.add_route("GET", r'/wsproxy/{path:.*$}', websocket_handler)
    app.router.add_route('*', r'/{path:.*$}', web_handler)
    if getattr(ctx.args, 'testing', False):
        return app
    web.run_app(app, host=bind, port=port)
1323725
private void configureProxyServer(ChannelPipeline clientPipeline) {
        if (proxyServerConfiguration != null && sslConfig != null) {
            if (proxyServerConfiguration.getProxyUsername() != null
                    && proxyServerConfiguration.getProxyPassword() != null) {
                clientPipeline.addLast(Constants.PROXY_HANDLER,
                        new HttpProxyHandler(proxyServerConfiguration.getInetSocketAddress(),
                                proxyServerConfiguration.getProxyUsername(),
                                proxyServerConfiguration.getProxyPassword()));
            } else {
                clientPipeline.addLast(Constants.PROXY_HANDLER,
                        new HttpProxyHandler(proxyServerConfiguration.getInetSocketAddress()));
            }
        }
    }
346715
def proxy_route_request(self, url, environ):
        
        if self.proxy_default_timestamp:
            environ['pywb_proxy_default_timestamp'] = self.proxy_default_timestamp

        return self.proxy_prefix + url
1021471
public void setHTTPProxy(String PROXYNAME, int PROXYPORT) {
		if (PROXYNAME == null) {
			this.proxy_to_use = null;
		}
		else {
			this.proxy_to_use = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(PROXYNAME, PROXYPORT));
		}
	}
786113
def http_proxy(addr = nil, port = nil, user = nil, pass = nil)
      default_options[:http_proxyaddr] = addr
      default_options[:http_proxyport] = port
      default_options[:http_proxyuser] = user
      default_options[:http_proxypass] = pass
    end
748253
public static void applyProxy(Proxy use) {
    System.setProperty("java.net.useSystemProxies", "false");
    System.setProperty("http.proxyHost", use.getIp());
    System.setProperty("http.proxyPort", String.valueOf(use.getPort()));
    System.setProperty("https.proxyHost", use.getIp());
    System.setProperty("https.proxyPort", String.valueOf(use.getPort()));
  }
667545
public Connection createConnectionProxy(Connection connection) {
		assert connection != null;
		// même si le counter sql n'est pas affiché on crée un proxy de la connexion
		// pour avoir les graphiques USED_CONNECTION_COUNT et ACTIVE_CONNECTION_COUNT (cf issue 160)
		if (isMonitoringDisabled()) {
			return connection;
		}
		final ConnectionInvocationHandler invocationHandler = new ConnectionInvocationHandler(
				connection);
		final Connection result = createProxy(connection, invocationHandler);
		if (result != connection) {
			invocationHandler.init();
		}
		return result;
	}
1175897
private static InetSocketAddress overrideProxy(String proxyHostPort) {
    if (proxyHostPort == null) {
      return null;
    }

    String[] parts = proxyHostPort.split(":", 2);
    int port = 80;
    if (parts.length > 1) {
      port = Integer.parseInt(parts[1]);
    }
    log.warning(
        "Detected GRPC_PROXY_EXP and will honor it, but this feature will "
            + "be removed in a future release. Use the JVM flags "
            + "\"-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT\" to set the https proxy for "
            + "this JVM.");
    return new InetSocketAddress(parts[0], port);
  }