acc/vol ideas
This commit is contained in:
38
docs/example.conf
Normal file
38
docs/example.conf
Normal file
@@ -0,0 +1,38 @@
|
||||
# any line with a : creates a user,
|
||||
# username:password
|
||||
# so you can create users anywhere really
|
||||
# but keeping them here is prob a good idea
|
||||
ed:123
|
||||
k:k
|
||||
|
||||
# leave a blank line before each volume
|
||||
|
||||
# this is a volume,
|
||||
# it shares the contents of /home/...
|
||||
# and appears at "/dj" in the web-ui
|
||||
# "r" grants read-access for anyone
|
||||
# "a ed" grants read-write to ed
|
||||
/home/ed/Music/dj
|
||||
/dj
|
||||
r
|
||||
a ed
|
||||
|
||||
# display /home/ed/ocv.me as the webroot
|
||||
# and allow user "k" to see/read it
|
||||
/home/ed/ocv.me
|
||||
/
|
||||
r k
|
||||
|
||||
# this shares the current directory as "/pwd"
|
||||
# but does nothing since there's no permissions
|
||||
.
|
||||
/pwd
|
||||
|
||||
# and a folder where anyone can upload
|
||||
# but nobody can see the contents
|
||||
/home/ed/inc
|
||||
/incoming
|
||||
w
|
||||
|
||||
# you can use relative paths too btw
|
||||
# but they're a pain for testing purpose so I didn't
|
||||
@@ -1,14 +1,31 @@
|
||||
#!/bin/bash
|
||||
echo not a script
|
||||
exit 1
|
||||
|
||||
|
||||
##
|
||||
## prep debug env (vscode embedded terminal)
|
||||
|
||||
renice 20 -p $$
|
||||
|
||||
|
||||
##
|
||||
## cleanup after a busted shutdown
|
||||
|
||||
ps ax | awk '/python[23]?[ ]-m copyparty/ {print $1}' | tee /dev/stderr | xargs kill
|
||||
|
||||
|
||||
##
|
||||
## create a test payload
|
||||
|
||||
head -c $((2*1024*1024*1024)) /dev/zero | openssl enc -aes-256-ctr -pass pass:hunter2 -nosalt > garbage.file
|
||||
|
||||
|
||||
##
|
||||
## testing multiple parallel uploads
|
||||
## usage: para | tee log
|
||||
|
||||
para() { for s in 1 2 3 4 5 6 7 8 12 16 24 32 48 64; do echo $s; for r in {1..5}; do for ((n=0;n<s;n++)); do curl -sF "f=@Various.zip" http://127.0.0.1:1234/32 2>&1 & done; wait; echo; done; done; }
|
||||
para() { for s in 1 2 3 4 5 6 7 8 12 16 24 32 48 64; do echo $s; for r in {1..4}; do for ((n=0;n<s;n++)); do curl -sF "f=@garbage.file" http://127.0.0.1:1234/32 2>&1 & done; wait; echo; done; done; }
|
||||
|
||||
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user