mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #7048] feat(reality): find REALITY targets from a device on the users' ISP #6618
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6618
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/7048
Author: @Plus98ir
Created: 11/2/2026
Status: 🔄 Open
Base:
main← Head:feat/reality-finder📝 Commits (7)
4db32a8feat(reality): find REALITY targets from a device on the users' ISPc6feb8efix(reality): keep the finder's report when the scanner is reopened4472237fix(reality): fetch the finder script with a User-Agent3875728fix(reality): run only the finder script the panel made, on the inbound's own server11d03cbMerge remote-tracking branch 'origin/main' into feat/reality-findercf9ca5bfix(reality): stop reading a dest's TLS alert as an ISP filter32c5effchore: merge main into feat/reality-finder📊 Changes
41 files changed (+4312 additions, -33 deletions)
View changed files
📝
docs/content/docs/en/reference/api/server.mdx(+24 -1)📝
docs/public/openapi.json(+384 -0)📝
frontend/public/openapi.json(+384 -0)📝
frontend/src/generated/examples.ts(+75 -0)📝
frontend/src/generated/schemas.ts(+239 -0)📝
frontend/src/generated/types.ts(+57 -0)📝
frontend/src/generated/zod.ts(+63 -0)📝
frontend/src/pages/api-docs/endpoints.ts(+16 -0)📝
frontend/src/pages/inbounds/form/InboundFormModal.tsx(+2 -0)➕
frontend/src/pages/inbounds/form/security/RealityFinderPanel.tsx(+358 -0)📝
frontend/src/pages/inbounds/form/security/RealityTargetScannerModal.tsx(+77 -29)📝
frontend/src/pages/inbounds/form/security/reality.tsx(+15 -1)📝
frontend/src/pages/inbounds/form/useSecurityActions.ts(+12 -0)📝
frontend/src/test/inbound-form-blocks.test.tsx(+1 -0)📝
frontend/src/test/inbound-form-modal.test.tsx(+96 -2)➕
frontend/src/test/reality-finder-panel.test.tsx(+168 -0)📝
frontend/src/test/reality-mldsa-cert-chain.test.tsx(+5 -0)📝
internal/web/controller/api.go(+2 -0)➕
internal/web/controller/reality_finder.go(+106 -0)📝
internal/web/controller/util_test.go(+29 -0)...and 21 more files
📄 Description
Summary
A "From my internet" tab in the REALITY target scanner. It finds targets next to the server and checks them from a device on the users' ISP, including whether the ISP cuts each name as SNI. The panel server sends no probes for it.
Why
The current scanner probes from the panel's server. It can tell whether a target speaks TLS 1.3 + h2 + X25519, but not whether the users' ISP filters the name as SNI, and in filtered networks that is what decides whether a target works. Scanning many neighbours from a VPS can also be read as network scanning by the host (the concern raised on #6950).
How it works
Like the clean IP scanner's full test (#6950), the panel hands out a one-day command. It runs a standard-library Python script (3.8+) on the admin's phone (Termux) or PC, with the VPN off:
The report appears in the dialog by itself. Use puts
targetandserverNamesinto the form, and the admin saves as usual. A report from a VPN or a datacenter network is flagged, because its filter result says nothing about the users.Abuse / safety
realityfinder/run/:token/{script.py,report}routes work only with an unexpired token and can only add a report to that token's job.Type of change
Areas affected
How was this tested?
internal/web/service/reality_finder_test.go: rejected servers (private, IPv6, injection attempt), bad port and scope, the values written into the script, the 24 h expiry, report sanitizing and ordering, the report and command caps, and the User-Agent in the command. I broke each guard once to confirm that a test goes red.frontend/src/test/reality-finder-panel.test.tsx: 443 is used for an inbound behind a local listener, the current target name is sent, a report renders and Use givesname:443+[name], the VPN warning, and the report coming back after the dialog is reopened (not after the command expires). Also mutation-checked.urllibUser-Agent with 403 (error 1010), so the command now sends one.go test ./...,golangci-lint run(0 issues),npm run lint,npm run typecheck, the vitest unit and components projects (1951 tests), andnpm run buildall pass.make genshows no drift, and the docs OpenAPI copy andserver.mdxare regenerated.Breaking changes
None. Existing scanner behavior is unchanged, and no DB or config change is needed.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.