Skip to content

Conversation

@UnderGut
Copy link
Contributor

@UnderGut UnderGut commented Jan 1, 2026

Input handling improvements

  • Changed reading() to use 'read -rep' for readline support
  • Arrow keys now work for cursor navigation in input fields
  • Better handling of UTF-8/Cyrillic characters with backspace

Domain input validation

  • Added reading_domain() function with built-in validation loop
  • Validates domain format before DNS lookup (prevents dig errors)
  • Only allows valid domain characters (a-z, 0-9, -, .)
  • Shows friendly error for Cyrillic/invalid input (INVALID_DOMAIN key)
  • New prompt logic: y=continue, n=re-enter, Enter=abort

Menu navigation improvements

  • Invalid menu choice now returns to menu instead of exiting script
  • Domain abort returns to install menu instead of exiting
  • Better UX - users can correct mistakes without restarting

Localization

  • Updated CONFIRM_PROMPT with new y/n/Enter options (EN/RU)
  • Added INVALID_DOMAIN error message (EN/RU)

Functions modified

  • reading(): added readline support (-e flag)
  • reading_domain(): new function with validation and retry loop
  • check_domain(): new return codes (0=ok, 1=warning+continue, 2=retry, 3=abort)
  • install_remnawave(), install_remnawave_panel(), install_remnawave_node()
  • installation(), installation_panel(), installation_node()
  • manage_install(): handle return codes for menu navigation
  • Main menu and template menu: return to menu on invalid input

## Input handling improvements
- Changed reading() to use 'read -rep' for readline support
- Arrow keys now work for cursor navigation in input fields
- Better handling of UTF-8/Cyrillic characters with backspace

## Domain input validation
- Added reading_domain() function with built-in validation loop
- Validates domain format before DNS lookup (prevents dig errors)
- Only allows valid domain characters (a-z, 0-9, -, .)
- Shows friendly error for Cyrillic/invalid input (INVALID_DOMAIN key)
- New prompt logic: y=continue, n=re-enter, Enter=abort

## Menu navigation improvements
- Invalid menu choice now returns to menu instead of exiting script
- Domain abort returns to install menu instead of exiting
- Better UX - users can correct mistakes without restarting

## Localization
- Updated CONFIRM_PROMPT with new y/n/Enter options (EN/RU)
- Added INVALID_DOMAIN error message (EN/RU)

## Functions modified
- reading(): added readline support (-e flag)
- reading_domain(): new function with validation and retry loop
- check_domain(): new return codes (0=ok, 1=warning+continue, 2=retry, 3=abort)
- install_remnawave(), install_remnawave_panel(), install_remnawave_node()
- installation(), installation_panel(), installation_node()
- manage_install(): handle return codes for menu navigation
- Main menu and template menu: return to menu on invalid input
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