Skip to content

Commit

Permalink
silence curl, allow auth localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
binhex committed Nov 10, 2018
1 parent 391f1a2 commit d7f8dd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions run/nobody/qbittorrent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [[ "${qbittorrent_running}" == "true" ]]; then

if [[ "${VPN_PROV}" == "pia" && -n "${VPN_INCOMING_PORT}" ]]; then

curl -i -X POST -d "json=%7B%22listen_port%22%3A${VPN_INCOMING_PORT}%7D" "http://localhost:${WEBUI_PORT}/command/setPreferences"
curl -i -X POST -d "json=%7B%22listen_port%22%3A${VPN_INCOMING_PORT}%7D" "http://localhost:${WEBUI_PORT}/command/setPreferences" &> /dev/null

fi

Expand Down Expand Up @@ -61,7 +61,7 @@ else
# option 'Bypass authentication for clients on localhost'
if [[ "${VPN_PROV}" == "pia" && -n "${VPN_INCOMING_PORT}" ]]; then

curl -i -X POST -d "json=%7B%22listen_port%22%3A${VPN_INCOMING_PORT}%7D" "http://localhost:${WEBUI_PORT}/command/setPreferences"
curl -i -X POST -d "json=%7B%22listen_port%22%3A${VPN_INCOMING_PORT}%7D" "http://localhost:${WEBUI_PORT}/command/setPreferences" &> /dev/null

fi

Expand Down
2 changes: 1 addition & 1 deletion run/nobody/watchdog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ while true; do
if [[ "${VPN_ENABLED}" == "yes" ]]; then

# forcibly set allow anonymous access from localhost to api (used to change incoming port)
sed -i "s~^WebUI\LocalHostAuth=.*~WebUI\LocalHostAuth=true~g" "${qbittorrent_config}"
sed -i "s~^WebUI\LocalHostAuth=.*~WebUI\LocalHostAuth=false~g" "${qbittorrent_config}"

# forcibly set random incoming port to false
sed -i "s~^General\UseRandomPort=.*~General\UseRandomPort=false~g" "${qbittorrent_config}"
Expand Down

0 comments on commit d7f8dd8

Please sign in to comment.