daodst / daodst/chat

Support listening on Unix socket

Open
#21 1 comment 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Go
Stars
130
Forks
18
PR merge metrics
No merged PRs in 30d

Description

currently only supports listening on TCP ports, one for HTTP and one for HTTPS. Since it is already designed with reverse proxies in mind, it would be much more helpful to support listening on a Unix domain socket.

Unix domain sockets are much simpler and efficient, particularly with regards to access control: configuring them to only be usable by desired users (e.g. nginx) allows connections to remain secure from other users on the server without requiring TLS or other complications like listening on the loopback interface does.

This also has the obvious benefit of not having to keep track of arbitrary ports and addresses.

When implementing this, it is vital that permissions for the socket are configurable: if anyone can access it, it is only marginally better than a loopback address.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the existing HTTP and HTTPS TCP listener setup and how listener configuration is exposed. Add Unix domain socket support with configurable socket permissions, then verify that reverse-proxy connections work and access is restricted according to the configured permissions.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.