Skip to content

ui: add support for emoji and Unicode in tunnel display names#87

Open
Turtlecute33 wants to merge 1 commit intoWireGuard:masterfrom
Turtlecute33:feature/emoji-tunnel-names
Open

ui: add support for emoji and Unicode in tunnel display names#87
Turtlecute33 wants to merge 1 commit intoWireGuard:masterfrom
Turtlecute33:feature/emoji-tunnel-names

Conversation

@Turtlecute33
Copy link

Tunnel names in WireGuard are constrained to valid Linux interface names ([a-zA-Z0-9_=+.-]{1,15}). This makes it impossible for users to give tunnels friendly, memorable names using emoji or non-ASCII characters.

This commit introduces a display name layer that decouples the user-visible tunnel label from the underlying interface name:

  • New DisplayNameStore persists a JSON mapping of interface name to display name in app-private storage
  • ObservableTunnel gains a displayName property that falls back to the interface name when no display name is set
  • When a user enters a name containing emoji or Unicode characters, a valid interface name is auto-generated (ASCII transliteration + hash)
  • NameInputFilter now allows any non-control Unicode character (up to 80 chars) instead of restricting to interface-name characters
  • The inputType for the name field is changed from textVisiblePassword to textNoSuggestions, enabling the emoji keyboard
  • All UI surfaces (tunnel list, TV list, editor, quick tile, naming dialog) display the friendly name

The backend, config file storage, and WireGuard protocol layer are completely unchanged. Existing tunnels without a display name show their interface name as before.

Tunnel names in WireGuard are constrained to valid Linux interface names
([a-zA-Z0-9_=+.-]{1,15}). This makes it impossible for users to give
tunnels friendly, memorable names using emoji or non-ASCII characters.

This commit introduces a display name layer that decouples the
user-visible tunnel label from the underlying interface name:

- New DisplayNameStore persists a JSON mapping of interface name to
  display name in app-private storage
- ObservableTunnel gains a displayName property that falls back to the
  interface name when no display name is set
- When a user enters a name containing emoji or Unicode characters, a
  valid interface name is auto-generated (ASCII transliteration + hash)
- NameInputFilter now allows any non-control Unicode character (up to 80
  chars) instead of restricting to interface-name characters
- The inputType for the name field is changed from textVisiblePassword to
  textNoSuggestions, enabling the emoji keyboard
- All UI surfaces (tunnel list, TV list, editor, quick tile, naming
  dialog) display the friendly name

The backend, config file storage, and WireGuard protocol layer are
completely unchanged. Existing tunnels without a display name show
their interface name as before.

Signed-off-by: Turtlecute33 <1satoshi@riseup.net>
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