Struggling here, any help greatfully received.
I'm trying to gain access to the internet via a forward proxy. Openresty has no direct access to the internet.
When accessing an http endpoint all is well. Https just gives an SSL handshake error, unknown protocol.
Curl from the Openresty server works fine.
No authentication required on the proxy as the Openresty has an exception in place.
So far I've tried:
Straight proxy_pass with the forward proxy set as the upstream server. Fine for http, not so for https.
lua-resty-http (the liseen package) with a config that looks like this:
location /test {
content_by_lua '
local http = require "resty.http"
local hc = http:new()
local ok, code, headers, status, body = hc:request {
url = "" href="https://endpoint/index.html'">'https://endpoint/index.html',
proxy = 'http://forwardproxy:8080',
method = "GET",
}
';
}
I've also experimented with lua-resty-http (pintsized), which works just fine for some of the other things that I need to do,
but not this.
Hopefully I'm doing something stupid here?
Now starting to dig through the curl sources to see what it's doing that the packages aren't.
Thanks.