Skip to content

Config: support abstract unix sockets in remote loader#6111

Open
kastov wants to merge 1 commit into
XTLS:mainfrom
kastov:refactor/remote-conf-loader
Open

Config: support abstract unix sockets in remote loader#6111
kastov wants to merge 1 commit into
XTLS:mainfrom
kastov:refactor/remote-conf-loader

Conversation

@kastov
Copy link
Copy Markdown
Contributor

@kastov kastov commented May 10, 2026

Initial PR (#5200) lacks support for abstract unix sockets.

This PR unifies the http config loader to share the same target format as the webhook notifier. Adds @ / @@ abstract socket support.

Supported forms:

  • http(s)://host/api
  • /path/to/socket.sock[:/api]
  • @abstract[:/api]
  • @@padded[:/api]
  • http+unix:// is marked as deprecated — still works (prints a warning, internally rewritten to the new form), but the direct forms are preferred.

Shared helpers ResolveSocketPath and SplitHTTPUnixURL extracted to common/utils/unixsocket.go

…tions for HTTP/Unix socket URL parsing

- Replaced custom URL parsing and socket resolution logic in `webhook.go` with utility functions from `utils`.
- Updated `ConfigLoader` in `external.go` to handle deprecated `http+unix://` prefix and streamline HTTP content fetching.
@Meo597
Copy link
Copy Markdown
Collaborator

Meo597 commented May 11, 2026

sock 就可以设目录权限了,比以前看起来安全得多虽然我不用
要是有客户端证书就好了,这样就不用 socat 包了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants