Skip to content

Fix: Remove syntax error in I1 parameter and define I1_VAL variable#111

Open
incursion121985-ship-it wants to merge 1 commit into
ImMALWARE:mainfrom
incursion121985-ship-it:fix/i1-config-error
Open

Fix: Remove syntax error in I1 parameter and define I1_VAL variable#111
incursion121985-ship-it wants to merge 1 commit into
ImMALWARE:mainfrom
incursion121985-ship-it:fix/i1-config-error

Conversation

@incursion121985-ship-it

Copy link
Copy Markdown

Problem

The script generates invalid config with two critical errors:

  1. Syntax error in I1 parameter: The line contains <b prefix before hex value:

    I1 = <b 0xc2000000...
    

    This makes the config invalid for AmneziaVPN.

  2. Undefined I1_VAL variable: The variable $I1_VAL is used when creating JSON but is never initialized, resulting in an empty value.

Solution

  • Removed the erroneous <b from the I1 hex value
  • Added line to extract I1 value from config before JSON generation:
    I1_VAL=$(echo "${conf}" | grep '^I1 = ' | sed 's/I1 = //')

Result

Config now generates correctly with valid I1 parameter and can be successfully imported to AmneziaVPN.

## Описание проблемы
Скрипт содержал две критические ошибки, которые приводили к генерации некорректного конфига:

1. **Синтаксическая ошибка в параметре I1** — строка содержала `<b ` перед hex значением:
   ```
   I1 = <b 0xc2000000...
   ```
   Это делало конфиг невалидным для AmneziaVPN

2. **Переменная I1_VAL не определена** — при создании JSON объекта использовалась переменная `$I1_VAL`, которая никогда не инициализировалась, что приводило к пустому значению

## Решение
- Удалил синтаксическую ошибку `<b ` из значения I1
- Добавил строку для извлечения значения I1 из конфига перед использованием:
  ```bash
  I1_VAL=$(echo "${conf}" | grep '^I1 = ' | sed 's/I1 = //')
  ```

## Результат
Конфиг теперь генерируется корректно и успешно импортируется в AmneziaVPN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant