GithubHelp home page GithubHelp logo

Comments (7)

ddevault avatar ddevault commented on April 27, 2024

https://curl.se/libcurl/c/CURLOPT_INTERFACE.html

from uacme.

ndilieto avatar ndilieto commented on April 27, 2024

If you are on Linux you could achieve this by running uacme as a dedicated user, FWMARKing packets based on the owner module and routing through the intended interface, something like

iptables -t mangle -A OUTPUT -m owner --uid-owner UID -j MARK --set-mark 2
ip rule add fwmark 2 table 3
ip route add default via xxx.xxx.xxx.xxx table 3

If you have reverse path validation enabled in your distribution, you'll need to disable it via sysctl

from uacme.

ddevault avatar ddevault commented on April 27, 2024

That seems like significantly more work and moving parts than what I assume is about a +5/-1 patch to set the relevant curl option from -I.

from uacme.

ndilieto avatar ndilieto commented on April 27, 2024

To be honest I think your use case is rather peculiar and I am very reluctant to embark on the slippery slope of feature bloat. Since it can be achieved by other means (as explained above, or alternatively by creating a virtual interface in a new network namespace and running uacme in it, check manpages of veth/nsenter), I'd rather not implement it.

from uacme.

ddevault avatar ddevault commented on April 27, 2024

I think it's wise of you to avoid feature bloat, and it's for this reason that I choose uacme. However, I don't feel that this qualifies. It would be a very small change: one getopt flag which calls one curl function. Features of more concern would be more along the lines of certbot's magic config editing nonsense. The suggested workaround is very hacky, platform-specific, and requires a lot more work and moving parts: the simplest solution to this problem is a simple patch for uacme. Moving parts are the worst thing an acme client could have; they are the easiest way to kill reliability for a mission-critical tool.

from uacme.

ndilieto avatar ndilieto commented on April 27, 2024

Another platform independent way. Run tinyproxy, which has Bind option for outgoing connections, on port 8888 then
env ALL_PROXY=localhost:8888 uacme ...

from uacme.

ddevault avatar ddevault commented on April 27, 2024

Running and managing an entirely separate daemon is also a complex and fragile "solution" to this problem, especially compared with what uacme could do to support it -- effectively a single setsockopt syscall with SO_BINDINTERFACE.

I understand that scope management is important and the fact that uacme thinks about it is the reason I'm here. But these workarounds are much, much worse than the patch would be: a more appropriate workaround if such a feature is not acceptable upstream would be to patch uacme downstream and run that.

from uacme.

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.