diff --git a/install.sh b/install.sh index 6d24abac..bbdd96d0 100644 --- a/install.sh +++ b/install.sh @@ -154,7 +154,7 @@ install_x-ui() { # Download resources if [ $# == 0 ]; then - # bash <(curl -Ls https://raw.githubusercontent.com/dimasmir03/3x-ui/install.sh) + # bash <(curl -Ls https://raw.githubusercontent.com/dimasmir03/3x-ui/feature/multi-server-support/install.sh) # wget --inet4-only -O /etc/init.d/x-ui https://raw.githubusercontent.com/dimasmir03/3x-ui/feature/multi-server-support/x-ui.rc tag_version=$(curl -Ls "https://api.github.com/repos/dimasmir03/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') if [[ ! -n "$tag_version" ]]; then diff --git a/web/service/multi_server_service.go b/web/service/multi_server_service.go index 4d94cbc5..35a0383c 100644 --- a/web/service/multi_server_service.go +++ b/web/service/multi_server_service.go @@ -167,7 +167,7 @@ func (s *MultiServerService) SyncServer(id int) error { Success bool `json:"success"` Msg string `json:"msg"` } - if err := json.NewDecoder(httpResp.Body).Decode(&updateResp); err != nil { + if err := json.NewDecoder(resp.Body).Decode(&updateResp); err != nil { logger.Error("failed to decode update inbounds response", "err", err) return fmt.Errorf("decode update inbounds: %w", err) } @@ -191,7 +191,7 @@ func (s *MultiServerService) SyncServer(id int) error { Success bool `json:"success"` Msg string `json:"msg"` } - if err := json.NewDecoder(httpResp.Body).Decode(&addResp); err != nil { + if err := json.NewDecoder(resp.Body).Decode(&addResp); err != nil { logger.Error("failed to decode add inbounds response", "err", err) return fmt.Errorf("decode add inbounds: %w", err) }