This commit is contained in:
Дмитрий Саенко 2025-10-31 21:29:38 +03:00
parent 3f6205c3d5
commit 2ac59a6c46
2 changed files with 3 additions and 3 deletions

View file

@ -154,7 +154,7 @@ install_x-ui() {
# Download resources # Download resources
if [ $# == 0 ]; then 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 # 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/') 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 if [[ ! -n "$tag_version" ]]; then

View file

@ -167,7 +167,7 @@ func (s *MultiServerService) SyncServer(id int) error {
Success bool `json:"success"` Success bool `json:"success"`
Msg string `json:"msg"` 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) logger.Error("failed to decode update inbounds response", "err", err)
return fmt.Errorf("decode update inbounds: %w", err) return fmt.Errorf("decode update inbounds: %w", err)
} }
@ -191,7 +191,7 @@ func (s *MultiServerService) SyncServer(id int) error {
Success bool `json:"success"` Success bool `json:"success"`
Msg string `json:"msg"` 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) logger.Error("failed to decode add inbounds response", "err", err)
return fmt.Errorf("decode add inbounds: %w", err) return fmt.Errorf("decode add inbounds: %w", err)
} }