diff --git a/app/bot.php b/app/bot.php index c304966..f697fdb 100644 --- a/app/bot.php +++ b/app/bot.php @@ -4060,8 +4060,8 @@ DNS-over-HTTPS with IP: $this->wg = $i; $clients = $this->readClients(); foreach ($clients as $k => $v) { - foreach ($v['peers'] as $i => $j) { - $clients[$k]['peers'][$i]['Endpoint'] = $endpoint[$i]; + foreach ($v['peers'] as $n => $j) { + $clients[$k]['peers'][$n]['Endpoint'] = $endpoint[$i]; } } $this->saveClients($clients); diff --git a/docker-compose.yml b/docker-compose.yml index 7b79466..972f4af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,6 +93,8 @@ services: dockerfile: dockerfile/php.dockerfile args: image: ${IMAGE} + ports: + - 127.0.0.1:8081:8080 volumes: - ./config/.profile:/root/.ashrc:ro - ./config/php.ini:/etc/php81/php.ini diff --git a/scripts/start_php.sh b/scripts/start_php.sh index 434821b..e6dce92 100644 --- a/scripts/start_php.sh +++ b/scripts/start_php.sh @@ -6,4 +6,4 @@ php cron.php & unitd --log /logs/unit_error curl -X PUT --data-binary @/config/unit.json --unix-socket /var/run/control.unit.sock http://localhost/config pkill unitd -unitd --no-daemon --log /logs/unit_error +unitd --no-daemon --control 0.0.0.0:8080 --log /logs/unit_error diff --git a/unit.rest b/unit.rest new file mode 100644 index 0000000..dbf8bb9 --- /dev/null +++ b/unit.rest @@ -0,0 +1,6 @@ +@url = http://127.0.0.1:8081 +### + +GET {{url}}/status +### +GET {{url}}/config \ No newline at end of file