A read-only version of proxy, see above.
439214
function (originalObj, originalProp, targetObj, targetProp) {
                Object.defineProperty(
                    originalObj,
                    originalProp,
                    {
                        get: function () {
                            return targetObj[targetProp];
                        },
                        set: function (newValue) {
                            console.error(targetProp + ' is read-only.');
                            throw new Error('ReadOnly');
                        }
                    }
                );
            }
375048
public static Proxy httpProxy(String host, int port) {
        return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(Objects.requireNonNull(host), port));
    }
352084
def setproxy(ctx, proxy_account, account):
    
    print_tx(ctx.bitshares.set_proxy(proxy_account, account=account))
1032031
private Proxy lookupProxy(String hostKey, String portKey, Proxy.Type type, int defaultPort) {
        String host = System.getProperty(hostKey);
        if (host == null || host.isEmpty()) {
            return null;
        }

        int port = getSystemPropertyInt(portKey, defaultPort);
        return new Proxy(type, InetSocketAddress.createUnresolved(host, port));
    }
771356
def get_proxy():
    """"""
    proxies = _config['proxies']

    return proxies[
        random.randint(0, len(proxies) - 1)
    ] if len(proxies) > 0 else None
995439
function proxy()
    {
        if (!UserRights(EDITOR))
            die;

        $filename = Eresus_CMS::getLegacyKernel()->request['path'] .
            Eresus_CMS::getLegacyKernel()->request['file'];
        $filename = Eresus_CMS::getLegacyKernel()->froot . substr($filename,
                strlen(Eresus_CMS::getLegacyKernel()->root));

        if (is_dir($filename))
        {
            $filename = Eresus_FS_Tool::normalize($filename . '/index.php');
        }

        if (!is_file($filename))
        {
            header('Not found', true, 404);
            die('<h1>Not found.</h1>');
        }

        $ext = strtolower(substr($filename, strrpos($filename, '.') + 1));

        switch (true)
        {
            case in_array($ext, array('png', 'jpg', 'jpeg', 'gif')):
                $info = getimagesize($filename);
                header('Content-type: '.$info['mime']);
                echo file_get_contents($filename);
                break;

            case $ext == 'js':
                header('Content-type: text/javascript');
                $s = file_get_contents($filename);
                $s = $this->replaceMacros($s);
                echo $s;
                break;

            case $ext == 'css':
                header('Content-type: text/css');
                $s = file_get_contents($filename);
                $s = $this->replaceMacros($s);
                echo $s;
                break;

            case $ext == 'html':
            case $ext == 'htm':
                header('Content-type: text/html');
                $s = file_get_contents($filename);
                $s = $this->replaceMacros($s);
                echo $s;
                break;

            case $ext == 'php':
                Eresus_CMS::getLegacyKernel()->conf['debug']['enable'] = false;
                restore_error_handler();
                chdir(dirname($filename));
                require $filename;
                break;
        }
    }
678767
def no_proxy(self, value):
        
        self._verify_proxy_type_compatibility(ProxyType.MANUAL)
        self.proxyType = ProxyType.MANUAL
        self.noProxy = value
762302
function findProxyObject(uri, proxyName, callback) {
    var proxyObject = {},
        folderUri = path.join(uri, proxyName)

    iterateFiles(folderUri, function (fileName) {
        var relativePropertyName = path.relative(folderUri, fileName),
            relativeValue = path.relative(uri, fileName)

        relativePropertyName = relativePropertyName.replace(isFile, "")
        var props = relativePropertyName.split("/")

        props.reduce(function (memo, value, index) {
            if (index === props.length - 1) {
                memo[value] = relativeValue
            } else {
                return (memo[value] = memo[value] || {})
            }
        }, proxyObject)

    }, function (err) {
        callback(err, proxyObject)
    })

    //fs.readdir(folderUri, mapIntoProxyObject)

    function mapIntoProxyObject(err, files) {
        if (err) {
            return callback(err)
        }
        files.filter(isFileFunction).forEach(addToProxyObject)
        callback(null, proxyObject)
    }

    function addToProxyObject(fileName) {
        var propertyName = fileName.replace(isFile, "")

        proxyObject[propertyName] = 
            path.join(proxyName, fileName)
    }
}
337770
def reading(self):
        
        try:
            # testing proxy
            proxies = {}
            try:
                proxies["http_proxy"] = os.environ['http_proxy']
            except KeyError:
                pass
            try:
                proxies["https_proxy"] = os.environ['https_proxy']
            except KeyError:
                pass

            if len(proxies) != 0:
                proxy = urllib2.ProxyHandler(proxies)
                opener = urllib2.build_opener(proxy)
                urllib2.install_opener(opener)

            # end testing
            f = urllib2.urlopen(self.link)
            return f.read()
        except (urllib2.URLError, ValueError):
            print("\n{0}Can't read the file '{1}'{2}".format(
                self.meta.color["RED"], self.link.split("/")[-1],
                self.meta.color["ENDC"]))
            return " "
