Code Monkey home page Code Monkey logo

Comments (4)

sinyo-matu avatar sinyo-matu commented on May 26, 2024

I’m confused about why Kellnr needs to be aware of the “External” hostname, port, and protocol. I think it’s usually the responsibility of something like a proxy in front of Kellnr.

from kellnr.

secana avatar secana commented on May 26, 2024

Yeah that seems strange at first, but it is required due to the way that the protocol works.

Example:

You run Kellnr on a Server with the IP 1.2.3.4 on port 80. Now, you put a reverse proxy in front of it to serve it with from "kellnr.mycompany.com" on port 443 with TLS.

Next, you configure Cargo to use "kellnr.mycompany.com:443" as a registry. What Cargo does now is a bit strange: It request a specific route on Kellnr (or any other registry) to get a "config.json".

The json looks like this:

{
    dl: String,
    api: String,
    auth_required: bool,
}

dl and api are the host, where Cargo will try to pull crates from, in our case this needs to be "kellnr.mycompany.com:443" (the proxy address) and not the host that Kellnr runs on. That's why Kellnr needs to know, where it is reachable from the "outside" to be able to fill the "config.json" correctly.

I hope this explains, why Kellnr needs to know the "external" host.

from kellnr.

sinyo-matu avatar sinyo-matu commented on May 26, 2024

Thank you, @secana.
I believe I understand now.
So, the index address written in .cargo/config.toml and the address of the server that eventually serves the crates could be different.
Kellnr manages both sides and aims to hide the complexity of these.

For me, instead of "External", using "Server" might be more understandable in this situation.

from kellnr.

secana avatar secana commented on May 26, 2024

Complete refactoring of settings finished

from kellnr.

Related Issues (20)

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.