From dcf941b61d25e3ec74c1276845278baade10d736 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 15 Jun 2015 00:21:26 +0200 Subject: disable directory listing --- systemd/pacdbserve.service | 2 +- systemd/pacserve.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'systemd') diff --git a/systemd/pacdbserve.service b/systemd/pacdbserve.service index fcde113..bff7e08 100644 --- a/systemd/pacdbserve.service +++ b/systemd/pacdbserve.service @@ -5,7 +5,7 @@ After=network.target [Service] User=nobody Group=nobody -ExecStart=/usr/bin/darkhttpd /var/lib/pacman/sync/ --port 7079 +ExecStart=/usr/bin/darkhttpd /var/lib/pacman/sync/ --port 7079 --no-listing ProtectSystem=full ProtectHome=on PrivateDevices=on diff --git a/systemd/pacserve.service b/systemd/pacserve.service index 6ec4aab..aaa7cd6 100644 --- a/systemd/pacserve.service +++ b/systemd/pacserve.service @@ -5,7 +5,7 @@ After=network.target [Service] User=nobody Group=nobody -ExecStart=/usr/bin/darkhttpd /var/cache/pacman/pkg/ --port 7078 +ExecStart=/usr/bin/darkhttpd /var/cache/pacman/pkg/ --port 7078 --no-listing ProtectSystem=full ProtectHome=on PrivateDevices=on -- cgit v1.2.3-70-g09d2 From a3d89d4fb8a82a6425433c59e30fbc7c6b163a50 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 27 Jan 2016 22:25:16 +0100 Subject: darkhttpd supports IPv6 now, no longer limit to IPv4 --- pacredir.c | 4 ++-- systemd/pacdbserve.service | 2 +- systemd/pacserve.service | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'systemd') diff --git a/pacredir.c b/pacredir.c index 9dcbf5b..13fbe3c 100644 --- a/pacredir.c +++ b/pacredir.c @@ -222,8 +222,8 @@ static void * get_http_code(void * data) { if ((curl = curl_easy_init()) != NULL) { curl_easy_setopt(curl, CURLOPT_URL, request->url); - /* darkhttpd only serves IPv4, so limit curl to that */ - curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + /* try to resolve addresses to all IP versions that your system allows */ + curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER); /* tell libcurl to follow redirection */ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); /* set user agent */ diff --git a/systemd/pacdbserve.service b/systemd/pacdbserve.service index bff7e08..09d1792 100644 --- a/systemd/pacdbserve.service +++ b/systemd/pacdbserve.service @@ -5,7 +5,7 @@ After=network.target [Service] User=nobody Group=nobody -ExecStart=/usr/bin/darkhttpd /var/lib/pacman/sync/ --port 7079 --no-listing +ExecStart=/usr/bin/darkhttpd /var/lib/pacman/sync/ --ipv6 --port 7079 --no-listing ProtectSystem=full ProtectHome=on PrivateDevices=on diff --git a/systemd/pacserve.service b/systemd/pacserve.service index aaa7cd6..198e931 100644 --- a/systemd/pacserve.service +++ b/systemd/pacserve.service @@ -5,7 +5,7 @@ After=network.target [Service] User=nobody Group=nobody -ExecStart=/usr/bin/darkhttpd /var/cache/pacman/pkg/ --port 7078 --no-listing +ExecStart=/usr/bin/darkhttpd /var/cache/pacman/pkg/ --ipv6 --port 7078 --no-listing ProtectSystem=full ProtectHome=on PrivateDevices=on -- cgit v1.2.3-70-g09d2