mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-11-29 02:42:51 +00:00
fix
This commit is contained in:
parent
3f6205c3d5
commit
2ac59a6c46
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue