I hereby claim:
- I am sabretus on github.
- I am sabretus (https://keybase.io/sabretus) on keybase.
- I have a public key ASCTJL63kRsVlISfj3pFnGryEfqSF551OIT7zC3FLyJ1sQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| // this is for an arduino uno. | |
| // this was inspired by http://www.instructables.com/id/Arduino-Reed-Switch/?ALLSTEPS but | |
| // changed to use the arduino internal pull up resistor: | |
| // | |
| // +-----------------+ | |
| // | arduino GND -----reed_switch----\ | |
| // | | | | |
| // | 12 --------------------/ | |
| // +-----------------+ | |
| // |
| access_by_lua_block { | |
| local http = require "resty.http" | |
| local h = http.new() | |
| h:set_timeout(2 * 1000) | |
| local url = "http://127.0.0.1:18086/ping" | |
| local res, err = h:request_uri(url, {method = "GET"}) | |
| if err or not res or res.status ~= 204 then | |
| ngx.status = ngx.HTTP_SERVICE_UNAVAILABLE | |
| ngx.exit(ngx.HTTP_OK) | |
| end |
| upstream other_backend { | |
| server 127.0.0.1:8080; | |
| } | |
| upstream main_backend { | |
| server 127.0.0.1:80; | |
| } | |
| server { | |
| listen 443 ssl http2; | |
| server_name example.com |
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a1b7657f335d quiq/egress-proxy:1.21.4.1-alpine "/opt/openresty/bin/…" About an hour ago Up About an hour egress-proxy
$
$ export http_proxy=127.0.0.1:3128 https_proxy=127.0.0.1:3128
$
$ curl -v ifconfig.me
* Uses proxy env variable http_proxy == '127.0.0.1:3128'
* Trying 127.0.0.1:3128…