mirror of
https://github.com/9001/copyparty.git
synced 2026-04-02 22:08:38 +10:00
new option --ipa; client IP allowlist:
connections from outside the specified list of IP prefixes are rejected (docker-friendly alternative to -i 127.0.0.1) also mkdir any missing folders when logging to file
This commit is contained in:
@@ -236,6 +236,10 @@ class HttpCli(object):
|
||||
if self.is_banned():
|
||||
return False
|
||||
|
||||
if self.args.ipa_re and not self.args.ipa_re.match(self.conn.addr[0]):
|
||||
self.log("client rejected (--ipa)", 3)
|
||||
return False
|
||||
|
||||
try:
|
||||
self.s.settimeout(2)
|
||||
headerlines = read_header(self.sr, self.args.s_thead, self.args.s_thead)
|
||||
|
||||
Reference in New Issue
Block a user