Proxy the exec for bridge changes. See CB-10106
354560
function cordovaExec() {
    var cexec = require('cordova/exec');
    var cexec_valid = (typeof cexec.nativeFetchMessages === 'function') && (typeof cexec.nativeEvalAndFetch === 'function') && (typeof cexec.nativeCallback === 'function');
    return (cexec_valid && execProxy !== cexec)? cexec : iOSExec;
}
406745
function proxy() {
    // cannot re-use cmd, modifiying breaks subsequent
    // method invocations must use a local variable
    var name = cmd
      , args = [].slice.call(arguments)
      , cb;

    if(typeof args[args.length - 1] === 'function') {
      cb = args.pop();
    }
    this.execute(cmd, args, cb);
    return this;
  }
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)
1211384
def new_contract_proxy(self, contract_interface, contract_address: Address):
        
        return ContractProxy(
            self,
            contract=self.new_contract(contract_interface, contract_address),
        )
989739
def add_proxy(self, proxy):
        
        protocol = proxy.protocol
        addr = proxy.addr
        if addr in self.proxies:
            self.proxies[protocol][addr].last_checked = proxy.last_checked
        else:
            self.proxies[protocol][addr] = proxy
            self.addr_list[protocol].append(addr)
735397
function HttpsProxyingAgent(options) {
  options.tunnel = true;
  ProxyingAgent.call(this, options, https.Agent);
}
1307578
def _update_proxy(self, change):
        
        if change['name'] in ['row', 'column']:
            super(AbstractWidgetItem, self)._update_proxy(change)
        else:
            self.proxy.data_changed(change)
540538
def setup()
      send_bridge_request
      code = nil
			name = nil
			headers = []
			while (line = gets())
				line = line.strip
				if (line == "")
					case code.to_i
					when 100 # 100 Continue, just a ping. Ignore.
						code = name = nil
						headers = []
						next
					when 101 # 101 Upgrade, successfuly got a connection.
						write("HTTP/1.1 100 Continue\r\n\r\n") # let the server know we're still here.
						return self
					when 401 # 401 Access Denied, key wasn't right.
					  close()
					  raise "HTTP BRIDGE error #{code}: host key was invalid or missing, but required."
					when 503, 504 # 503 Service Unavailable or 504 Gateway Timeout, just retry.
						close()
						sleep_time = headers.find {|header| header["Retry-After"] } || 5
						raise RetryError.new("BRIDGE server timed out or is overloaded, wait #{sleep_time}s to try again.", sleep_time)
					else
						raise "HTTP BRIDGE error #{code}: #{name} waiting for connection."
					end
				end
		
				if (!code && !name) # This is the initial response line
					if (match = line.match(%r{^HTTP/1\.[01] ([0-9]{3,3}) (.*)$}))
						code = match[1]
						name = match[2]
						next
					else
						raise "Parse error in BRIDGE request reply."
					end
				else
					if (match = line.match(%r{^(.+?):\s+(.+)$}))
						headers.push({match[1] => match[2]})
					else
						raise "Parse error in BRIDGE request reply's headers."
					end
				end
			end
			return nil
		end
1116873
def _prepare_proxy(self, conn):
        
        conn.set_tunnel(self._proxy_host, self.port, self.proxy_headers)
        conn.connect()
1059853
function proxy(req, endpoint) {
	var source = req.connection;
	var target;

	source.pause();

	target = net.connect(endpoint, function proxyHandler() {
		// the header has already been consumed, so we must recreate it and send it first

		target.write(recreateRequestHeader(req));

		target.pipe(source);
		source.pipe(target);

		source.resume();
	});

	target.setTimeout(0);
	target.setNoDelay(true);
	target.setKeepAlive(true, 0);

	return target;
}
940326
function proxy(func){
    'use strict';

    // Returns a middleware
    return function (kontx, next){
        func(kontx.args).then(
            function(payload){
                kontx.payload = payload;
                next();
            },
            function(err){
                next(err);
            }
        );
    };
}
495929
public function updateProxy(ProxyGenerator &$proxy)
    {
        $proxy = $proxy->addMethod('manipulate', function ($args, $next) {
            $manipulation = $args[0];
            SearchUpdater::handle_manipulation($manipulation);
            return $next(...$args);
        });
    }
1154171
protected void releaseProxyWriteBuffer() {
        WsByteBuffer buffer = connLink.getWriteInterface().getBuffer();
        if (null != buffer) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Releasing proxy write buffer: " + buffer);
            }
            buffer.release();
            connLink.getWriteInterface().setBuffer(null);
        }
    }
655713
public static <T> T buildProxy(String proxyType, Class<T> clazz, Invoker proxyInvoker) throws Exception {
        try {
            ExtensionClass<Proxy> ext = ExtensionLoaderFactory.getExtensionLoader(Proxy.class)
                .getExtensionClass(proxyType);
            if (ext == null) {
                throw ExceptionUtils.buildRuntime("consumer.proxy", proxyType,
                    "Unsupported proxy of client!");
            }
            Proxy proxy = ext.getExtInstance();
            return proxy.getProxy(clazz, proxyInvoker);
        } catch (SofaRpcRuntimeException e) {
            throw e;
        } catch (Throwable e) {
            throw new SofaRpcRuntimeException(e.getMessage(), e);
        }
    }
1283051
public <T> T newImpersonatingProxy(Class<T> type, T core) {
        return new InterceptingProxy() {
            protected Object call(Object o, Method m, Object[] args) throws Throwable {
                final Executor old = IMPERSONATION.get();
                IMPERSONATION.set(Executor.this);
                try {
                    return m.invoke(o,args);
                } finally {
                    IMPERSONATION.set(old);
                }
            }
        }.wrap(type,core);
    }
123096
function setupForCorporateProxy(proxyConfig) {
  if (!Array.isArray(proxyConfig)) {
    proxyConfig = [proxyConfig];
  }

  const proxyServer = process.env.http_proxy || process.env.HTTP_PROXY;
  let agent = null;

  if (proxyServer) {
    console.log(`Using corporate proxy server: ${proxyServer}`);
    agent = new HttpsProxyAgent(proxyServer);
    proxyConfig.forEach(entry => { entry.agent = agent; });
  }

  return proxyConfig;
}
586921
function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '', $proxyauthtype = 'basic') {
		if ($proxyhost) {
			$this->proxy = array(
				'host' => $proxyhost,
				'port' => $proxyport,
				'username' => $proxyusername,
				'password' => $proxypassword,
				'authtype' => $proxyauthtype
			);
			if ($proxyusername != '' && $proxypassword != '' && $proxyauthtype = 'basic') {
				$this->setHeader('Proxy-Authorization', ' Basic '.base64_encode($proxyusername.':'.$proxypassword));
			}
		} else {
			$this->debug('remove proxy');
			$proxy = null;
			unsetHeader('Proxy-Authorization');
		}
	}