Skip to content

Commit cb019af

Browse files
committed
standardize on /dev/shm/party.sock; closes #229
1 parent 5b98e10 commit cb019af

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2027,7 +2027,7 @@ some reverse proxies (such as [Caddy](https://caddyserver.com/)) can automatical
20272027
* **warning:** nginx-QUIC (HTTP/3) is still experimental and can make uploads much slower, so HTTP/1.1 is recommended for now
20282028
* depending on server/client, HTTP/1.1 can also be 5x faster than HTTP/2
20292029
2030-
for improved security (and a 10% performance boost) consider listening on a unix-socket with `-i unix:770:www:/tmp/party.sock` (permission `770` means only members of group `www` can access it)
2030+
for improved security (and a 10% performance boost) consider listening on a unix-socket with `-i unix:770:www:/dev/shm/party.sock` (permission `770` means only members of group `www` can access it)
20312031
20322032
example webserver / reverse-proxy configs:
20332033

copyparty/__main__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -547,14 +547,15 @@ def get_sects():
547547
when running behind a reverse-proxy, it's recommended to
548548
use unix-sockets for improved performance and security;
549549
550-
\033[32m-i unix:770:www:\033[33m/tmp/a.sock\033[0m listens on \033[33m/tmp/a.sock\033[0m with
551-
permissions \033[33m0770\033[0m; only accessible to members of the \033[33mwww\033[0m
552-
group. This is the best approach. Alternatively,
550+
\033[32m-i unix:770:www:\033[33m/dev/shm/party.sock\033[0m listens on
551+
\033[33m/dev/shm/party.sock\033[0m with permissions \033[33m0770\033[0m;
552+
only accessible to members of the \033[33mwww\033[0m group.
553+
This is the best approach. Alternatively,
553554
554-
\033[32m-i unix:777:\033[33m/tmp/a.sock\033[0m sets perms \033[33m0777\033[0m so anyone can
555-
access it; bad unless it's inside a restricted folder
555+
\033[32m-i unix:777:\033[33m/dev/shm/party.sock\033[0m sets perms \033[33m0777\033[0m so anyone
556+
can access it; bad unless it's inside a restricted folder
556557
557-
\033[32m-i unix:\033[33m/tmp/a.sock\033[0m keeps umask-defined permissions
558+
\033[32m-i unix:\033[33m/dev/shm/party.sock\033[0m keeps umask-defined permission
558559
(usually \033[33m0600\033[0m) and the same user/group as copyparty
559560
560561
\033[33m-p\033[0m (tcp ports) is ignored for unix sockets

0 commit comments

Comments
 (0)