Skip to content

Commit

Permalink
fix speedtest
Browse files Browse the repository at this point in the history
  • Loading branch information
inciner8r committed Apr 14, 2024
1 parent 7caf34b commit 3ffc5c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ ENV WG_CONF_DIR=$WG_CONF_DIR WG_CLIENTS_DIR=$WG_CLIENTS_DIR WG_KEYS_DIR=$WG_KEYS
ENV WG_ENDPOINT_HOST=$WG_ENDPOINT_HOST WG_ENDPOINT_PORT=$WG_ENDPOINT_PORT WG_IPv4_SUBNET=$WG_IPv4_SUBNET WG_IPv6_SUBNET=$WG_IPv6_SUBNET
ENV WG_DNS=$WG_DNS WG_ALLOWED_IP_1=$WG_ALLOWED_IP_1 WG_ALLOWED_IP_2=$WG_ALLOWED_IP_2
ENV WG_PRE_UP=$WG_PRE_UP WG_POST_UP=$WG_POST_UP WG_PRE_DOWN=$WG_PRE_DOWN WG_POST_DOWN=$WG_POST_DOWN
RUN wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
RUN chmod +x speedtest-cli
RUN echo $'#!/usr/bin/env bash\n\
set -eo pipefail\n\
/app/erebrus &\n\
Expand Down
4 changes: 2 additions & 2 deletions util/pkg/speedtest/speedtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ type SpeedtestResult struct {
}

func GetSpeedtestResults() (res *SpeedtestResult, err error) {
cmd := exec.Command("speedtest", "--json")
cmd := exec.Command("speedtest-cli", "--json")

output, err := cmd.CombinedOutput()
if err != nil {
return nil, fmt.Errorf("failed to execute 'speedtest --json': %v", err)
return nil, fmt.Errorf("failed to execute 'speedtest-cli --json': %v", err)
}

// Parse the Speedtest results
Expand Down

0 comments on commit 3ffc5c2

Please sign in to comment.