Coder Social home page Coder Social logo

random's People

Contributors

mcpizza0 avatar

Watchers

 avatar  avatar

random's Issues

Need a failover proxy to localhost/remote server

TL;DR: Have 1 address abc.123.com. when I am running dev server locally, route to me. If not, route to another address.

Long version
UnInbox, has some long running servers that live in a vps and send out webhook messages

I need a proxy with failover capabilities to live permanently online (vps is fine)
when the app is running locally on my machine, it will route to me
when im not, it will route to another web server

I tried with Cloudflare Tunnels and CaddyServer
i can access the tunnel directly using https://tunnelAddress.mydomain.dev

CaddyServer installed on a vps and given it the following config

proxy.mydomain.dev {
reverse_proxy * {
                to https://tunnelAddress.mydomain.dev https://failover.mydomain.dev
                lb_policy first
                lb_try_duration 5s
                lb_try_interval 250ms

                fail_duration 30s
                max_fails 1
                unhealthy_status 5xx
                unhealthy_latency 2s
                unhealthy_request_count 1
        }
}

the path https://tunnelAddress.mydomain.dev works fine when accessed directly - validating that the tunnel is up
when accessing via proxy.mydomain.dev i get an error ERR_TOO_MANY_REDIRECTS

Offering a bounty for a solution that works

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.