[GH-ISSUE #6661] [Feature]: add custom inbound name #4451

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

Originally created by @sinath72 on GitHub (Sep 26, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6661

When an inbound has multiple Hosts and its port is changed, there is currently no way to set a custom inbound name that is displayed to users. This makes it difficult to identify and manage the correct inbound, especially when many Hosts are associated with the same inbound.

Describe the solution you'd like

hi
please add custom inbound name in Hosts when i change inbound port and have many hosts of that inbounds can change that inbound name for users

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 @sinath72 on GitHub (Sep 26, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6661 ### Is your feature request related to a problem? When an inbound has multiple Hosts and its port is changed, there is currently no way to set a custom inbound name that is displayed to users. This makes it difficult to identify and manage the correct inbound, especially when many Hosts are associated with the same inbound. ### Describe the solution you'd like hi please add custom inbound name in Hosts when i change inbound port and have many hosts of that inbounds can change that inbound name for users ### 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 - [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:39:45 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 26, 2026):

You can already do this: every Host has its own Remark field, and it shows up in your users' subscription links through the {{HOST}} token in the subscription Remark Template. The default template doesn't include {{HOST}}, so out of the box every Host under an inbound gets the same name.

How to show a separate name for each Host

  1. Hosts page → edit each Host → set Remark to the name you want users to see (for example Germany-CDN, Port-8443). The field is required (validate:"required,max=256", internal/database/model/model.go:1071).
  2. Settings → Subscription → Remark Template. Add {{HOST}}, either on its own or next to {{INBOUND}}. For example, starting from the default:
    {{INBOUND}}-{{HOST}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D
    
    or, to show only the Host's name:
    {{HOST}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D
    
  3. Save, then have clients refresh their subscription.

Changing the inbound's port doesn't matter here. A Host can also set its own Port (model.go:1078), so each Host can point to a different port and still have a different name.

Why it works this way (from the source)

  • The link name for a Host comes from genHostRemark (internal/sub/remark_vars.go:676-681). If a template is set, it expands the template. If not, it joins inbound remark, host remark and email:
    return fallbackRemark(inbound.Remark, hostRemark, client.Email)
    
  • The Host's remark is only available through a token: case "HOST": return ctx.hostRemark (remark_vars.go:202-203). {{INBOUND}} is always the inbound's own remark (configName(), remark_vars.go:32-37).
  • The default template has no {{HOST}}: DefaultRemarkTemplate = "{{INBOUND}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D" (internal/web/service/setting.go:40). That's why all Hosts of one inbound look the same until the template is changed.
  • The token is listed in the template editor's insert button: { token: 'HOST', group: 'client', sample: 'CDN' } (frontend/src/lib/remark/remarkVariables.ts:22).

For the maintainer, one small side note: the Host form hint pages.hosts.hints.remark (internal/web/translation/en-US.json:1058) says the host remark is "Shown as the config name only when the inbound has no remark of its own". The code above never uses the host remark as the config name; it only appears through {{HOST}} or the no-template fallback join. That hint is probably why this looks missing.

If you meant something else, such as renaming the inbound itself only for users, reply with what you expect a link name to look like and what you get now. I've left this open and relabelled it as a question.

Verdict: Not a bug (user configuration). The feature exists through Host Remark plus the {{HOST}} token in the Remark Template.

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

<!-- gh-comment-id:5847652249 --> @github-actions[bot] commented on GitHub (Sep 26, 2026): You can already do this: every Host has its own **Remark** field, and it shows up in your users' subscription links through the `{{HOST}}` token in the subscription **Remark Template**. The default template doesn't include `{{HOST}}`, so out of the box every Host under an inbound gets the same name. **How to show a separate name for each Host** 1. **Hosts** page → edit each Host → set **Remark** to the name you want users to see (for example `Germany-CDN`, `Port-8443`). The field is required (`validate:"required,max=256"`, `internal/database/model/model.go:1071`). 2. **Settings** → **Subscription** → **Remark Template**. Add `{{HOST}}`, either on its own or next to `{{INBOUND}}`. For example, starting from the default: ``` {{INBOUND}}-{{HOST}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D ``` or, to show only the Host's name: ``` {{HOST}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D ``` 3. Save, then have clients refresh their subscription. Changing the inbound's port doesn't matter here. A Host can also set its own **Port** (`model.go:1078`), so each Host can point to a different port and still have a different name. **Why it works this way (from the source)** - The link name for a Host comes from `genHostRemark` (`internal/sub/remark_vars.go:676-681`). If a template is set, it expands the template. If not, it joins inbound remark, host remark and email: ```go return fallbackRemark(inbound.Remark, hostRemark, client.Email) ``` - The Host's remark is only available through a token: `case "HOST": return ctx.hostRemark` (`remark_vars.go:202-203`). `{{INBOUND}}` is always the inbound's own remark (`configName()`, `remark_vars.go:32-37`). - The default template has no `{{HOST}}`: `DefaultRemarkTemplate = "{{INBOUND}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D"` (`internal/web/service/setting.go:40`). That's why all Hosts of one inbound look the same until the template is changed. - The token is listed in the template editor's insert button: `{ token: 'HOST', group: 'client', sample: 'CDN' }` (`frontend/src/lib/remark/remarkVariables.ts:22`). For the maintainer, one small side note: the Host form hint `pages.hosts.hints.remark` (`internal/web/translation/en-US.json:1058`) says the host remark is "Shown as the config name only when the inbound has no remark of its own". The code above never uses the host remark as the config name; it only appears through `{{HOST}}` or the no-template fallback join. That hint is probably why this looks missing. If you meant something else, such as renaming the inbound itself only for users, reply with what you expect a link name to look like and what you get now. I've left this open and relabelled it as a question. Verdict: Not a bug (user configuration). The feature exists through Host **Remark** plus the `{{HOST}}` token in the Remark Template. *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
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#4451
No description provided.