Skip to content

Commit

Permalink
v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sir-Photch committed Jan 3, 2024
1 parent 98cc864 commit 7bbdd8d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 26 deletions.
46 changes: 23 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "notesock"
version = "0.1.3"
version = "0.2.1"
edition = "2021"

[profile.release]
Expand Down
8 changes: 8 additions & 0 deletions contrib/systemd-example.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ HOST=https://notesock.example.org
EXPIRY_SECONDS=600
# limits size of uploaded paste
MAX_PASTE_SIZE_KB=500
# range of paste IDs returned to the user, in base 36 (0..9,a..z)
# implicitly limits number of pastes that can be present on the filesystem
ID_LOWER=1000
ID_UPPER=zzzz

# timespan after connection from user times out
# default value should be fine
TIMEOUT_MS=2000
# expect reverse proxy to talk proxy_protocol
# uncomment to enable:
## TALK_PROXY=--talk-proxy
2 changes: 1 addition & 1 deletion contrib/systemd-example.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EnvironmentFile=/etc/notesock/notesock.env
WorkingDirectory=/var/lib/notesock
ReadWritePaths=/var/lib/notesock
RuntimeDirectory=notesock
ExecStart=/usr/bin/notesock -s /run/notesock -d /var/lib/notesock -w $N_WORKERS --host $HOST -x $EXPIRY_SECONDS -l $MAX_PASTE_SIZE_KB -t $TIMEOUT_MS
ExecStart=/usr/bin/notesock -s /run/notesock -d /var/lib/notesock -w $N_WORKERS -H $HOST -c $EXPIRY_SECONDS -M $MAX_PASTE_SIZE_KB -t $TIMEOUT_MS -l $ID_LOWER -u $ID_UPPER $TALK_PROXY
Restart=on-failure
RestartSec=30s

Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ fn paste_worker(
);
None
})
}.unwrap_or("peer".into());
}
.unwrap_or("peer".into());

if payload_len > paste_limit {
warn!("{} | {} exceeded paste limit", tag, peer);
Expand Down

0 comments on commit 7bbdd8d

Please sign in to comment.