[GH-ISSUE #5918] Sharing devices under the same IP #4102

Closed
opened 2026-10-31 20:37:12 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @zhaoyangldahua-hub on GitHub (Jul 13, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5918

My business requires audits of very specific devices, often involving devices sharing the same IP within a company. The current anti-sharing strategies clearly fail to address this issue

Describe the solution you'd like

Can we extend the subscription logic and implement device fingerprinting? This will solve most of the sharing issues

Alternatives you've considered

No response

Concrete use case

No response

Mockups, screenshots, or examples

No response

Which parts of the panel would this affect?

Subscription (share links / Clash / JSON)

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @zhaoyangldahua-hub on GitHub (Jul 13, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5918 ### Is your feature request related to a problem? My business requires audits of very specific devices, often involving devices sharing the same IP within a company. The current anti-sharing strategies clearly fail to address this issue ### Describe the solution you'd like Can we extend the subscription logic and implement device fingerprinting? This will solve most of the sharing issues ### Alternatives you've considered _No response_ ### Concrete use case _No response_ ### Mockups, screenshots, or examples _No response_ ### Which parts of the panel would this affect? Subscription (share links / Clash / JSON) ### Are you willing to help? - [ ] I'd like to implement this feature myself and open a PR. - [x] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
bsakaguchi 2026-10-31 20:37:12 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Jul 13, 2026):

This has been requested and closed several times already: #2474, #2890, #3002, #5032, and most recently #5170. Closing as a duplicate of that discussion.

The blocker is the same one raised in those threads. Today the only per-connection signal 3x-ui has for anti-sharing is the client's IP address, exposed by Xray-core's online-stats API and enforced via the limitIp field on each client (internal/database/model/model.go). CheckClientIpJob (internal/web/job/check_client_ip_job.go) reads that API and bans/disconnects over-limit IPs through fail2ban (or a temporary Xray user re-add on platforms without it). Xray-core does not expose any hardware/device identifier through its stats or policy gRPC API, so 3x-ui has no data available to enforce a true per-device limit at the proxy layer. @MHSanaei addressed this directly before: "we can't add device limit, xray need to do that not us" (#2474) and "you need to ask xray core about this" (#2890).

On the specific idea of fingerprinting at the subscription layer (internal/sub/controller.go): this would not close the gap described here. The subscription endpoint only serves the share-link / Clash / JSON payload at fetch time — it has no connection to the actual proxied traffic afterward. Even with a fingerprint on that one request, once a device has the config it can hand the resulting VLESS/VMess/etc. links to any number of other devices, which then connect directly through Xray without ever touching the subscription endpoint again. Meaningful enforcement has to happen at the connection layer, which is the piece Xray-core doesn't currently support.

If you'd like to see real device-level limiting land, please add a 👍 to #3002 (the oldest open thread on this topic) rather than here, so maintainers can gauge interest in one place.

This reply was generated automatically. A maintainer may follow up.

<!-- gh-comment-id:4953577023 --> @github-actions[bot] commented on GitHub (Jul 13, 2026): This has been requested and closed several times already: #2474, #2890, #3002, #5032, and most recently #5170. Closing as a duplicate of that discussion. The blocker is the same one raised in those threads. Today the only per-connection signal 3x-ui has for anti-sharing is the client's IP address, exposed by Xray-core's online-stats API and enforced via the `limitIp` field on each client (`internal/database/model/model.go`). `CheckClientIpJob` (`internal/web/job/check_client_ip_job.go`) reads that API and bans/disconnects over-limit IPs through fail2ban (or a temporary Xray user re-add on platforms without it). Xray-core does not expose any hardware/device identifier through its stats or policy gRPC API, so 3x-ui has no data available to enforce a true per-device limit at the proxy layer. @MHSanaei addressed this directly before: "we can't add device limit, xray need to do that not us" (#2474) and "you need to ask xray core about this" (#2890). On the specific idea of fingerprinting at the subscription layer (`internal/sub/controller.go`): this would not close the gap described here. The subscription endpoint only serves the share-link / Clash / JSON payload at fetch time — it has no connection to the actual proxied traffic afterward. Even with a fingerprint on that one request, once a device has the config it can hand the resulting VLESS/VMess/etc. links to any number of other devices, which then connect directly through Xray without ever touching the subscription endpoint again. Meaningful enforcement has to happen at the connection layer, which is the piece Xray-core doesn't currently support. If you'd like to see real device-level limiting land, please add a 👍 to #3002 (the oldest open thread on this topic) rather than here, so maintainers can gauge interest in one place. *This reply was generated automatically. A maintainer may follow up.*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4102
No description provided.