[GH-ISSUE #6261] [Feature]: Improve HTTP proxy configuration and usage #4250

Open
opened 2026-10-31 20:38:17 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Heshmatkhah on GitHub (Aug 19, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6261

Hi,

Thanks for the great work.

It would be useful to manage HTTP Proxy users like other protocols.

I know HTTP Proxy is easier to detect, but in some setups this can be handled through an intermediary server.

Its main advantage is that it requires no special client and can be configured natively on almost any device.

This would make HTTP Proxy management consistent with the other protocols and simplify traffic management.

Describe the solution you'd like

  1. Define HTTP Proxy credentials per user/client instead of only at the inbound level.
  2. Apply per-user traffic quotas and usage tracking.
  3. Include HTTP Proxy in the same subscription alongside other protocols. This would allow HTTP Proxy, VLESS, VMess, etc. to be managed through the same user/subscription model.

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?

No response

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 @Heshmatkhah on GitHub (Aug 19, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6261 ### Is your feature request related to a problem? Hi, Thanks for the great work. It would be useful to manage **HTTP Proxy users like other protocols**. I know HTTP Proxy is easier to detect, but in some setups this can be handled through an intermediary server. Its main advantage is that it requires **no special client** and can be configured natively on almost any device. This would make HTTP Proxy management consistent with the other protocols and simplify traffic management. ### Describe the solution you'd like 1. Define HTTP Proxy credentials per user/client instead of only at the inbound level. 2. Apply per-user traffic quotas and usage tracking. 3. Include HTTP Proxy in the same subscription alongside other protocols. This would allow HTTP Proxy, VLESS, VMess, etc. to be managed through the same user/subscription model. ### 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? _No response_ ### 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.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 19, 2026):

HTTP and Mixed inbounds are modelled as inbound-level accounts today, not as panel clients, so each of the three points needs new plumbing rather than a flag. Here is what I confirmed in the source, point by point.

1. Per-client credentials

An HTTP/Mixed inbound stores accounts: [{ user, pass }] (frontend/src/schemas/protocols/inbound/http.ts:7, defaults at frontend/src/lib/xray/inbound-defaults.ts:189), and the schema comment records the intent: "No client tracking (no email/limits) at the Xray settings level". The panel's client layer reads only the clients array out of inbound settings (internal/web/service/inbound_settings_clients.go:11), and the client UI and Telegram bot filter these protocols out (frontend/src/pages/clients/ClientFormModal.tsx:42, frontend/src/pages/clients/ClientBulkAddModal.tsx:20, internal/web/service/tgbot/tgbot_inbound.go:157). Several accounts per HTTP inbound are already supported — they are simply not clients.

2. Per-user quota and usage tracking

Per-client usage comes from Xray stat names of the form user>>>{email}>>>traffic>>>uplink|downlink (regex at internal/xray/api.go:47, aggregation at internal/xray/api.go:875), and quota/expiry enforcement runs off the resulting client_traffics rows (internal/web/service/inbound_disable.go:46). An HTTP/Mixed account has no email, so there is no key to attribute a counter to. Live user add/remove is a no-op as well: buildUserAccount (internal/xray/api.go:533) builds a typed account only for vmess, vless, trojan, shadowsocks, hysteria and wireguard and returns nil otherwise, and AddUser returns early on that nil (internal/xray/api.go:668). Inbound-level counters do work for these inbounds, since statsInboundUplink/statsInboundDownlink are on by default (internal/web/service/config.json:52).

3. Inclusion in the subscription

The subscription query selects only vmess, vless, trojan, shadowsocks, hysteria, wireguard and mtproto (internal/sub/service.go:486), and GetLink returns an empty string for http/mixed (internal/sub/service.go:621); the Clash builder has no http branch either (internal/sub/clash_service.go:248). This is documented on the client-URL endpoint in docs/content/docs/en/reference/api/clients.mdx.

Precedent worth noting. MTProto is not an Xray protocol either, yet it does get per-client credentials, per-client quota/expiry and per-client traffic — through a sidecar whose stats endpoint the panel scrapes and folds into the normal accounting (internal/web/job/mtproto_job.go:44-78, internal/mtproto/manager.go). So the architecture can carry per-client accounting for a non-Xray-metered protocol, but it took purpose-built metering. For HTTP the same question would have to be answered first: I could not verify from this checkout whether Xray-core emits user>>> counters for http/socks inbounds, and on the panel side no email is ever registered for them, so today nothing arrives regardless.

What is possible right now as an approximation: one HTTP or Mixed inbound per user, each with its own port, its own single account, and its own Total (GB) and expiry date. Inbound-level quota and expiry are enforced for every protocol — internal/web/service/inbound_disable.go:14 disables any inbound where up + down >= total or the expiry time has passed. What cannot be approximated is subscription delivery, since an HTTP proxy has no share-link form in the panel.

Related: #4852 covers the display half of this (HTTP/Mixed accounts shown in the Clients window). This issue stays open as an enhancement, since the quota and subscription parts go beyond that request.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:5341851368 --> @github-actions[bot] commented on GitHub (Aug 19, 2026): HTTP and Mixed inbounds are modelled as inbound-level accounts today, not as panel clients, so each of the three points needs new plumbing rather than a flag. Here is what I confirmed in the source, point by point. **1. Per-client credentials** An HTTP/Mixed inbound stores `accounts: [{ user, pass }]` (`frontend/src/schemas/protocols/inbound/http.ts:7`, defaults at `frontend/src/lib/xray/inbound-defaults.ts:189`), and the schema comment records the intent: "No client tracking (no email/limits) at the Xray settings level". The panel's client layer reads only the `clients` array out of inbound settings (`internal/web/service/inbound_settings_clients.go:11`), and the client UI and Telegram bot filter these protocols out (`frontend/src/pages/clients/ClientFormModal.tsx:42`, `frontend/src/pages/clients/ClientBulkAddModal.tsx:20`, `internal/web/service/tgbot/tgbot_inbound.go:157`). Several accounts per HTTP inbound are already supported — they are simply not clients. **2. Per-user quota and usage tracking** Per-client usage comes from Xray stat names of the form `user>>>{email}>>>traffic>>>uplink|downlink` (regex at `internal/xray/api.go:47`, aggregation at `internal/xray/api.go:875`), and quota/expiry enforcement runs off the resulting `client_traffics` rows (`internal/web/service/inbound_disable.go:46`). An HTTP/Mixed account has no email, so there is no key to attribute a counter to. Live user add/remove is a no-op as well: `buildUserAccount` (`internal/xray/api.go:533`) builds a typed account only for vmess, vless, trojan, shadowsocks, hysteria and wireguard and returns `nil` otherwise, and `AddUser` returns early on that nil (`internal/xray/api.go:668`). Inbound-level counters do work for these inbounds, since `statsInboundUplink`/`statsInboundDownlink` are on by default (`internal/web/service/config.json:52`). **3. Inclusion in the subscription** The subscription query selects only `vmess`, `vless`, `trojan`, `shadowsocks`, `hysteria`, `wireguard` and `mtproto` (`internal/sub/service.go:486`), and `GetLink` returns an empty string for http/mixed (`internal/sub/service.go:621`); the Clash builder has no http branch either (`internal/sub/clash_service.go:248`). This is documented on the client-URL endpoint in `docs/content/docs/en/reference/api/clients.mdx`. **Precedent worth noting.** MTProto is not an Xray protocol either, yet it does get per-client credentials, per-client quota/expiry and per-client traffic — through a sidecar whose stats endpoint the panel scrapes and folds into the normal accounting (`internal/web/job/mtproto_job.go:44-78`, `internal/mtproto/manager.go`). So the architecture can carry per-client accounting for a non-Xray-metered protocol, but it took purpose-built metering. For HTTP the same question would have to be answered first: I could not verify from this checkout whether Xray-core emits `user>>>` counters for http/socks inbounds, and on the panel side no email is ever registered for them, so today nothing arrives regardless. **What is possible right now** as an approximation: one HTTP or Mixed inbound per user, each with its own port, its own single account, and its own Total (GB) and expiry date. Inbound-level quota and expiry are enforced for every protocol — `internal/web/service/inbound_disable.go:14` disables any inbound where `up + down >= total` or the expiry time has passed. What cannot be approximated is subscription delivery, since an HTTP proxy has no share-link form in the panel. Related: #4852 covers the display half of this (HTTP/Mixed accounts shown in the Clients window). This issue stays open as an enhancement, since the quota and subscription parts go beyond that request. *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#4250
No description provided.