Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Primary Upstream DNS Server IPV6 Validation Issue

Đã đóng Phù hợp với người mới
#59 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@oschwartz10612 đang làm issue này rồi.

Từ ngày 30/9/2026.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, kotlin
Lĩnh vực
mobile

Hướng nghiên cứu

Bắt đầu trong app/src/main/java/net/pangolin/Pangolin/SettingsActivity.kt, tại phần import android.util.Patterns và phần validation quanh dòng 267. Tái hiện vấn đề trên màn hình cài đặt Android bằng cả hai ví dụ IPv6 của Cloudflare, sau đó xác minh rằng các địa chỉ IPv6 hợp lệ được chấp nhận mà không có lỗi validation.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Describe the Bug

When using the Android app, IPV6 addresses fail the validation check in the "Primary Upstream DNS Server" field on the settings page.

The example listed below the field uses an address that is not accepted despite being valid and listed as an example.

Please watch the video linked below for further explanation and information.

https://github.com/fosrl/android/blob/main/app/src/main/java/net/pangolin/Pangolin/SettingsActivity.kt#L13
import android.util.Patterns
https://github.com/fosrl/android/blob/main/app/src/main/java/net/pangolin/Pangolin/SettingsActivity.kt#L267

isDnsField -> {
    if (newValue.isEmpty()) {
        true
    } else {
        Patterns.IP_ADDRESS.matcher(newValue).matches()
    }
}

Patterns.IP_ADDRESS might not support IPV6 addresses.

Environment
  • OS Type & Version: Android 17 (CPA2A.260605.016), Xiaomi HyperOS 3.0.336.0
  • Pangolin Version: 1.23.0
  • Edition (Community or Enterprise): Community
  • Gerbil Version: 1.5.2
  • Traefik Version: 3.7.13
  • Newt Version: 1.18
  • Client Version: 0.8.0
To Reproduce
  1. Access the Android Pangolin app
  2. Open the sidebar navigation menu
  3. Access "Settings" from the navigation menu
  4. Tap "Primary Upstream DNS Server" to edit the setting
  5. Enter Cloudflare's IPV6 DNS address 2606:4700:4700::1111 or 2606:4700:4700:0000:0000:0000:0000:1111 (Expanded - full 128-Bit Form)
  6. Note the momentary flash of validation feedback (red error message) which disappears.

https://github.com/user-attachments/assets/cf6af099-604a-43fb-9e45-c7be1f1a5896

AI Disclosure

N/A

Expected Behavior

Accept IPV6 address formats, fix the validation on the field to support IPV6 addresses.

Ngôn ngữ chính
Kotlin
Star
46
Fork
12
Merge trung bình
1 phút
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fosrl/android

Tất cả issue của fosrl/android

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.