From: "byroot (Jean Boussier) via ruby-core" Date: 2024-08-06T13:58:51+00:00 Subject: [ruby-core:118800] [Ruby master Feature#17166] net/http not supporting unix domain sockets Issue #17166 has been updated by byroot (Jean Boussier). Status changed from Open to Third Party's Issue No it means it's a very fringe use case and nobody with that use case (including you) bothered to work on it. It's extremely rare to use HTTP over unix sockets, and even very popular HTTP libraries for very popular languages like Python's `requests` [don't support it and require monkey patching](https://github.com/msabramo/requests-unixsocket) and nobody calls Python dead. So if you really need this you are welcome to open a pull request at https://github.com/ruby/net-http ---------------------------------------- Feature #17166: net/http not supporting unix domain sockets https://bugs.ruby-lang.org/issues/17166#change-109356 * Author: hadmut (Hadmut Danisch) * Status: Third Party's Issue ---------------------------------------- Hi, meanwhile it's common and state of the art to offer rest apis not just over tcp/ip, but over unix domain sockets as well for machine-internal use and advanced security. Unfortunately net/http does not support unix domain sockets. Although there is a workaround with the gem net_http_unix / NetX::HTTPUnix, this is rather useless, since most programs, libs, gems (e.g. rest-client) are based on net/http. However, there's some security consideration. When evaluating e.g. HTML and accessing URLs, it could be harmful or leak information, if an URL point to some unix domain path could reveal information or allow to trigger something, e.g. tell through error messages whether a file exists or let someone unintentionally install a packet through ubuntu's snap mechanism (which is controlled through a unix domain socket with rest api). It should, however, be possible to use unix domain sockets (without workaround, third party gem or low level code). regards -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/