proxy

PHP fsocketopen Though Proxy

强颜欢笑 提交于 2021-01-28 19:22:57
问题 I am currently using PHP to open up a port 43 connection to get whois information directly from a registry using this code. // connecting to the whois server. $handle = fsockopen($server, 43); if (!$handle) return false; // connection failure //asking the server fwrite($handle, $domain_name."\r\n"); // getting response $response = ''; while (!feof($handle)) $response .= fgets($handle, 1024); fclose($handle); It works great however I want to connect though a proxy server so I route my

How can I debug oauth2_proxy when connecting to Azure B2C?

早过忘川 提交于 2021-01-28 19:18:27
问题 I'm new to Kubernetes, and I've been learning about Ingress. I'm quite impressed by the idea of handling TLS certificates and authentication at the point of Ingress. I've added a simple static file server, and added cert-manager, so I basically have a HTTPS static website. I read that NGINX Ingress Controller can be used with oauth2 proxy to handle authentication at the ingress. The problem is that I can't get this working at all. I can confirm that my oauth2-proxy Deployment Service and

how to set different authorization header for different endpoint in wso2 esb

与世无争的帅哥 提交于 2021-01-28 14:26:13
问题 I have a scatter gather proxy implementation in which I need to call multiple endpoint systems which have different authorization header (username and password is different for different systems). Currently my esb calls only one endpoint and it discards others having different credentials. Please help. 回答1: If your backends use basic authentication, it should work if you set the "Authorization" header before each call of the backends. <property xmlns:ns="http://org.apache.synapse/xsd" name=

Python requests with proxy results in SSLError WRONG_VERSION_NUMBER

心已入冬 提交于 2021-01-28 14:16:39
问题 I can't use the different proxy in Python. My code: import requests proxies = { "https":'https://154.16.202.22:3128', "http":'http://154.16.202.22:3128' } r=requests.get('https://httpbin.org/ip', proxies=proxies) print(r.json()) The error I'm getting is: . . . raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='httpbin.org', port=443): Max retries exceeded with url: /ip (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION

Proxy class override method for iOS mono error in xamarin.forms

可紊 提交于 2021-01-28 10:47:20
问题 I am new to proxy classes. I thought visual studio just handled them and never thought about them again. Now, I am having problems. When running my Xamarin.Forms App on iOS, it throws this error when calling my WCF: MonoTouch does not support dynamic proxy code generation. Override this method...(etc) So in the proxy code, I created this method: protected override IService1 CreateChannel() { return new Service1ClientChannel(this); } But the return Service1ClientChannel is not recognized. What

Making an XMLHttpRequest through a proxy?

白昼怎懂夜的黑 提交于 2021-01-28 07:53:21
问题 Is it possible to route HTTP requests through a proxy server programmatically from the browser with JavaScript? 回答1: Assuming you mean a standard HTTP proxy: No. The use of a proxy server is a browser configuration setting and cannot be changed (or even temporarily overridden) from JS. You could make an HTTP request to a regular HTTP endpoint on a server that determines the response it should make by making an HTTP request to a different server. 回答2: You can use some browser-extensions like

Stripe API - PHP Curl request behind a proxy

断了今生、忘了曾经 提交于 2021-01-28 06:05:39
问题 I'm trying to make a request behind a proxy to stripe api using php and curl. The following works if I'm not behind a proxy: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.stripe.com/v1/balance"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_USERPWD, "$a_pass"); $out = curl_exec($ch); # returns my balance curl_close($ch); A request to any other domain using the proxy works: $username = 'user'; $password =

How to proxy JavaScript creation primitive

江枫思渺然 提交于 2021-01-28 05:16:28
问题 I want to do something when creating a string, for example: String = new Proxy(String, { construct: (t, a) => { return { a: 123 } } }) console.log(new String('q')) // { a: 123 } However, if you use primitives, it doesn't work. String = new Proxy(String, { construct: (t, a) => { return { a: 123 } } }) console.log('1') // Expected: { a: 123 }, Actual: 1 Is there any way? then the second question is, when the runtime converts primitives, can I proxy the process? var a = '123' // This is a

docker (behind a proxy) pull from azure container registry works but from registry-1.docker.io, it gives certificate signed by unknown authority error

青春壹個敷衍的年華 提交于 2021-01-28 05:15:18
问题 In ubuntu 18.04 VM I am behind a proxy, I've set up docker configuration with the same proxy. I created an azure container registry and when trying to docker pull from the registry it works. But when trying to: $docker run node:6 I get the error: "docker: Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate signed by unknown authority." I've added the registry to /etc/docker/daemon.json: { "insecure-registries": ["registry-1.docker.io","myazureContainerRegistry

How to delete Proxy-Authorization Cache on Chrome extension?

限于喜欢 提交于 2021-01-28 04:51:43
问题 I am building a "proxy client" extension for chrome and i have following scenario: Users can login to the extension and get a token from API. Tokens are valid for 2 hours. After login users can select a proxy server from a list and that proxy is set with chrome.proxy api. I am using Squid on proxy servers. When a user connects to a proxy server and lands on onAuthRequired i return email and token as authCredentials. Chrome uses those credentials from cache until token is not valid anymore and