[systemd-devel] [RFC 5/6] proxy-discoveryd: Add the basic parts for handling DBus methods

Tomasz Bursztyka tomasz.bursztyka at linux.intel.com
Thu Jul 16 11:16:15 PDT 2015


Hi David,

>> +static int method_find_proxy(sd_bus *bus, sd_bus_message *message,
>> void *userdata, sd_bus_error *error) {
>> +        _cleanup_free_ char *p = strdup("DIRECT");
>> +        Manager *m = userdata;
>> +        int r;
>> +
>> +        assert(bus);
>> +        assert(message);
>> +        assert(m);
>> +
>> +        r = proxy_execute(m->default_proxies, message);
>> +        if (r < 0)
>> +                sd_bus_reply_method_return(message, "s", p);
>> +
>> +        return 1;
>> +}
> That seems to be making no attempt to use the *correct* proxy
> configuration according to the request.
>
> In the case of things like split-tunnel VPNs, we want to handle it
> basically the same way that we handle DNS.
>
> Requests within the VPN's DNS domains, and the IP ranges which are
> routed to the VPN, need to be resolved according to the VPN's proxy
> configuration. And everything else needs to be resolved according to
> the local proxy configuration.
>
> NetworkManager already sets up dnsmasq to do precisely this for DNS.

This is all known. This thread was meant to be just an RFC so only the very
basics of the beginning of a proposal.

Tomasz


More information about the systemd-devel mailing list