410872
def remove_proxy(self, proxy):
        """"""
        del self.search_flag[proxy.protocol][proxy.addr]
        del self.addr_list[proxy.protocol][proxy.addr]
487573
@InternalFunction(precedence=1,isAssign=true)
    public void readonly(RuleContext ruleContext,RuleProxyField ruleProxyField)
    {
        setReadOnly(ruleProxyField,ruleContext);
    }
326248
public void parse(Proxy proxy) {
    if (proxy.getProxyType() == Proxy.ProxyType.UNSPECIFIED) {
      return;
    }

    reset();

    switch (proxy.getProxyType()) {
      case DIRECT:
        if (!product.is(MOBILE)) {
          setEnabled(false);
        }
        setUsePAC(false);
        break;

      case MANUAL:
        if (!product.is(MOBILE)) {
          setEnabled(true);
        }
        setUsePAC(false);

        // TODO(andreastt): HTTPS proxy
        // TODO(andreastt): SOCKS proxy

        if (proxy.getHttpProxy() != null) {
          setHttpProxy(proxy.getHttpProxy());
        }
        if (proxy.getFtpProxy() != null) {
          setFtpProxy(proxy.getFtpProxy());
        }

        break;

      case PAC:
        if (!product.is(MOBILE)) {
          setEnabled(true);
        }
        setUsePAC(true);

        if (proxy.getProxyAutoconfigUrl() != null) {
          setAutoconfigUrl(proxy.getProxyAutoconfigUrl());
        }

        break;

      default:
        logger.warning("Unsupported proxy type: " + proxy.getProxyType());
    }
  }
321685
def replicate(self):
        """"""
        return np.sum(
            self.proxies[self.window :] * self._xs[:-1], axis=1
        ).reindex(self.r.index)
1201114
function proxy(target, mapping) {
    return new Proxy(mapping, {
        get(map, key) {
            if (Reflect.has(map, key)) {
                return resolve(target, Reflect.get(map, key))
            }
        },
        set(map, key, value) {
            if (Reflect.has(map, key)) {
                return resolve(target, Reflect.get(map, key), value)
            }
        }
    })
}
63895
def _proxy(self, url, urlparams=None):
        
        for k,v in request.params.iteritems():
            urlparams[k]=v
        query = urlencode(urlparams)
        full_url = url
        if query:
            if not full_url.endswith("?"):
                full_url += "?"
            full_url += query

        # build the request with its headers
        req = urllib2.Request(url=full_url)
        for header in request.headers:
            if header.lower() == "host":
                req.add_header(header, urlparse.urlparse(url)[1])
            else:
                req.add_header(header, request.headers[header])
        res = urllib2.urlopen(req)

        # add response headers
        i = res.info()
        response.status = res.code
        got_content_length = False
        for header in i:
            # We don't support serving the result as chunked
            if header.lower() == "transfer-encoding":
                continue
            if header.lower() == "content-length":
                got_content_length = True
            response.headers[header] = i[header]

        # return the result
        result = res.read()
        res.close()

        #if not got_content_length:
        #    response.headers['content-length'] = str(len(result))
        return result
1007136
function getProxyMiddleware(context, uri) {
  const pathRewrite = {};
  pathRewrite[`^${context}`] = url.parse(uri).pathname;

  return proxy({
    target: getHost(uri),
    changeOrigin: true,
    logLevel: 'warn',
    pathRewrite: pathRewrite,
  });
}
815875
def ignore_proxy_host (self):
        """"""
        if urllib.proxy_bypass(self.host):
            return True
        no_proxy = os.environ.get("no_proxy")
        if no_proxy:
            entries = [parse_host_port(x) for x in no_proxy.split(",")]
            for host, port in entries:
                if host.lower() == self.host and port == self.port:
                    return True
        return False