Giter Site home page Giter Site logo

Comments (4)

pedrobaeza avatar pedrobaeza commented on May 23, 2024

Although it's an interesting feature, it's not implemented right now and you should put multiple points. Technically, I don't know right now which are the challenges to implement something like that. You can try to and contribute it in a pull request if you think it's feasible.

from docker-whitelist.

Ocramius avatar Ocramius commented on May 23, 2024

Yeah, was looking at the code, and it seems like proxy.py would need to be rewritten completely, since only one ip is resolved right now 🤔

ip = target = os.environ["TARGET"]
udp_answers = os.environ.get("UDP_ANSWERS", "1")
# Resolve target if required
if os.environ["PRE_RESOLVE"] == "1":
resolver = Resolver()
resolver.nameservers = os.environ["NAMESERVERS"].split()
ip = random.choice([answer.address for answer in resolver.query(target)])

Also, it would only work if a Host header is parsed, so it's no longer just a transparent proxy.

from docker-whitelist.

Ocramius avatar Ocramius commented on May 23, 2024

Gonna close here: I cannot currently work on this myself, as it completely redesigns everything, but I hope this is still useful to others :)

Meanwhile, I found an approach that better fits my own use-case, by using Traefik as a load balancer pointing to an external network:

http:
  routers:
    foobar:
      entryPoints:
      - websecure
      middlewares:
      - strip
      service: myexthost
      rule: Host(`dev.mytraefikhost.de`) && Path(`/myexthost/www`)
      tls: {}

  myexthost:
    foobar:
      loadBalancer:
        servers:
        - url: https://www.myexthost.de
 
  middlewares:
    strip:
      stripPrefix:
        prefixes:
        - /myexthost/www

See https://community.traefik.io/t/reverse-proxy-to-external-host/3615/4

This requires putting traefik on a non-internal network, as well as a second internal network that does not have the www.myexthost.de as part of its internal DNS aliases.

That's obviously very much overkill for most folks, so this project is still very much valid in its own scope, just hoping this is useful to others.

from docker-whitelist.

pedrobaeza avatar pedrobaeza commented on May 23, 2024

Thanks for the insights. Indeed, it seems not easy to be performed.

from docker-whitelist.

Related Issues (5)

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.