Skip to content

naive:// link rejected as "Invalid URL" in manual profile add — UI validator only accepts http/https/ftp #2112

@kogeler

Description

@kogeler

Search first

  • I searched and no similar issues were found

Platform/OS

Android

OS version

Android 15

Hiddify Version

4.1.1

What Happened?

Cannot add a naive:// proxy link in Hiddify. The URL input field immediately shows a red border ("Invalid URL") before any connection attempt. The backend (ray2sing) supports naive:// but the UI rejects it.

The isUrl() validator in lib/utils/validators.dart uses a regex that only accepts https://, http://, and ftp:// schemes. All proxy-specific schemes (naive://, vless://, vmess://, etc.) are rejected at the UI level when using "Add profile manually".

Additionally, LinkParser.deep() in lib/utils/link_parsers.dart only accepts hiddify, v2ray, v2rayn, v2rayng, clash, clashmeta, sing-box schemes, so QR code and deep link paths also reject naive://.

Minimal Reproducible Example (MRE)

  1. Open Hiddify v4.1.1 on Android
  2. Tap "+" → "Add profile manually"
  3. Paste: naive://testuser:testpass@example.com:443#my-proxy
  4. Input field immediately shows red border with "Invalid URL"
  5. Also tried via QR code containing the same link — same result
  6. Also tried deep link hiddify://import/naive://user:pass@example.com:443#tag — link not recognized

Expected Behavior

The link should be accepted and parsed by ray2sing, which already has naive:// registered in ray2sing/convert.go:

"naive://": NaiveSingbox,

The UI and deep link layers should not reject schemes that the backend can parse.

Additional Context

The issue affects all input methods (manual paste, QR code, deep link). The naive protocol was added to ray2sing in 2024 (issue #611) but the UI validator was never updated to accept it.

Application Config Options

No response

Relevant log output

No response

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions