[GH-ISSUE #466] Support for Abstract Unix Socket #256

Closed
opened 2026-04-08 16:51:32 +03:00 by zhus · 0 comments
Owner

Originally created by @DCsunset on GitHub (Oct 21, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/466

Specific Demand

Linux and Android support abstract Unix sockets where sockets are kept in an abstract namespace that is independent of the filesystem.
It is more convenient that normal Unix socket in many cases as it doesn't require creating any socket file.
For example, Go language natively supports abstract Unix socket by listening on a path starting with @.

Implement Suggestion

Implementing this feature is not very difficult as Rust supports it for Linux and Android: https://doc.rust-lang.org/stable/std/os/linux/net/trait.SocketAddrExt.html#tymethod.from_abstract_name.
However, there are two possible approaches:

  1. Use @ as a prefix to a Unix socket path to represent an abstract socket (which is used in other languages like Go)
  2. Add another option to support listening on it (e.g. --bind-abstract)

It would be great to see this implemented. I'm also happy to help with it if there is any plan to add it.

Originally created by @DCsunset on GitHub (Oct 21, 2024). Original GitHub issue: https://github.com/sigoden/dufs/issues/466 ## Specific Demand <!-- What feature do you need, please describe it in detail. --> Linux and Android support abstract Unix sockets where sockets are kept in an abstract namespace that is independent of the filesystem. It is more convenient that normal Unix socket in many cases as it doesn't require creating any socket file. For example, Go language natively supports abstract Unix socket by listening on a path starting with `@`. ## Implement Suggestion <!-- If you have any suggestion for complete this feature, you can tell us. --> Implementing this feature is not very difficult as Rust supports it for Linux and Android: https://doc.rust-lang.org/stable/std/os/linux/net/trait.SocketAddrExt.html#tymethod.from_abstract_name. However, there are two possible approaches: 1. Use `@` as a prefix to a Unix socket path to represent an abstract socket (which is used in other languages like Go) 2. Add another option to support listening on it (e.g. `--bind-abstract`) It would be great to see this implemented. I'm also happy to help with it if there is any plan to add it.
zhus closed this issue 2026-04-08 16:51:32 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#256