mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-25 13:56:10 +00:00
feat(hosts): managed Hosts for per-host subscription link overrides (#5409)
* test(sub): characterize current link output (externalProxy + single-link baselines)
Phase 0 of the Hosts feature. Locks current subscription-link output for the
externalProxy paths (vless/vmess/trojan/ss exact, reality/hysteria by Contains)
so the upcoming ShareEndpoint refactor can be proven behavior-preserving. These
must stay green and unedited through every later phase.
* refactor(sub): unify external-proxy link building behind ShareEndpoint (TDD, snapshot-locked)
Phase 1 of the Hosts feature. Collapse the duplicated externalProxy link
builders (param-form for vless/trojan/ss, object-form for vmess) onto a single
ShareEndpoint abstraction so Phase 4 can add Host-driven links with ~zero new
branching.
Design: an externalProxy-derived endpoint carries the original entry map and
applies it through the UNCHANGED applyExternalProxyTLS{Params,Obj} helpers, so
output is provably byte-identical. buildExternalProxyURLLinks /
buildVmessExternalProxyLinks become thin adapters; the genVless/Trojan/SS/Vmess
call sites are untouched. genHysteriaLink is deliberately left on its own path
(hex pinSHA256, not pcs). The no-externalProxy default tails are unchanged.
TDD: N1-N4 (externalProxyToEndpoint, inboundDefaultEndpoint, buildEndpointLinks,
buildEndpointVmessLinks) written failing-first against stubs, then implemented.
Mutation sanity (performed + reverted): dropping the ep-carry in
externalProxyToEndpoint makes the Phase-0 C1/C2 characterization snapshots go
red (TLS overrides vanish), proving the snapshots guard the emitted output.
Gate: go test ./internal/sub/... and go test ./... green with ZERO edits to the
Phase-0 snapshots; go build ./... green on linux and windows; go vet clean.
* feat(model): Host entity + automigrate + openapi codegen (TDD)
Phase 2 of the Hosts feature. Adds the Host GORM model: an override endpoint
attached to an inbound (address/port + TLS/transport/clash overrides + sub
scoping), superseding the legacy externalProxy array functionally while leaving
it intact.
- model.Host with snake_case column tags, json serializer for slices, text for
free-JSON (mux/sockopt/xhttp), validate tags (remark 1-40, port 0-65535,
security + mihomoIpVersion enums); TableName "hosts". NodeGuids column is added
now but unused (host->node scoping deferred to v2).
- Registered in BOTH initModels() (db.go) and migrationModels() (migrate_data.go);
the latter is required for cross-DB migration and is easy to miss. PG sequence
resync iterates the initModels slice, so it is covered automatically.
- pruneOrphanedHosts() deletes hosts whose inbound_id has no inbound, called
alongside pruneOrphanedClientInbounds().
- openapigen manifest: Host added to StructAllow with MuxParams/SockoptParams/
XhttpExtraParams -> KindAny; regenerated frontend/src/generated/* + openapi.json.
TDD: TestHostTableName, TestHostValidation, TestHostAutoMigrateCreatesColumns
(+ _Postgres), TestPruneOrphanedHosts written failing-first against a wrong-name,
untagged, unregistered stub, then implemented.
Gate: go test ./... green on SQLite AND a real Postgres DSN (local container);
go build/vet/gofmt clean; npm run gen succeeds with the new Host type/schema/
example/zod; npm run typecheck + npm run test (542) green.
* feat(api): Host CRUD service + controller + routes (TDD)
Phase 3 of the Hosts feature.
- service/host.go (HostService, empty struct + database.GetDB() like
ClientService): GetHosts, GetHostsByInbound, GetHost, AddHost (verifies the
inbound exists — no hard FK), UpdateHost (inbound + sort order immutable here),
DeleteHost, SetHostEnable, SetHostsEnable, DeleteHosts, ReorderHosts (single
driver-safe transaction), GetAllTags.
- controller/host.go mirrors NodeController: routes under /panel/api/hosts
(list/get/byInbound/tags + add/update/del/setEnable/reorder + bulk/setEnable,
bulk/del), binds via middleware.BindAndValidate so the model validate tags are
enforced, {success,msg,obj} envelopes.
- Wired the hosts group into api.go after nodes (inherits checkAPIAuth + CSRF).
- DelInbound now cascades: deleting an inbound deletes its hosts.
- Documented all 11 routes in api-docs endpoints.ts (referencing the generated
Host schema) and regenerated openapi.json; extended TestAPIRoutesDocumented's
controller->basePath switch for host.go. Backend en toast keys added.
TDD: service tests (Add/GetByInbound, RejectsUnknownInbound, Reorder, Set/Bulk
enable, DeleteHosts, DeleteInboundCascadesHosts, GetAllTags) written failing-
first against a nil-returning stub; controller test (AddListGetDelete envelope
round-trip + AuthInherited 401) added.
Gate: go test ./internal/web/... + go test ./... green; npm run gen + typecheck
+ lint + test (542) + build green.
* feat(sub): render subscription links from hosts; legacy fallback when none (TDD, mutation-checked)
Phase 4 of the Hosts feature. Inserts host resolution between inbound and link
across all three subscription formats.
Mechanism: hostEndpoints(inbound, format) loads the inbound's enabled hosts
(filtered by ExcludeFromSubTypes, ordered by sort_order then id) and projects
each onto the externalProxy entry shape the raw/json/clash renderers already
consume. So a host fans out one link/proxy reusing the exact existing rendering
(address/port/security/sni/fp/alpn/pins/ech) with zero new TLS code. Host header
and path overrides are applied additively in the raw builders (no-op for legacy
externalProxy, which never carries those keys — characterization snapshots stay
green). Clash ip-version (MihomoIpVersion) is set last on the proxy.
Integration points:
- getSubs (raw): per inbound, hostEndpoints AFTER projectThroughFallbackMaster;
len>0 -> linkFromHosts (renders only the hosts), else legacy GetLink.
- GetJson/GetClash: inject the host endpoints into the inbound's externalProxy
before the existing getConfig/getProxies loop.
- Precedence: hosts win over any legacy externalProxy (injection replaces it).
Backward compat: a zero-host inbound takes the legacy path -> byte-identical
output (all Phase-0 characterization snapshots unchanged).
TDD: 9 cycles (zero-hosts identical, N-links-ordered with host/path override,
disabled skipped, host-vs-externalProxy precedence, no-dedup, sort composes with
SubSortIndex, host-over-fallback, resolve-via-client-inbounds, ExcludeFromSubTypes
per format) written failing-first against unwired helpers, then wired green.
Mutation sanity (performed + reverted, documented here):
- zero-hosts fallback: flipping the len(hostEps)>0 guard to >=0 makes
TestSub_ZeroHosts_IdenticalOutput go red (host path yields "" for no hosts).
- no-dedup: adding a remark-dedup in hostEndpoints makes TestSub_NHosts_NoDedup
go red (two distinct hosts collapse to one link).
Gate: go test ./internal/sub/... + go test ./... green with ZERO edits to the
Phase-0 snapshots; go build green on linux and windows; go vet + gofmt clean.
* feat(migration): seed hosts from inbound externalProxy (TDD, idempotent, dual-driver)
Phase 5 of the Hosts feature. One-time migration so existing installs surface
their legacy externalProxy entries as first-class Host rows.
- seedHostsFromExternalProxy() is self-gated on a HistoryOfSeeders
"HostsFromExternalProxy" row (run-once) and wired into runSeeders. For each
inbound it parses StreamSettings, reads externalProxy[], and creates one Host
per entry: forceTls->Security (unknown->same), dest->Address, port->Port,
remark->Remark (generated when blank, capped at 40), sni/fingerprint/alpn/
pinnedPeerCertSha256/echConfigList copied; SortOrder=index; InboundId set.
- Additive: externalProxy is left intact in StreamSettings (rollback-safe; the
sub layer prefers hosts when present, §Phase 4).
- Postgres: GORM db.Create advances hosts_id_seq via the sequence, so no extra
resync is needed beyond the existing startup resync.
TDD: field-mapping, idempotency (second run no-op), no-externalProxy->no-hosts,
externalProxy-kept-intact written failing-first against a stub; plus a
Postgres counterpart that skips without XUI_DB_DSN.
Gate: go test ./internal/web/service/... ./internal/database/... green on SQLite;
the *_Postgres tests green against a real Postgres container; go build green on
linux and windows; go vet + gofmt clean. (Running the whole database package
under XUI_DB_TYPE=postgres is not supported — the SQLite-path tests share the one
DSN — so only the t.Skip-gated *_Postgres tests run with the env set.)
* feat(ui): Hosts page + schema + query hooks + link preview helper (TDD on schema/helpers)
Phase 6 of the Hosts feature — the admin UI.
- schemas/api/host.ts: HostFormSchema (validation: remark 1-40, tags ^[A-Z0-9_:]+$
≤10×≤36, port 0-65535, security/mihomoIpVersion enums, alpn/fingerprint reused
from the shared primitives) + a loose HostRecordSchema/HostListSchema for reads.
- lib/hosts/host-link.ts: hostToExternalProxyEntry — the frontend mirror of the
backend hostToExternalProxyMap (security->forceTls, sni override rules, port
inherit), for share-link previews.
- api/queries/useHostsQuery.ts + useHostMutations.ts (mirror the node hooks):
list/get + add/update/del/setEnable/reorder/bulk; queryKeys.hosts.* added;
mutations invalidate keys.hosts.root().
- pages/hosts/{HostsPage,HostList,HostFormModal}.tsx (+CSS) mirroring pages/nodes:
list with remark · address:port · inbound · security · tags · enable Switch ·
per-inbound move up/down (reorder) · bulk enable/disable/delete; form grouped
into Basic / Advanced / Clash / Subscription-scope sections.
- Route '/hosts' + sidebar item (Global icon); menu.hosts + pages.hosts.* added to
the en-US bundle (other locales fall back to English until translated).
TDD: HostFormSchema (10 cases) and hostToExternalProxyEntry (6 cases) written
failing-first, then implemented. UI verified by lint/typecheck/test/build.
Deferred (documented enhancement): the live in-form share-link preview (needs
inbound+client context) and a per-host host/path override in JSON/Clash output
(raw already overrides; JSON/Clash inherit the inbound's host/path).
Gate: cd frontend && npm run lint && npm run typecheck && npm run test (557) &&
npm run build all green; go build ./... + go test ./... still green.
* refactor(ui): remove the External Proxy form from the inbound stream settings
Hosts supersede the legacy externalProxy: the subscription renders from hosts
(hosts win when both exist) and the migration converts existing externalProxy
entries to hosts. externalProxy's only real consumers were the subscription
(now covered) and this form's preview — the backend per-client copy-link never
used it — so removing the editor has no functional regression.
- Drop ExternalProxyForm + toggleExternalProxy from InboundFormModal and delete
the orphaned form component + its export; remove its block test + snapshot.
- KEEP the externalProxy schema field and backend parsing/link-generation: an
existing inbound's externalProxy still round-trips through the form (not
silently destroyed on edit) and still renders if a host was removed.
Gate: cd frontend && npm run typecheck + lint + test (556) + build green.
* fix(ui): use Alert `title` instead of deprecated `message` (antd 6)
Ant Design 6 deprecated <Alert message=> in favor of <Alert title=>; the panel
was mid-migration (21 Alerts already on title). Renamed the 7 remaining stragglers
across 5 files (SubLinksModal, InboundFormModal, sockopt, EmailTab, TelegramTab),
silencing the runtime deprecation warning. description= is unchanged.
Pre-existing warning, surfaced while testing Hosts — not introduced by it.
Gate: npm run typecheck + lint + test (556) + build green.
* style(ui): align Hosts page with Clients/Inbounds cards + reorder columns
- page-shell.css never listed .hosts-page, so the Hosts page got no content
padding / transparent-layout / summary-card spacing. Add a .hosts-page shell
block (background, dark/ultra vars, content-area + summary-card padding). This
is the actual "card spacing" bug.
- HostList: match the Clients/Inbounds list card — hoverable + the toolbar moved
into the card title as a .card-toolbar (Add when nothing selected; selected
count + bulk enable/disable/delete on selection). Re-declare .card-toolbar in
HostList.css since the shared rule lives in a lazily-loaded page stylesheet.
- Reorder table columns as requested: Actions, Enable, then Remark, Endpoint,
Inbound, Security, Tags. Added scroll x for narrow screens.
- HostsPage: add a summary card (Total / Enabled / Disabled) like the other
pages. New i18n keys: pages.hosts.selectedCount + pages.hosts.summary.*.
Gate: npm run typecheck + lint + test (556) + build green.
* style(ui): use Tabs instead of Collapse in the Add/Edit Host form
The Basic / Advanced / Clash / Subscription-scope sections are now tabs. Each
pane sets forceRender so all fields stay mounted — required because the form
uses preserve=false, so an unmounted tab's values would otherwise be dropped on
submit (and a required field on a hidden tab still blocks submit).
Gate: npm run typecheck + lint + test (556) + build green.
* style(ui): split Host form into Security + Advanced tabs; drop unused JSON fields
- Remove the Mux/Sockopt/XHTTP raw-JSON fields from the Host form: they were not
wired into link generation and the inbound's structured editors are inbound-
specific (not reusable). The DB columns + read schema + generated type stay, so
they can get proper editors later. (HostFormSchema drops them; HostRecordSchema
keeps them.)
- Reorganize tabs to Basic / Security / Advanced / Clash / Subscription scope:
Security holds the TLS/cert fields (security, sni, sni-overrides, alpn,
fingerprint, pins, verify-by-name, ech); Advanced now holds the transport
overrides (host header, path).
- i18n: add pages.hosts.sections.security; drop the 3 unused field labels.
Gate: npm run typecheck + lint + test (556) + build green.
* style(ui): restore Mux/Sockopt/XHTTP fields in the Host Advanced tab
Put the three free-JSON override fields back, in the Advanced tab next to host
header / path (as JSON inputs — the inbound's structured editors aren't reusable
here). Re-added to HostFormSchema + defaults + the i18n labels.
Gate: npm run typecheck + lint + test (556) + build green.
* feat(hosts): add allowInsecure (rendered) + serverDescription/mihomoX25519/vlessRouteId fields
Closes most of the Remnawave-host gap analysis.
- model.Host: + allowInsecure, serverDescription (≤64), vlessRouteId (0-65535),
mihomoX25519. Auto-migrated (SQLite + Postgres verified); openapi regenerated.
- allowInsecure is fully RENDERED into subscription output (TDD):
- raw link: allowInsecure=1 (TLS/Reality, skipped for none) via the endpoint
builder;
- JSON/Clash: applyExternalProxyTLSToStream writes tlsSettings.settings.
allowInsecure, and clash applySecurity now emits skip-cert-verify for the tls
case (it previously only did so for Hysteria — a pre-existing gap, so inbound
allowInsecure now renders for vless/trojan/ss clash too).
- Frontend: the four fields added to the Host form (allowInsecure → Security,
serverDescription → Basic, vlessRouteId → Advanced, mihomoX25519 → Clash);
serverDescription shown under the remark in the list. Schema + i18n updated.
serverDescription / vlessRouteId / mihomoX25519 are stored + editable; their
deeper rendering (and per-host mux/sockopt/xhttp into JSON/Clash, plus a per-host
xray JSON template) are tracked as follow-ups.
Gate: go test ./... green (SQLite + Postgres for the host schema/migration);
go build linux+windows; go vet + gofmt clean; npm run gen + typecheck + lint +
test (556) + build green; generated files in sync.
* feat(sub): render host sockopt + xhttp-extra params into JSON/Clash output (TDD)
A host's sockoptParams and xhttpExtraParams (free-JSON) now take effect:
applyHostStreamOverrides injects sockopt into the per-host stream (re-added since
the base stream strips it) and merges xhttpExtraParams into xhttpSettings, called
in both getConfig (JSON) and getProxies (Clash) right after the per-host TLS
apply. No-op for legacy externalProxy entries (keys absent) — characterization
snapshots unchanged.
mux rendering is outbound-level (overrides outbound.Mux) and needs a genVless/
genVnext/genServer signature change — deferred, along with the per-host xray
JSON template.
Gate: go test ./internal/sub/... + go test ./... green (snapshots unchanged);
go build + vet + gofmt clean.
* feat(sub): render host muxParams as a per-host JSON outbound mux override (TDD)
genVnext/genVless/genServer take a muxOverride: a host's muxParams (when valid
JSON) overrides the global mux on its JSON outbound; empty falls back to the
panel mux (behavior unchanged for non-host configs). Completes the host
mux/sockopt/xhttp trio. Test call sites updated for the new signature.
Gate: go test ./internal/sub/... + go test ./... green (snapshots unchanged);
go build + gofmt clean.
* style(ui): show Host security fields conditionally per security (like externalProxy)
* feat(sub): apply host SNI + fingerprint override for reality (TDD)
A reality host now overrides SNI and fingerprint while inheriting publicKey/
shortId from the inbound (reality keys can't be host-supplied). Previously the
reality link kept the inbound's serverName because the TLS appliers are gated to
security=="tls".
- raw: applyEndpointRealityParams sets sni/fp on the params for reality;
- JSON/Clash: applyHostStreamOverrides sets realitySettings.serverName +
serverNames from the host SNI.
Gated to host endpoints via an isHost marker on the synthesized ep, so the legacy
externalProxy path stays byte-identical (characterization snapshots unchanged).
The marker is internal and never emitted.
Gate: go test ./internal/sub/... + go test ./... green; go build + vet + gofmt clean.
* fix(ui): start the Host inbound select unselected instead of showing 0
A new host left inboundId defaulting to 0, so the Select rendered "0". inboundId
is now optional in the form (undefined until chosen), so it shows its
placeholder ("Select an inbound"); the required rule still enforces a choice on
save. Port keeps 0 (means "inherit the inbound's port").
Gate: npm run typecheck + lint + build green.
* fix(ui): drop redundant :port suffix from the Host inbound select label
The inbound tag (e.g. in-59303-tcp) already carries the port, so the appended
":59303" was duplicated. Show just the remark/tag.
Gate: npm run typecheck + lint + build green.
* style(ui): apply the shared card hover shadows to the Hosts page
page-cards.css scoped its card styling + hover shadows to each page class but
not .hosts-page, so Hosts fell back to antd's default hoverable (a larger/blurry
shadow + pointer cursor). Add a .hosts-page block matching the other pages.
Gate: npm run build green.
* feat(hosts): move Tags to Basic tab, add Nodes field, accept VLESS route ranges
- Move the Tags field into the Host form's Basic tab and add a Nodes
multi-select (visual-only assignment, backed by the existing node_guids
column) so the Basic tab matches the reference layout.
- Replace the single-port vlessRouteId integer with a free-form vlessRoute
string that accepts comma-separated ports/ranges (e.g. 53,443,1000-2000);
format-validated on the frontend, stored verbatim on the backend.
- Regenerated frontend types/openapi from the changed model.
* feat(hosts): structured editors for Mux/Sockopt/XHTTP + new Final Mask
Replace the raw JSON textareas in the Host form's Advanced tab with the same
structured editors used elsewhere, under a nested tabbed layout (General / Mux /
Sockopt / XHTTP / Final Mask), mirroring the Sub-JSON settings tab:
- Mux: the Sub-JSON mux editor (enable + concurrency/xudpConcurrency/xudp443).
- Sockopt + XHTTP: reuse the outbound SockoptForm / XhttpForm, wrapped in an
isolated form that serializes the edited subtree back to the host's JSON
string (pruned so the override stays sparse).
- Final Mask: new host field (model + column + JSON-render wiring that merges
the masks into the host's JSON-subscription stream), edited via the shared
FinalMaskForm like the Sub-JSON Final Mask editor.
Each editor stays a controlled value/onChange component bound to its existing
host JSON string field; backend rendering of mux/sockopt/xhttp is unchanged.
* feat(hosts): drop XHTTP + Xray-JSON-template overrides; fix mobile form layout
Remove the host's XHTTP extra-params and Xray-JSON-template overrides entirely
(model fields + columns, JSON-subscription render paths incl. hostTemplateOutbound,
schema, form tab/field, i18n, openapi codegen, and their tests) — they did not
fit the host model. Mux, Sockopt and Final Mask stay as structured editors.
Mobile fixes for the Edit Host modal:
- responsive width (95vw on mobile, was a fixed 760px that overflowed the
viewport and clipped the tabs/labels) + a scrollable body so the footer stays
on screen;
- Mux fields use responsive Row/Col (stack on mobile) instead of a fixed-width
label grid.
* fix(hosts): hide the spurious horizontal scrollbar in the Edit Host modal
Setting overflowY:auto on the modal body forced overflow-x to auto too (CSS
rule), so antd Row's negative gutter margins triggered a horizontal scrollbar.
Pin overflowX:hidden.
* feat(hosts): inbound-style responsive field layout + icon empty state
- Host form (main form + Mux/Sockopt/Final Mask editors) now use the inbound
form's label layout: label beside the input on desktop (labelCol sm span 8 /
wrapperCol sm span 14, right-aligned), stacked label-above-input on mobile.
Rewrote HostMuxForm onto an internal antd Form so it follows the same layout
instead of a manual grid.
- Empty hosts table now shows the host icon + the shared 'Nothing here yet'
(noData) text, matching Nodes/Inbounds/Clients, replacing the bespoke
'No hosts yet…' string.
* fix(hosts): avoid nested <form> in the Edit Host modal
The Mux/Sockopt/Final Mask editors each render their own antd Form inside the
host's main Form, producing an invalid nested <form> DOM node (hydration
warning). Render those inner forms with component={false} so they keep the form
instance/context but emit no <form> element.
* fix(hosts): make the Mux enable toggle work
The Switch's checked state came from Form.useWatch('mux'), but the mux object
field had no registered Form.Item while disabled, so setFieldValue never
notified the watcher and the toggle stayed off. Bind the Switch to a real
name='enabled' field (antd drives its checked state directly) and keep the
sub-fields registered via hidden={!enabled}, serialized to the flat mux JSON.
* refactor(hosts): reuse the outbound MuxForm instead of a bespoke Mux editor
The Mux fields duplicated the outbound MuxForm. Reuse it through the same
wrapper as Sockopt: generalize OutboundSubtreeJsonForm with defaultSubtree
(pre-fill on enable) and a serialize hook, and have HostMuxForm render MuxForm
at the ['mux'] path. The host keeps its inherit-when-off semantics by storing ''
unless mux.enabled. Also drops the now-unused enableSwitch path from the
wrapper (only the removed XHTTP editor used it).
* style(hosts): use default-width Port input like the inbound form
The host Port used width:100% (full width); the inbound's numeric inputs use
antd's default width. Drop the override so Port matches. The Mux number inputs
already use the default width via the reused MuxForm.
* refactor(sockopt): readable customSockopt editor as a shared component
The customSockopt rows were a single cramped Space.Compact line and duplicated
verbatim in the inbound and outbound sockopt forms. Extract a shared
CustomSockoptList that renders each entry as a titled group of labeled fields
(System / Level / Opt / Type / Value), matching the rest of the form, and use it
in both (and thus the host Sockopt editor).
* fix(finalmask): drop the empty Custom Tables tag on a new sudoku mask
The sudoku TCP-mask default seeded customTables: [''] (one empty string), which
rendered as a blank removable tag. Seed [] instead.
* fix(sockopt): make the outbound (and host) Sockopt client-only
Per the XTLS sockopt docs, tproxy / acceptProxyProtocol / V6Only /
trustedXForwardedFor only apply to an inbound (listening socket); they are
meaningless on an outbound/dialer. Drop them from the outbound SockoptForm
(which the host reuses). The Sockopt default object still seeds those keys, so
the host also strips them on serialize, keeping its override honest to the
server/client split. The inbound SockoptForm is left unchanged.
* fix(sockopt): make the inbound Sockopt server-only
Complete the server/client split: drop the outbound/dialer-only fields from the
inbound SockoptForm — dialerProxy, domainStrategy, interface, addressPortStrategy,
happyEyeballs, tcpMptcp (client-only since Go 1.24 auto-enables MPTCP on listen).
mark stays (xray applies SO_MARK on inbound sockets too). Update the form-blocks
snapshot to the server-side field set (intentional spec change).
* feat(hosts): populate Sockopt dialerProxy with the panel's outbound tags
The host Sockopt editor reused the outbound SockoptForm with outboundTags=[],
so the dialerProxy dropdown was empty. Feed it the panel's outbound tags via
the existing useOutboundTags hook (shares the cached xray-config query;
blackhole excluded), so a host can chain through a subscription outbound by tag.
* fix(hosts): empty-state styling on direct load + exclude balancers from dialerProxy
- .card-empty was only defined in lazily-loaded Clients/Inbounds/Nodes
stylesheets, so a direct /hosts refresh rendered the empty table state
unstyled (faint + uncentered) until another page was visited. Re-declare it
in HostList.css so it's correct on first load.
- The Sockopt dialerProxy dropdown listed balancer tags (useOutboundTags merges
them in for mtproto egress). dialerProxy chains a single outbound, so balancers
aren't valid — switch to useOutboundTagGroups and use only the outbound group.
* fix(outbounds): icon + 'Nothing here yet' empty state; stop fading other pages
The Outbounds empty state was a faint '—', and OutboundsTab.css set the global
.card-empty to opacity:0.4 — which leaked onto whichever page's empty state was
shown after the Outbounds CSS had loaded (e.g. Hosts went faint after visiting
Outbounds). Render the icon + noData ('Nothing here yet') like the other lists,
and align .card-empty to the shared centered/secondary style (no opacity).
* fix(outbounds): custom empty state on the desktop table too
The desktop Outbounds Table had no locale.emptyText, so it showed antd's
default 'No data' box. Add the same ExportOutlined + noData empty state as the
card (mobile) view.
* style(sidebar): use ExportOutlined for the Outbounds nav item
The Outbounds sidebar item used UploadOutlined (an upload tray). Switch to
ExportOutlined, matching the outbound icon now used in the routing target and
the outbounds empty states.
* feat(hosts): icons on the form tabs (icon-only on mobile)
Wrap every Host form tab label (Basic/Security/Advanced/Clash/Subscription
scope and the nested General/Mux/Sockopt/Final Mask) with catTabLabel, so the
tabs show icon + text on desktop and just the icon (with a tooltip) on mobile,
matching the Settings/Xray tab bars.
* refactor(hosts): fold Exclude-from-formats into Advanced, drop the one-field tab
The Subscription scope tab held only excludeFromSubTypes after Tags moved to
Basic — a niche per-format scoping knob. Move it into the Advanced > General
sub-tab and remove the standalone tab (and its now-unused subScope label/icon).
* feat(sub): per-client remark template variables; drop the remark model & Show Usage Info
* fix(migration): cap seeded host remark at the model's 256-char limit, not 40
This commit is contained in:
@@ -19,6 +19,7 @@ type APIController struct {
|
||||
inboundController *InboundController
|
||||
serverController *ServerController
|
||||
nodeController *NodeController
|
||||
hostController *HostController
|
||||
settingController *SettingController
|
||||
xraySettingController *XraySettingController
|
||||
settingService service.SettingService
|
||||
@@ -95,6 +96,10 @@ func (a *APIController) initRouter(g *gin.RouterGroup) {
|
||||
nodes := api.Group("/nodes")
|
||||
a.nodeController = NewNodeController(nodes)
|
||||
|
||||
// Hosts API — per-inbound override endpoints for subscription links
|
||||
hosts := api.Group("/hosts")
|
||||
a.hostController = NewHostController(hosts)
|
||||
|
||||
// Settings + Xray config management live under the API surface too, so the
|
||||
// same API token drives them. Paths are /panel/api/setting/* and
|
||||
// /panel/api/xray/*.
|
||||
|
||||
@@ -95,6 +95,8 @@ func TestAPIRoutesDocumented(t *testing.T) {
|
||||
basePath = "/panel/api/server"
|
||||
case "node.go":
|
||||
basePath = "/panel/api/nodes"
|
||||
case "host.go":
|
||||
basePath = "/panel/api/hosts"
|
||||
case "setting.go":
|
||||
basePath = "/panel/api/setting"
|
||||
case "xray_setting.go":
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/mhsanaei/3x-ui/v3/internal/database/model"
|
||||
"github.com/mhsanaei/3x-ui/v3/internal/web/middleware"
|
||||
"github.com/mhsanaei/3x-ui/v3/internal/web/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// HostController exposes CRUD + ordering for Host override endpoints under
|
||||
// /panel/api/hosts. Thin HTTP layer over HostService; mirrors NodeController.
|
||||
type HostController struct {
|
||||
hostService service.HostService
|
||||
}
|
||||
|
||||
func NewHostController(g *gin.RouterGroup) *HostController {
|
||||
a := &HostController{}
|
||||
a.initRouter(g)
|
||||
return a
|
||||
}
|
||||
|
||||
func (a *HostController) initRouter(g *gin.RouterGroup) {
|
||||
g.GET("/list", a.list)
|
||||
g.GET("/get/:id", a.get)
|
||||
g.GET("/byInbound/:inboundId", a.byInbound)
|
||||
g.GET("/tags", a.tags)
|
||||
|
||||
g.POST("/add", a.add)
|
||||
g.POST("/update/:id", a.update)
|
||||
g.POST("/del/:id", a.del)
|
||||
g.POST("/setEnable/:id", a.setEnable)
|
||||
g.POST("/reorder", a.reorder)
|
||||
g.POST("/bulk/setEnable", a.bulkSetEnable)
|
||||
g.POST("/bulk/del", a.bulkDel)
|
||||
}
|
||||
|
||||
func (a *HostController) list(c *gin.Context) {
|
||||
hosts, err := a.hostService.GetHosts()
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.list"), err)
|
||||
return
|
||||
}
|
||||
jsonObj(c, hosts, nil)
|
||||
}
|
||||
|
||||
func (a *HostController) get(c *gin.Context) {
|
||||
id, err := strconv.Atoi(c.Param("id"))
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "get"), err)
|
||||
return
|
||||
}
|
||||
h, err := a.hostService.GetHost(id)
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.obtain"), err)
|
||||
return
|
||||
}
|
||||
jsonObj(c, h, nil)
|
||||
}
|
||||
|
||||
func (a *HostController) byInbound(c *gin.Context) {
|
||||
inboundId, err := strconv.Atoi(c.Param("inboundId"))
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "get"), err)
|
||||
return
|
||||
}
|
||||
hosts, err := a.hostService.GetHostsByInbound(inboundId)
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.list"), err)
|
||||
return
|
||||
}
|
||||
jsonObj(c, hosts, nil)
|
||||
}
|
||||
|
||||
func (a *HostController) tags(c *gin.Context) {
|
||||
tags, err := a.hostService.GetAllTags()
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.list"), err)
|
||||
return
|
||||
}
|
||||
jsonObj(c, tags, nil)
|
||||
}
|
||||
|
||||
func (a *HostController) add(c *gin.Context) {
|
||||
h, ok := middleware.BindAndValidate[model.Host](c)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
created, err := a.hostService.AddHost(h)
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.add"), err)
|
||||
return
|
||||
}
|
||||
jsonMsgObj(c, I18nWeb(c, "pages.hosts.toasts.add"), created, nil)
|
||||
}
|
||||
|
||||
func (a *HostController) update(c *gin.Context) {
|
||||
id, err := strconv.Atoi(c.Param("id"))
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "get"), err)
|
||||
return
|
||||
}
|
||||
h, ok := middleware.BindAndValidate[model.Host](c)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
updated, err := a.hostService.UpdateHost(id, h)
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.update"), err)
|
||||
return
|
||||
}
|
||||
jsonMsgObj(c, I18nWeb(c, "pages.hosts.toasts.update"), updated, nil)
|
||||
}
|
||||
|
||||
func (a *HostController) del(c *gin.Context) {
|
||||
id, err := strconv.Atoi(c.Param("id"))
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "get"), err)
|
||||
return
|
||||
}
|
||||
if err := a.hostService.DeleteHost(id); err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.delete"), err)
|
||||
return
|
||||
}
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.delete"), nil)
|
||||
}
|
||||
|
||||
func (a *HostController) setEnable(c *gin.Context) {
|
||||
id, err := strconv.Atoi(c.Param("id"))
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "get"), err)
|
||||
return
|
||||
}
|
||||
body := struct {
|
||||
Enable bool `json:"enable" form:"enable"`
|
||||
}{}
|
||||
if err := c.ShouldBind(&body); err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.update"), err)
|
||||
return
|
||||
}
|
||||
if err := a.hostService.SetHostEnable(id, body.Enable); err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.update"), err)
|
||||
return
|
||||
}
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.update"), nil)
|
||||
}
|
||||
|
||||
func (a *HostController) reorder(c *gin.Context) {
|
||||
var req struct {
|
||||
Ids []int `json:"ids" form:"ids"`
|
||||
}
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.update"), err)
|
||||
return
|
||||
}
|
||||
if err := a.hostService.ReorderHosts(req.Ids); err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.update"), err)
|
||||
return
|
||||
}
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.update"), nil)
|
||||
}
|
||||
|
||||
func (a *HostController) bulkSetEnable(c *gin.Context) {
|
||||
var req struct {
|
||||
Ids []int `json:"ids" form:"ids"`
|
||||
Enable bool `json:"enable" form:"enable"`
|
||||
}
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.update"), err)
|
||||
return
|
||||
}
|
||||
if err := a.hostService.SetHostsEnable(req.Ids, req.Enable); err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.update"), err)
|
||||
return
|
||||
}
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.update"), nil)
|
||||
}
|
||||
|
||||
func (a *HostController) bulkDel(c *gin.Context) {
|
||||
var req struct {
|
||||
Ids []int `json:"ids" form:"ids"`
|
||||
}
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.delete"), err)
|
||||
return
|
||||
}
|
||||
if err := a.hostService.DeleteHosts(req.Ids); err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.delete"), err)
|
||||
return
|
||||
}
|
||||
jsonMsg(c, I18nWeb(c, "pages.hosts.toasts.delete"), nil)
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/gin-contrib/sessions"
|
||||
"github.com/gin-contrib/sessions/cookie"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/op/go-logging"
|
||||
|
||||
"github.com/mhsanaei/3x-ui/v3/internal/database"
|
||||
"github.com/mhsanaei/3x-ui/v3/internal/database/model"
|
||||
xuilogger "github.com/mhsanaei/3x-ui/v3/internal/logger"
|
||||
)
|
||||
|
||||
func newHostTestDB(t *testing.T) {
|
||||
t.Helper()
|
||||
// I18nWeb logs a warning when the localizer is absent (as in tests); the
|
||||
// logger must be initialised so that warning does not nil-panic.
|
||||
xuilogger.InitLogger(logging.ERROR)
|
||||
gin.SetMode(gin.TestMode)
|
||||
dbDir := t.TempDir()
|
||||
t.Setenv("XUI_DB_FOLDER", dbDir)
|
||||
if err := database.InitDB(filepath.Join(dbDir, "x-ui.db")); err != nil {
|
||||
t.Fatalf("InitDB: %v", err)
|
||||
}
|
||||
t.Cleanup(func() { _ = database.CloseDB() })
|
||||
}
|
||||
|
||||
type hostEnvelope struct {
|
||||
Success bool `json:"success"`
|
||||
Msg string `json:"msg"`
|
||||
Obj json.RawMessage `json:"obj"`
|
||||
}
|
||||
|
||||
func doHostReq(t *testing.T, engine *gin.Engine, method, path string, body any) hostEnvelope {
|
||||
t.Helper()
|
||||
var rdr *bytes.Reader
|
||||
if body != nil {
|
||||
b, _ := json.Marshal(body)
|
||||
rdr = bytes.NewReader(b)
|
||||
} else {
|
||||
rdr = bytes.NewReader(nil)
|
||||
}
|
||||
req := httptest.NewRequest(method, path, rdr)
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
w := httptest.NewRecorder()
|
||||
engine.ServeHTTP(w, req)
|
||||
if w.Code != http.StatusOK {
|
||||
t.Fatalf("%s %s: status %d, body=%s", method, path, w.Code, w.Body.String())
|
||||
}
|
||||
var env hostEnvelope
|
||||
if err := json.Unmarshal(w.Body.Bytes(), &env); err != nil {
|
||||
t.Fatalf("%s %s: decode envelope: %v body=%s", method, path, err, w.Body.String())
|
||||
}
|
||||
return env
|
||||
}
|
||||
|
||||
// TestHostController_AddListGetDelete exercises the CRUD round-trip and asserts
|
||||
// the {success,msg,obj} envelope convention through the registered routes.
|
||||
func TestHostController_AddListGetDelete(t *testing.T) {
|
||||
newHostTestDB(t)
|
||||
engine := gin.New()
|
||||
NewHostController(engine.Group("/panel/api/hosts"))
|
||||
|
||||
ib := &model.Inbound{Tag: "ctl", Enable: true, Port: 5443, Protocol: model.VLESS, Settings: `{"clients":[]}`}
|
||||
if err := database.GetDB().Create(ib).Error; err != nil {
|
||||
t.Fatalf("seed inbound: %v", err)
|
||||
}
|
||||
|
||||
// add
|
||||
add := doHostReq(t, engine, http.MethodPost, "/panel/api/hosts/add", map[string]any{
|
||||
"inboundId": ib.Id, "remark": "h1", "address": "h1.example.com", "port": 8443,
|
||||
})
|
||||
if !add.Success {
|
||||
t.Fatalf("add not successful: %s", add.Msg)
|
||||
}
|
||||
var created model.Host
|
||||
if err := json.Unmarshal(add.Obj, &created); err != nil {
|
||||
t.Fatalf("decode created host: %v", err)
|
||||
}
|
||||
if created.Id == 0 || created.Remark != "h1" {
|
||||
t.Fatalf("created host = %+v", created)
|
||||
}
|
||||
|
||||
// list
|
||||
list := doHostReq(t, engine, http.MethodGet, "/panel/api/hosts/list", nil)
|
||||
var hosts []model.Host
|
||||
if err := json.Unmarshal(list.Obj, &hosts); err != nil {
|
||||
t.Fatalf("decode list: %v", err)
|
||||
}
|
||||
if len(hosts) != 1 || hosts[0].Id != created.Id {
|
||||
t.Fatalf("list = %+v, want one host id=%d", hosts, created.Id)
|
||||
}
|
||||
|
||||
// get
|
||||
get := doHostReq(t, engine, http.MethodGet, "/panel/api/hosts/get/"+itoa(created.Id), nil)
|
||||
if !get.Success {
|
||||
t.Fatalf("get not successful: %s", get.Msg)
|
||||
}
|
||||
|
||||
// del
|
||||
del := doHostReq(t, engine, http.MethodPost, "/panel/api/hosts/del/"+itoa(created.Id), nil)
|
||||
if !del.Success {
|
||||
t.Fatalf("del not successful: %s", del.Msg)
|
||||
}
|
||||
list2 := doHostReq(t, engine, http.MethodGet, "/panel/api/hosts/list", nil)
|
||||
var hosts2 []model.Host
|
||||
_ = json.Unmarshal(list2.Obj, &hosts2)
|
||||
if len(hosts2) != 0 {
|
||||
t.Fatalf("after delete, list = %+v, want empty", hosts2)
|
||||
}
|
||||
}
|
||||
|
||||
// TestHostController_AuthInherited mirrors production wiring: the hosts group is
|
||||
// nested under the api group guarded by checkAPIAuth, so an unauthenticated XHR
|
||||
// to a hosts route is rejected (401) — the auth is inherited, not re-declared.
|
||||
func TestHostController_AuthInherited(t *testing.T) {
|
||||
newHostTestDB(t)
|
||||
engine := gin.New()
|
||||
store := cookie.NewStore([]byte("host-auth-test-secret"))
|
||||
engine.Use(sessions.Sessions("3x-ui", store))
|
||||
|
||||
a := &APIController{}
|
||||
api := engine.Group("/panel/api")
|
||||
api.Use(a.checkAPIAuth)
|
||||
NewHostController(api.Group("/hosts"))
|
||||
|
||||
req := httptest.NewRequest(http.MethodGet, "/panel/api/hosts/list", nil)
|
||||
req.Header.Set("X-Requested-With", "XMLHttpRequest")
|
||||
w := httptest.NewRecorder()
|
||||
engine.ServeHTTP(w, req)
|
||||
if w.Code != http.StatusUnauthorized {
|
||||
t.Fatalf("unauthenticated hosts/list = %d, want 401 (auth inherited)", w.Code)
|
||||
}
|
||||
}
|
||||
|
||||
func itoa(i int) string {
|
||||
return strconv.Itoa(i)
|
||||
}
|
||||
@@ -32,11 +32,11 @@ type AllSetting struct {
|
||||
PanelOutbound string `json:"panelOutbound" form:"panelOutbound"` // Xray outbound tag for the panel's own outbound HTTP (update checks/downloads, Telegram, geo updates, outbound-subscription fetches)
|
||||
|
||||
// UI settings
|
||||
PageSize int `json:"pageSize" form:"pageSize" validate:"gte=0,lte=1000"` // Number of items per page in lists (0 disables pagination)
|
||||
ExpireDiff int `json:"expireDiff" form:"expireDiff" validate:"gte=0"` // Expiration warning threshold in days
|
||||
TrafficDiff int `json:"trafficDiff" form:"trafficDiff" validate:"gte=0,lte=100"` // Traffic warning threshold percentage
|
||||
RemarkModel string `json:"remarkModel" form:"remarkModel"` // Remark model pattern for inbounds
|
||||
Datepicker string `json:"datepicker" form:"datepicker"` // Date picker format
|
||||
PageSize int `json:"pageSize" form:"pageSize" validate:"gte=0,lte=1000"` // Number of items per page in lists (0 disables pagination)
|
||||
ExpireDiff int `json:"expireDiff" form:"expireDiff" validate:"gte=0"` // Expiration warning threshold in days
|
||||
TrafficDiff int `json:"trafficDiff" form:"trafficDiff" validate:"gte=0,lte=100"` // Traffic warning threshold percentage
|
||||
RemarkTemplate string `json:"remarkTemplate" form:"remarkTemplate"` // Subscription remark template ({{VAR}} tokens) rendered per client
|
||||
Datepicker string `json:"datepicker" form:"datepicker"` // Date picker format
|
||||
|
||||
// Telegram bot settings
|
||||
TgBotEnable bool `json:"tgBotEnable" form:"tgBotEnable"` // Enable Telegram bot notifications
|
||||
@@ -86,8 +86,6 @@ type AllSetting struct {
|
||||
ExternalTrafficInformURI string `json:"externalTrafficInformURI" form:"externalTrafficInformURI"` // URI for external traffic reporting
|
||||
RestartXrayOnClientDisable bool `json:"restartXrayOnClientDisable" form:"restartXrayOnClientDisable"` // Restart Xray when clients are auto-disabled by expiry/traffic limit
|
||||
SubEncrypt bool `json:"subEncrypt" form:"subEncrypt"` // Encrypt subscription responses
|
||||
SubShowInfo bool `json:"subShowInfo" form:"subShowInfo"` // Show client information in subscriptions
|
||||
SubEmailInRemark bool `json:"subEmailInRemark" form:"subEmailInRemark"` // Include email in subscription remark/name
|
||||
SubURI string `json:"subURI" form:"subURI"` // Subscription server URI
|
||||
SubJsonPath string `json:"subJsonPath" form:"subJsonPath"` // Path for JSON subscription endpoint
|
||||
SubJsonURI string `json:"subJsonURI" form:"subJsonURI"` // JSON subscription server URI
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/mhsanaei/3x-ui/v3/internal/database"
|
||||
"github.com/mhsanaei/3x-ui/v3/internal/database/model"
|
||||
"github.com/mhsanaei/3x-ui/v3/internal/util/common"
|
||||
)
|
||||
|
||||
// HostService manages Host rows (override endpoints attached to an inbound).
|
||||
// Mirrors the empty-struct + database.GetDB() shape of ClientService.
|
||||
type HostService struct{}
|
||||
|
||||
// GetHosts returns every host, grouped by inbound then ordered by sort_order.
|
||||
func (s *HostService) GetHosts() ([]*model.Host, error) {
|
||||
var hosts []*model.Host
|
||||
err := database.GetDB().Order("inbound_id asc, sort_order asc, id asc").Find(&hosts).Error
|
||||
return hosts, err
|
||||
}
|
||||
|
||||
// GetHostsByInbound returns one inbound's hosts ordered by sort_order then id.
|
||||
func (s *HostService) GetHostsByInbound(inboundId int) ([]*model.Host, error) {
|
||||
var hosts []*model.Host
|
||||
err := database.GetDB().Where("inbound_id = ?", inboundId).Order("sort_order asc, id asc").Find(&hosts).Error
|
||||
return hosts, err
|
||||
}
|
||||
|
||||
func (s *HostService) GetHost(id int) (*model.Host, error) {
|
||||
host := &model.Host{}
|
||||
if err := database.GetDB().First(host, id).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return host, nil
|
||||
}
|
||||
|
||||
// AddHost creates a host after confirming its inbound exists (no hard FK).
|
||||
func (s *HostService) AddHost(host *model.Host) (*model.Host, error) {
|
||||
db := database.GetDB()
|
||||
var count int64
|
||||
if err := db.Model(&model.Inbound{}).Where("id = ?", host.InboundId).Count(&count).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if count == 0 {
|
||||
return nil, common.NewError("inbound not found")
|
||||
}
|
||||
host.Id = 0
|
||||
if err := db.Create(host).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return host, nil
|
||||
}
|
||||
|
||||
// UpdateHost overwrites a host's content. InboundId and SortOrder are immutable
|
||||
// here — the inbound is fixed at creation and ordering is owned by ReorderHosts.
|
||||
func (s *HostService) UpdateHost(id int, host *model.Host) (*model.Host, error) {
|
||||
db := database.GetDB()
|
||||
existing := &model.Host{}
|
||||
if err := db.First(existing, id).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
host.Id = id
|
||||
host.InboundId = existing.InboundId
|
||||
host.SortOrder = existing.SortOrder
|
||||
host.CreatedAt = existing.CreatedAt
|
||||
if err := db.Save(host).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s.GetHost(id)
|
||||
}
|
||||
|
||||
func (s *HostService) DeleteHost(id int) error {
|
||||
return database.GetDB().Delete(&model.Host{}, id).Error
|
||||
}
|
||||
|
||||
func (s *HostService) SetHostEnable(id int, enable bool) error {
|
||||
return database.GetDB().Model(&model.Host{}).Where("id = ?", id).Update("is_disabled", !enable).Error
|
||||
}
|
||||
|
||||
func (s *HostService) SetHostsEnable(ids []int, enable bool) error {
|
||||
if len(ids) == 0 {
|
||||
return nil
|
||||
}
|
||||
return database.GetDB().Model(&model.Host{}).Where("id IN ?", ids).Update("is_disabled", !enable).Error
|
||||
}
|
||||
|
||||
func (s *HostService) DeleteHosts(ids []int) error {
|
||||
if len(ids) == 0 {
|
||||
return nil
|
||||
}
|
||||
return database.GetDB().Where("id IN ?", ids).Delete(&model.Host{}).Error
|
||||
}
|
||||
|
||||
// ReorderHosts assigns sort_order by the position of each id in ids, in a single
|
||||
// transaction (driver-safe on SQLite and Postgres).
|
||||
func (s *HostService) ReorderHosts(ids []int) error {
|
||||
if len(ids) == 0 {
|
||||
return nil
|
||||
}
|
||||
tx := database.GetDB().Begin()
|
||||
for i, id := range ids {
|
||||
if err := tx.Model(&model.Host{}).Where("id = ?", id).Update("sort_order", i).Error; err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
}
|
||||
}
|
||||
return tx.Commit().Error
|
||||
}
|
||||
|
||||
// GetAllTags returns the distinct, sorted set of tags across all hosts.
|
||||
func (s *HostService) GetAllTags() ([]string, error) {
|
||||
hosts, err := s.GetHosts()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
set := make(map[string]struct{})
|
||||
for _, h := range hosts {
|
||||
for _, tag := range h.Tags {
|
||||
if tag != "" {
|
||||
set[tag] = struct{}{}
|
||||
}
|
||||
}
|
||||
}
|
||||
out := make([]string, 0, len(set))
|
||||
for tag := range set {
|
||||
out = append(out, tag)
|
||||
}
|
||||
sort.Strings(out)
|
||||
return out, nil
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/mhsanaei/3x-ui/v3/internal/database"
|
||||
"github.com/mhsanaei/3x-ui/v3/internal/database/model"
|
||||
)
|
||||
|
||||
func mkHost(t *testing.T, svc *HostService, inboundId int, remark string, order int) *model.Host {
|
||||
t.Helper()
|
||||
h, err := svc.AddHost(&model.Host{
|
||||
InboundId: inboundId,
|
||||
Remark: remark,
|
||||
SortOrder: order,
|
||||
Address: remark + ".example.com",
|
||||
Port: 8443,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("AddHost %s: %v", remark, err)
|
||||
}
|
||||
return h
|
||||
}
|
||||
|
||||
// TestAddHost_GetHostsByInbound: create persists; query returns by inbound,
|
||||
// ordered by sort_order then id.
|
||||
func TestAddHost_GetHostsByInbound(t *testing.T) {
|
||||
setupBulkDB(t)
|
||||
svc := &HostService{}
|
||||
ib := mkInbound(t, 443, model.VLESS, `{"clients":[]}`)
|
||||
h1 := mkHost(t, svc, ib.Id, "b", 2)
|
||||
h2 := mkHost(t, svc, ib.Id, "a", 1)
|
||||
|
||||
got, err := svc.GetHostsByInbound(ib.Id)
|
||||
if err != nil {
|
||||
t.Fatalf("GetHostsByInbound: %v", err)
|
||||
}
|
||||
if len(got) != 2 {
|
||||
t.Fatalf("len = %d, want 2", len(got))
|
||||
}
|
||||
if got[0].Id != h2.Id || got[1].Id != h1.Id {
|
||||
t.Fatalf("order = [%d,%d], want [%d,%d] (sort_order asc)", got[0].Id, got[1].Id, h2.Id, h1.Id)
|
||||
}
|
||||
if got[0].Address != "a.example.com" {
|
||||
t.Fatalf("address not persisted: %q", got[0].Address)
|
||||
}
|
||||
}
|
||||
|
||||
// TestAddHost_RejectsUnknownInbound: a host whose inbound does not exist is refused.
|
||||
func TestAddHost_RejectsUnknownInbound(t *testing.T) {
|
||||
setupBulkDB(t)
|
||||
svc := &HostService{}
|
||||
if _, err := svc.AddHost(&model.Host{InboundId: 99999, Remark: "x"}); err == nil {
|
||||
t.Fatalf("expected error adding host to unknown inbound")
|
||||
}
|
||||
}
|
||||
|
||||
// TestReorderHosts: reorder updates sort_order and re-query reflects new order.
|
||||
func TestReorderHosts(t *testing.T) {
|
||||
setupBulkDB(t)
|
||||
svc := &HostService{}
|
||||
ib := mkInbound(t, 443, model.VLESS, `{"clients":[]}`)
|
||||
h1 := mkHost(t, svc, ib.Id, "h1", 0)
|
||||
h2 := mkHost(t, svc, ib.Id, "h2", 0)
|
||||
h3 := mkHost(t, svc, ib.Id, "h3", 0)
|
||||
|
||||
want := []int{h3.Id, h1.Id, h2.Id}
|
||||
if err := svc.ReorderHosts(want); err != nil {
|
||||
t.Fatalf("ReorderHosts: %v", err)
|
||||
}
|
||||
got, _ := svc.GetHostsByInbound(ib.Id)
|
||||
for i, h := range got {
|
||||
if h.Id != want[i] {
|
||||
t.Fatalf("position %d = %d, want %d", i, h.Id, want[i])
|
||||
}
|
||||
if h.SortOrder != i {
|
||||
t.Fatalf("host %d sort_order = %d, want %d", h.Id, h.SortOrder, i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestSetHostEnableAndBulk: per-row and bulk enable/disable toggles persist.
|
||||
func TestSetHostEnableAndBulk(t *testing.T) {
|
||||
setupBulkDB(t)
|
||||
svc := &HostService{}
|
||||
ib := mkInbound(t, 443, model.VLESS, `{"clients":[]}`)
|
||||
h1 := mkHost(t, svc, ib.Id, "h1", 0)
|
||||
h2 := mkHost(t, svc, ib.Id, "h2", 1)
|
||||
|
||||
if err := svc.SetHostEnable(h1.Id, false); err != nil {
|
||||
t.Fatalf("SetHostEnable: %v", err)
|
||||
}
|
||||
if g, _ := svc.GetHost(h1.Id); g == nil || !g.IsDisabled {
|
||||
t.Fatalf("h1 should be disabled after SetHostEnable(false)")
|
||||
}
|
||||
|
||||
if err := svc.SetHostsEnable([]int{h1.Id, h2.Id}, true); err != nil {
|
||||
t.Fatalf("SetHostsEnable(true): %v", err)
|
||||
}
|
||||
for _, id := range []int{h1.Id, h2.Id} {
|
||||
if g, _ := svc.GetHost(id); g == nil || g.IsDisabled {
|
||||
t.Fatalf("host %d should be enabled", id)
|
||||
}
|
||||
}
|
||||
if err := svc.SetHostsEnable([]int{h1.Id, h2.Id}, false); err != nil {
|
||||
t.Fatalf("SetHostsEnable(false): %v", err)
|
||||
}
|
||||
for _, id := range []int{h1.Id, h2.Id} {
|
||||
if g, _ := svc.GetHost(id); g == nil || !g.IsDisabled {
|
||||
t.Fatalf("host %d should be disabled", id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestDeleteHosts: bulk delete removes exactly the named rows.
|
||||
func TestDeleteHosts(t *testing.T) {
|
||||
setupBulkDB(t)
|
||||
svc := &HostService{}
|
||||
ib := mkInbound(t, 443, model.VLESS, `{"clients":[]}`)
|
||||
h1 := mkHost(t, svc, ib.Id, "h1", 0)
|
||||
h2 := mkHost(t, svc, ib.Id, "h2", 1)
|
||||
h3 := mkHost(t, svc, ib.Id, "h3", 2)
|
||||
|
||||
if err := svc.DeleteHosts([]int{h1.Id, h3.Id}); err != nil {
|
||||
t.Fatalf("DeleteHosts: %v", err)
|
||||
}
|
||||
got, _ := svc.GetHostsByInbound(ib.Id)
|
||||
if len(got) != 1 || got[0].Id != h2.Id {
|
||||
t.Fatalf("remaining = %v, want only h2 (%d)", got, h2.Id)
|
||||
}
|
||||
}
|
||||
|
||||
// TestDeleteInboundCascadesHosts: deleting an inbound deletes its hosts.
|
||||
func TestDeleteInboundCascadesHosts(t *testing.T) {
|
||||
setupBulkDB(t)
|
||||
svc := &HostService{}
|
||||
inboundSvc := &InboundService{}
|
||||
// Disabled local inbound so DelInbound skips the runtime push.
|
||||
ib := &model.Inbound{Tag: "casc", Enable: false, Port: 4443, Protocol: model.VLESS, Settings: `{"clients":[]}`}
|
||||
if err := database.GetDB().Create(ib).Error; err != nil {
|
||||
t.Fatalf("create inbound: %v", err)
|
||||
}
|
||||
mkHost(t, svc, ib.Id, "h1", 0)
|
||||
mkHost(t, svc, ib.Id, "h2", 1)
|
||||
|
||||
if _, err := inboundSvc.DelInbound(ib.Id); err != nil {
|
||||
t.Fatalf("DelInbound: %v", err)
|
||||
}
|
||||
got, _ := svc.GetHostsByInbound(ib.Id)
|
||||
if len(got) != 0 {
|
||||
t.Fatalf("hosts not cascaded on inbound delete, len = %d", len(got))
|
||||
}
|
||||
}
|
||||
|
||||
// TestGetAllTags: distinct, sorted tags across all hosts.
|
||||
func TestGetAllTags(t *testing.T) {
|
||||
setupBulkDB(t)
|
||||
svc := &HostService{}
|
||||
ib := mkInbound(t, 443, model.VLESS, `{"clients":[]}`)
|
||||
if _, err := svc.AddHost(&model.Host{InboundId: ib.Id, Remark: "h1", Tags: []string{"EU", "CDN"}}); err != nil {
|
||||
t.Fatalf("AddHost: %v", err)
|
||||
}
|
||||
if _, err := svc.AddHost(&model.Host{InboundId: ib.Id, Remark: "h2", Tags: []string{"CDN", "FAST"}}); err != nil {
|
||||
t.Fatalf("AddHost: %v", err)
|
||||
}
|
||||
tags, err := svc.GetAllTags()
|
||||
if err != nil {
|
||||
t.Fatalf("GetAllTags: %v", err)
|
||||
}
|
||||
want := []string{"CDN", "EU", "FAST"}
|
||||
if len(tags) != len(want) {
|
||||
t.Fatalf("tags = %v, want %v", tags, want)
|
||||
}
|
||||
for i := range want {
|
||||
if tags[i] != want[i] {
|
||||
t.Fatalf("tags = %v, want %v", tags, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -782,6 +782,10 @@ func (s *InboundService) DelInbound(id int) (bool, error) {
|
||||
if err := db.Delete(model.Inbound{}, id).Error; err != nil {
|
||||
return needRestart, err
|
||||
}
|
||||
// Hosts have no hard FK; drop the inbound's hosts alongside it.
|
||||
if err := db.Where("inbound_id = ?", id).Delete(&model.Host{}).Error; err != nil {
|
||||
return needRestart, err
|
||||
}
|
||||
if markDirty && ib.NodeID != nil {
|
||||
if dErr := (&NodeService{}).MarkNodeDirty(*ib.NodeID); dErr != nil {
|
||||
logger.Warning("mark node dirty failed:", dErr)
|
||||
|
||||
@@ -53,7 +53,7 @@ var defaultValueMap = map[string]string{
|
||||
"pageSize": "25",
|
||||
"expireDiff": "0",
|
||||
"trafficDiff": "0",
|
||||
"remarkModel": "-ieo",
|
||||
"remarkTemplate": "{{INBOUND}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D",
|
||||
"timeLocation": "Local",
|
||||
"tgBotEnable": "false",
|
||||
"tgBotToken": "",
|
||||
@@ -82,8 +82,6 @@ var defaultValueMap = map[string]string{
|
||||
"subKeyFile": "",
|
||||
"subUpdates": "12",
|
||||
"subEncrypt": "true",
|
||||
"subShowInfo": "true",
|
||||
"subEmailInRemark": "true",
|
||||
"subURI": "",
|
||||
"subJsonPath": "/json/",
|
||||
"subJsonURI": "",
|
||||
@@ -592,8 +590,8 @@ func (s *SettingService) GetTrustedProxyCIDRs() (string, error) {
|
||||
return s.getString("trustedProxyCIDRs")
|
||||
}
|
||||
|
||||
func (s *SettingService) GetRemarkModel() (string, error) {
|
||||
return s.getString("remarkModel")
|
||||
func (s *SettingService) GetRemarkTemplate() (string, error) {
|
||||
return s.getString("remarkTemplate")
|
||||
}
|
||||
|
||||
func (s *SettingService) GetSecret() ([]byte, error) {
|
||||
@@ -738,14 +736,6 @@ func (s *SettingService) GetSubEncrypt() (bool, error) {
|
||||
return s.getBool("subEncrypt")
|
||||
}
|
||||
|
||||
func (s *SettingService) GetSubShowInfo() (bool, error) {
|
||||
return s.getBool("subShowInfo")
|
||||
}
|
||||
|
||||
func (s *SettingService) GetSubEmailInRemark() (bool, error) {
|
||||
return s.getBool("subEmailInRemark")
|
||||
}
|
||||
|
||||
func (s *SettingService) GetPageSize() (int, error) {
|
||||
return s.getInt("pageSize")
|
||||
}
|
||||
@@ -1178,7 +1168,6 @@ func (s *SettingService) GetDefaultSettings(host string) (any, error) {
|
||||
"subURI": func() (any, error) { return s.GetSubURI() },
|
||||
"subJsonURI": func() (any, error) { return s.GetSubJsonURI() },
|
||||
"subClashURI": func() (any, error) { return s.GetSubClashURI() },
|
||||
"remarkModel": func() (any, error) { return s.GetRemarkModel() },
|
||||
"datepicker": func() (any, error) { return s.GetDatepicker() },
|
||||
"ipLimitEnable": func() (any, error) { return s.GetIpLimitEnable() },
|
||||
"accessLogEnable": func() (any, error) { return s.GetAccessLogEnable() },
|
||||
|
||||
@@ -1023,11 +1023,9 @@
|
||||
"panelOutbound": "صادر ترافيك اللوحة",
|
||||
"panelOutboundDesc": "بيوجه طلبات اللوحة نفسها — فحص إصدارات وتنزيلات اللوحة/Xray، تيليجرام، وتحديث ملفات geo العادي — عبر صادر Xray ده لتجاوز فلترة GitHub/تيليجرام على الخادم. وارد جسر محلي بيتضاف تلقائياً للإعداد الشغال وبيتطبق مباشرة. تحديث Geodata التلقائي الأصلي في Xray مش متأثر؛ ليه صادر تنزيل خاص بيه. اتركه فارغاً للاتصال المباشر.",
|
||||
"panelOutboundPh": "اتصال مباشر",
|
||||
"remarkModel": "نموذج الملاحظة وحرف الفصل",
|
||||
"datepicker": "نوع التقويم",
|
||||
"datepickerPlaceholder": "اختار التاريخ",
|
||||
"datepickerDescription": "المهام المجدولة هتشتغل بناءً على التقويم ده.",
|
||||
"sampleRemark": "مثال للملاحظة",
|
||||
"oldUsername": "اسم المستخدم الحالي",
|
||||
"currentPassword": "الباسورد الحالي",
|
||||
"newUsername": "اسم المستخدم الجديد",
|
||||
@@ -1110,10 +1108,6 @@
|
||||
"subUpdatesDesc": "فترات تحديث رابط الاشتراك في تطبيقات العملاء. (الوحدة: ساعة)",
|
||||
"subEncrypt": "تشفير",
|
||||
"subEncryptDesc": "المحتوى اللي هيترجع من خدمة الاشتراك هيكون مشفر بـ Base64.",
|
||||
"subShowInfo": "اظهر معلومات الاستخدام",
|
||||
"subShowInfoDesc": "هيظهر الترافيك المتبقي والتاريخ في تطبيقات العملاء.",
|
||||
"subEmailInRemark": "تضمين البريد الإلكتروني في الاسم",
|
||||
"subEmailInRemarkDesc": "تضمين بريد العميل الإلكتروني في اسم ملف تعريف الاشتراك.",
|
||||
"subURI": "مسار البروكسي العكسي",
|
||||
"subURIDesc": "مسار URI لرابط الاشتراك عشان تستخدمه ورا البروكسي.",
|
||||
"externalTrafficInformEnable": "تنبيه الترافيك الخارجي",
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
"subscription": {
|
||||
"title": "Subscription info",
|
||||
"subId": "Subscription ID",
|
||||
"email": "Email",
|
||||
"status": "Status",
|
||||
"downloaded": "Downloaded",
|
||||
"uploaded": "Uploaded",
|
||||
@@ -108,6 +109,7 @@
|
||||
"clients": "Clients",
|
||||
"groups": "Groups",
|
||||
"nodes": "Nodes",
|
||||
"hosts": "Hosts",
|
||||
"settings": "Panel Settings",
|
||||
"xray": "Xray Configs",
|
||||
"apiDocs": "API Docs",
|
||||
@@ -873,6 +875,114 @@
|
||||
"removeFromGroupDesc": "Select members to remove from this group. Clients themselves are kept (use \"Delete clients in group\" to remove them entirely).",
|
||||
"removeFromGroupResult": "Removed {count} client(s) from {name}."
|
||||
},
|
||||
"hosts": {
|
||||
"addHost": "Add Host",
|
||||
"editHost": "Edit Host",
|
||||
"selectInbound": "Select an inbound",
|
||||
"selectedCount": "{count} selected",
|
||||
"summary": {
|
||||
"total": "Total",
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled"
|
||||
},
|
||||
"moveUp": "Move up",
|
||||
"moveDown": "Move down",
|
||||
"bulkEnable": "Enable",
|
||||
"bulkDisable": "Disable",
|
||||
"bulkDelete": "Delete",
|
||||
"bulkDeleteConfirm": "Delete {count} selected host(s)?",
|
||||
"deleteConfirmTitle": "Delete host \"{name}\"?",
|
||||
"sections": {
|
||||
"basic": "Basic",
|
||||
"security": "Security",
|
||||
"advanced": "Advanced",
|
||||
"general": "General",
|
||||
"clash": "Clash (mihomo)"
|
||||
},
|
||||
"fields": {
|
||||
"remark": "Remark",
|
||||
"serverDescription": "Description",
|
||||
"inbound": "Inbound",
|
||||
"address": "Address",
|
||||
"port": "Port",
|
||||
"endpoint": "Endpoint",
|
||||
"enable": "Enable",
|
||||
"actions": "Actions",
|
||||
"security": "Security",
|
||||
"sni": "SNI",
|
||||
"overrideSniFromAddress": "Use address as SNI",
|
||||
"keepSniBlank": "Keep SNI blank",
|
||||
"hostHeader": "Host header",
|
||||
"path": "Path",
|
||||
"alpn": "ALPN",
|
||||
"fingerprint": "Fingerprint",
|
||||
"pins": "Pinned cert SHA-256",
|
||||
"verifyPeerCertByName": "Verify peer cert by name",
|
||||
"allowInsecure": "Allow insecure",
|
||||
"echConfigList": "ECH config list",
|
||||
"muxParams": "Mux",
|
||||
"sockoptParams": "Sockopt",
|
||||
"finalMask": "Final Mask",
|
||||
"vlessRoute": "VLESS route",
|
||||
"mihomoIpVersion": "IP version",
|
||||
"mihomoX25519": "Mihomo X25519",
|
||||
"shuffleHost": "Shuffle host",
|
||||
"tags": "Tags",
|
||||
"nodeGuids": "Nodes",
|
||||
"excludeFromSubTypes": "Exclude from formats"
|
||||
},
|
||||
"hints": {
|
||||
"address": "Leave blank to inherit the inbound's own address.",
|
||||
"port": "0 inherits the inbound's port.",
|
||||
"tags": "Not visible to end users; sent with RAW subscription only. Uppercase letters, digits, _ and : only.",
|
||||
"nodeGuids": "Pick nodes which resolved from this host. Only visual assignment.",
|
||||
"serverDescription": "Optional note shown under the remark.",
|
||||
"allowInsecure": "Skip TLS certificate verification (allowInsecure / skip-cert-verify).",
|
||||
"vlessRoute": "Ports/ranges routed via VLESS, e.g. 53,443,1000-2000. Leave blank for none.",
|
||||
"remark": "A plain label for this host. Shown as the config name only when the inbound has no remark of its own."
|
||||
},
|
||||
"remarkVars": {
|
||||
"title": "Template Variables",
|
||||
"intro": "Click a variable to add it. It is replaced per client when the subscription is generated.",
|
||||
"preview": "Preview",
|
||||
"groups": {
|
||||
"client": "Client",
|
||||
"traffic": "Traffic",
|
||||
"time": "Time & status"
|
||||
},
|
||||
"descEMAIL": "Client email",
|
||||
"descINBOUND": "Config name: the host's remark when set, otherwise the inbound's remark",
|
||||
"descHOST": "Host remark",
|
||||
"descID": "Client UUID",
|
||||
"descSHORT_ID": "First 8 characters of the UUID",
|
||||
"descTELEGRAM_ID": "Client's Telegram ID (empty if unset)",
|
||||
"descSUB_ID": "Subscription ID",
|
||||
"descCOMMENT": "Client comment",
|
||||
"descTRAFFIC_USED": "Used traffic (human readable)",
|
||||
"descTRAFFIC_LEFT": "Remaining traffic (hidden if unlimited)",
|
||||
"descTRAFFIC_TOTAL": "Total traffic (hidden if unlimited)",
|
||||
"descTRAFFIC_USED_BYTES": "Used traffic in bytes",
|
||||
"descTRAFFIC_LEFT_BYTES": "Remaining traffic in bytes",
|
||||
"descTRAFFIC_TOTAL_BYTES": "Total traffic in bytes",
|
||||
"descUP": "Upload traffic",
|
||||
"descDOWN": "Download traffic",
|
||||
"descSTATUS": "active / expired / disabled / depleted",
|
||||
"descDAYS_LEFT": "Days until expiry (hidden if unlimited)",
|
||||
"descEXPIRE_DATE": "Expiry date (YYYY-MM-DD)",
|
||||
"descEXPIRE_UNIX": "Expiry as a Unix timestamp (seconds)",
|
||||
"descCREATED_UNIX": "Creation time as a Unix timestamp (seconds)",
|
||||
"descRESET_DAYS": "Traffic reset period in days"
|
||||
},
|
||||
"toasts": {
|
||||
"list": "Failed to load hosts",
|
||||
"obtain": "Failed to load host",
|
||||
"add": "Add host",
|
||||
"update": "Update host",
|
||||
"delete": "Delete host",
|
||||
"badTag": "Invalid tag",
|
||||
"badVlessRoute": "Use ports/ranges like 53,443,1000-2000"
|
||||
}
|
||||
},
|
||||
"nodes": {
|
||||
"title": "Nodes",
|
||||
"addNode": "Add Node",
|
||||
@@ -1023,11 +1133,11 @@
|
||||
"panelOutbound": "Panel Traffic Outbound",
|
||||
"panelOutboundDesc": "Routes the panel's own requests — panel/Xray version checks and downloads, Telegram, and the normal geo-file update — through this Xray outbound to bypass server-side filtering of GitHub/Telegram. A loopback bridge inbound is added to the running config automatically and applied live. The Xray-native Geodata Auto-Update is not affected; it has its own download outbound. Leave empty for a direct connection.",
|
||||
"panelOutboundPh": "Direct connection",
|
||||
"remarkModel": "Remark Model & Separation Character",
|
||||
"remarkTemplate": "Remark Template",
|
||||
"remarkTemplateDesc": "When set, this replaces the remark model for every subscription link — write your own format with the variable tokens (use the button to insert them). Leave empty to use the model above.",
|
||||
"datepicker": "Calendar Type",
|
||||
"datepickerPlaceholder": "Select date",
|
||||
"datepickerDescription": "Scheduled tasks will run based on this calendar.",
|
||||
"sampleRemark": "Sample Remark",
|
||||
"oldUsername": "Current Username",
|
||||
"currentPassword": "Current Password",
|
||||
"newUsername": "New Username",
|
||||
@@ -1110,10 +1220,6 @@
|
||||
"subUpdatesDesc": "The update intervals of the subscription URL in the client apps. (unit: hour)",
|
||||
"subEncrypt": "Encode",
|
||||
"subEncryptDesc": "The returned content of subscription service will be Base64 encoded.",
|
||||
"subShowInfo": "Show Usage Info",
|
||||
"subShowInfoDesc": "The remaining traffic and date will be displayed in the client apps.",
|
||||
"subEmailInRemark": "Include Email in Name",
|
||||
"subEmailInRemarkDesc": "Include the client email in the subscription profile name.",
|
||||
"subURI": "Reverse Proxy URI",
|
||||
"subURIDesc": "The URI path of the subscription URL for use behind proxies.",
|
||||
"externalTrafficInformEnable": "External Traffic Inform",
|
||||
|
||||
@@ -1023,11 +1023,9 @@
|
||||
"panelOutbound": "Salida del tráfico del panel",
|
||||
"panelOutboundDesc": "Enruta las peticiones del propio panel — comprobaciones de versión y descargas de panel/Xray, Telegram y la actualización normal de archivos geo — a través de esta salida de Xray para sortear el filtrado de GitHub/Telegram en el servidor. Una entrada puente local se añade automáticamente a la configuración en ejecución y se aplica en vivo. La Autoactualización de Geodata nativa de Xray no se ve afectada; tiene su propia salida de descarga. Deja vacío para conexión directa.",
|
||||
"panelOutboundPh": "Conexión directa",
|
||||
"remarkModel": "Modelo de observación y carácter de separación",
|
||||
"datepicker": "selector de fechas",
|
||||
"datepickerPlaceholder": "Seleccionar fecha",
|
||||
"datepickerDescription": "El tipo de calendario selector especifica la fecha de vencimiento",
|
||||
"sampleRemark": "Observación de muestra",
|
||||
"oldUsername": "Nombre de Usuario Actual",
|
||||
"currentPassword": "Contraseña Actual",
|
||||
"newUsername": "Nuevo Nombre de Usuario",
|
||||
@@ -1110,10 +1108,6 @@
|
||||
"subUpdatesDesc": "Horas de intervalo entre actualizaciones en la aplicación del cliente.",
|
||||
"subEncrypt": "Codificar",
|
||||
"subEncryptDesc": "Encriptar las configuraciones devueltas en la suscripción.",
|
||||
"subShowInfo": "Mostrar información de uso",
|
||||
"subShowInfoDesc": "Mostrar tráfico restante y fecha después del nombre de configuración.",
|
||||
"subEmailInRemark": "Incluir Email en el nombre",
|
||||
"subEmailInRemarkDesc": "Incluir el correo del cliente en el nombre del perfil de suscripción.",
|
||||
"subURI": "URI de proxy inverso",
|
||||
"subURIDesc": "Cambiar el URI base de la URL de suscripción para usar detrás de los servidores proxy",
|
||||
"externalTrafficInformEnable": "Informe de tráfico externo",
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
"subscription": {
|
||||
"title": "اطلاعات سابسکریپشن",
|
||||
"subId": "شناسه اشتراک",
|
||||
"email": "ایمیل",
|
||||
"status": "وضعیت",
|
||||
"downloaded": "دانلود",
|
||||
"uploaded": "آپلود",
|
||||
@@ -1023,11 +1024,11 @@
|
||||
"panelOutbound": "اوتباند ترافیک پنل",
|
||||
"panelOutboundDesc": "درخواستهای خود پنل — بررسی نسخه و دانلود پنل/Xray، تلگرام، و بهروزرسانی معمولی فایلهای geo — را از این اوتباند Xray عبور میدهد تا فیلترینگ GitHub/تلگرام در سمت سرور دور زده شود. یک ورودی پل لوکال بهصورت خودکار به کانفیگ در حال اجرا اضافه و زنده اعمال میشود. روی Geodata Auto-Update نِیتیو Xray اثری ندارد؛ آن اوتباند دانلود مخصوص خودش را دارد. برای اتصال مستقیم خالی بگذارید.",
|
||||
"panelOutboundPh": "اتصال مستقیم",
|
||||
"remarkModel": "نامکانفیگ و جداکننده",
|
||||
"remarkTemplate": "قالب ریمارک",
|
||||
"remarkTemplateDesc": "اگر پر شود، جای مدلِ ریمارک را برای همهی لینکهای اشتراک میگیرد — فرمت دلخواهت را با توکنهای متغیر بنویس (از دکمه برای درج استفاده کن). خالی = استفاده از مدلِ بالا.",
|
||||
"datepicker": "نوع تقویم",
|
||||
"datepickerPlaceholder": "انتخاب تاریخ",
|
||||
"datepickerDescription": "وظایف برنامه ریزی شده بر اساس این تقویم اجرا میشود",
|
||||
"sampleRemark": "نمونهنام",
|
||||
"oldUsername": "نامکاربری فعلی",
|
||||
"currentPassword": "رمزعبور فعلی",
|
||||
"newUsername": "نامکاربری جدید",
|
||||
@@ -1110,10 +1111,6 @@
|
||||
"subUpdatesDesc": "(فاصله مابین بروزرسانی در برنامههای کاربری. (واحد: ساعت",
|
||||
"subEncrypt": "انکود",
|
||||
"subEncryptDesc": "کدگذاری خواهدشد Base64 محتوای برگشتی سرویس سابسکریپشن برپایه",
|
||||
"subShowInfo": "نمایش اطلاعات مصرف",
|
||||
"subShowInfoDesc": "ترافیک و زمان باقیمانده را در برنامههای کاربری نمایش میدهد",
|
||||
"subEmailInRemark": "گنجاندن ایمیل در نام",
|
||||
"subEmailInRemarkDesc": "ایمیل کاربر در نام پروفایل اشتراک گنجانده میشود.",
|
||||
"subURI": "پروکسی معکوس URI مسیر",
|
||||
"subURIDesc": "سابسکریپشن را برای استفاده در پشت پراکسیها تغییر میدهد URI مسیر",
|
||||
"externalTrafficInformEnable": "اطلاع رسانی خارجی مصرف ترافیک",
|
||||
|
||||
@@ -1023,11 +1023,9 @@
|
||||
"panelOutbound": "Outbound lalu lintas panel",
|
||||
"panelOutboundDesc": "Mengarahkan permintaan panel sendiri — pemeriksaan versi dan unduhan panel/Xray, Telegram, dan pembaruan file geo biasa — melalui outbound Xray ini untuk melewati pemfilteran GitHub/Telegram di sisi server. Inbound jembatan lokal ditambahkan secara otomatis ke konfigurasi yang berjalan dan diterapkan langsung. Pembaruan Otomatis Geodata bawaan Xray tidak terpengaruh; ia memiliki outbound unduhan sendiri. Kosongkan untuk koneksi langsung.",
|
||||
"panelOutboundPh": "Koneksi langsung",
|
||||
"remarkModel": "Model Catatan & Karakter Pemisah",
|
||||
"datepicker": "Jenis Kalender",
|
||||
"datepickerPlaceholder": "Pilih tanggal",
|
||||
"datepickerDescription": "Tugas terjadwal akan berjalan berdasarkan kalender ini.",
|
||||
"sampleRemark": "Contoh Catatan",
|
||||
"oldUsername": "Username Saat Ini",
|
||||
"currentPassword": "Kata Sandi Saat Ini",
|
||||
"newUsername": "Username Baru",
|
||||
@@ -1110,10 +1108,6 @@
|
||||
"subUpdatesDesc": "Interval pembaruan URL langganan dalam aplikasi klien. (unit: jam)",
|
||||
"subEncrypt": "Encode",
|
||||
"subEncryptDesc": "Konten yang dikembalikan dari layanan langganan akan dienkripsi Base64.",
|
||||
"subShowInfo": "Tampilkan Info Penggunaan",
|
||||
"subShowInfoDesc": "Sisa traffic dan tanggal akan ditampilkan di aplikasi klien.",
|
||||
"subEmailInRemark": "Sertakan Email dalam Nama",
|
||||
"subEmailInRemarkDesc": "Sertakan email klien dalam nama profil langganan.",
|
||||
"subURI": "URI Proxy Terbalik",
|
||||
"subURIDesc": "Path URI dari URL langganan untuk digunakan di belakang proxy.",
|
||||
"externalTrafficInformEnable": "Informasikan API eksternal pada setiap pembaruan lalu lintas.",
|
||||
|
||||
@@ -1023,11 +1023,9 @@
|
||||
"panelOutbound": "パネルトラフィックのアウトバウンド",
|
||||
"panelOutboundDesc": "パネル自体のリクエスト (パネル/Xray のバージョンチェックとダウンロード、Telegram、通常の geo ファイル更新) をこの Xray アウトバウンド経由でルーティングし、サーバー側の GitHub/Telegram フィルタリングを回避します。ローカルのブリッジインバウンドが実行中の設定に自動的に追加され、ライブで適用されます。Xray ネイティブの Geodata 自動更新は影響を受けません。専用のダウンロードアウトバウンドを持ちます。直接接続するには空のままにします。",
|
||||
"panelOutboundPh": "直接接続",
|
||||
"remarkModel": "備考モデルと区切り記号",
|
||||
"datepicker": "日付ピッカー",
|
||||
"datepickerPlaceholder": "日付を選択",
|
||||
"datepickerDescription": "日付選択カレンダーで有効期限を指定する",
|
||||
"sampleRemark": "備考の例",
|
||||
"oldUsername": "旧ユーザー名",
|
||||
"currentPassword": "旧パスワード",
|
||||
"newUsername": "新しいユーザー名",
|
||||
@@ -1110,10 +1108,6 @@
|
||||
"subUpdatesDesc": "クライアントアプリケーションでサブスクリプションURLの更新間隔(単位:時間)",
|
||||
"subEncrypt": "エンコード",
|
||||
"subEncryptDesc": "サブスクリプションサービスが返す内容をBase64エンコードする",
|
||||
"subShowInfo": "利用情報を表示",
|
||||
"subShowInfoDesc": "クライアントアプリで残りのトラフィックと日付情報を表示する",
|
||||
"subEmailInRemark": "名前にメールを含める",
|
||||
"subEmailInRemarkDesc": "サブスクリプションプロファイル名にクライアントのメールアドレスを含めます。",
|
||||
"subURI": "リバースプロキシURI",
|
||||
"subURIDesc": "プロキシ後ろのサブスクリプションURLのURIパスに使用する",
|
||||
"externalTrafficInformEnable": "外部トラフィック情報",
|
||||
|
||||
@@ -1023,11 +1023,9 @@
|
||||
"panelOutbound": "Saída do tráfego do painel",
|
||||
"panelOutboundDesc": "Encaminha as requisições do próprio painel — verificações de versão e downloads do painel/Xray, Telegram e a atualização normal de arquivos geo — por esta saída do Xray para contornar a filtragem de GitHub/Telegram no servidor. Uma entrada ponte local é adicionada automaticamente à configuração em execução e aplicada ao vivo. A Atualização Automática de Geodata nativa do Xray não é afetada; ela tem sua própria saída de download. Deixe vazio para conexão direta.",
|
||||
"panelOutboundPh": "Conexão direta",
|
||||
"remarkModel": "Modelo de Observação & Caractere de Separação",
|
||||
"datepicker": "Tipo de Calendário",
|
||||
"datepickerPlaceholder": "Selecionar data",
|
||||
"datepickerDescription": "Tarefas agendadas serão executadas com base neste calendário.",
|
||||
"sampleRemark": "Exemplo de Observação",
|
||||
"oldUsername": "Nome de Usuário Atual",
|
||||
"currentPassword": "Senha Atual",
|
||||
"newUsername": "Novo Nome de Usuário",
|
||||
@@ -1110,10 +1108,6 @@
|
||||
"subUpdatesDesc": "Os intervalos de atualização da URL de assinatura nos aplicativos de cliente. (unidade: hora)",
|
||||
"subEncrypt": "Codificar",
|
||||
"subEncryptDesc": "O conteúdo retornado pelo serviço de assinatura será codificado em Base64.",
|
||||
"subShowInfo": "Mostrar Informações de Uso",
|
||||
"subShowInfoDesc": "O tráfego restante e a data serão exibidos nos aplicativos de cliente.",
|
||||
"subEmailInRemark": "Incluir Email no nome",
|
||||
"subEmailInRemarkDesc": "Incluir o email do cliente no nome do perfil de assinatura.",
|
||||
"subURI": "URI de Proxy Reverso",
|
||||
"subURIDesc": "O caminho URI da URL de assinatura para uso por trás de proxies.",
|
||||
"externalTrafficInformEnable": "Informações de tráfego externo",
|
||||
|
||||
@@ -1023,11 +1023,9 @@
|
||||
"panelOutbound": "Исходящий для трафика панели",
|
||||
"panelOutboundDesc": "Маршрутизирует собственные запросы панели — проверки версий и загрузки панели/Xray, Telegram и обычное обновление geo-файлов — через этот исходящий Xray для обхода серверной фильтрации GitHub/Telegram. Локальный мост-входящий добавляется в работающую конфигурацию автоматически и применяется на лету. Встроенное в Xray автообновление Geodata не затрагивается; у него свой исходящий для загрузки. Оставьте пустым для прямого подключения.",
|
||||
"panelOutboundPh": "Прямое подключение",
|
||||
"remarkModel": "Модель примечания и символ разделения",
|
||||
"datepicker": "Тип календаря",
|
||||
"datepickerPlaceholder": "Выберите дату",
|
||||
"datepickerDescription": "Запланированные задачи будут выполняться в соответствии с этим календарем.",
|
||||
"sampleRemark": "Пример примечания",
|
||||
"oldUsername": "Текущий логин",
|
||||
"currentPassword": "Текущий пароль",
|
||||
"newUsername": "Новый логин",
|
||||
@@ -1110,10 +1108,6 @@
|
||||
"subUpdatesDesc": "Интервал между обновлениями в клиентском приложении (в часах)",
|
||||
"subEncrypt": "Кодировать",
|
||||
"subEncryptDesc": "Шифровать возвращенные конфиги в подписке",
|
||||
"subShowInfo": "Показать информацию об использовании",
|
||||
"subShowInfoDesc": "Отображать остаток трафика и дату окончания после имени конфигурации",
|
||||
"subEmailInRemark": "Включать Email в название",
|
||||
"subEmailInRemarkDesc": "Включать email клиента в название профиля подписки.",
|
||||
"subURI": "URI обратного прокси",
|
||||
"subURIDesc": "Изменить базовый URI URL-адреса подписки для использования за прокси-серверами",
|
||||
"externalTrafficInformEnable": "Информация о внешнем трафике",
|
||||
|
||||
@@ -1023,11 +1023,9 @@
|
||||
"panelOutbound": "Panel Trafiği Gideni",
|
||||
"panelOutboundDesc": "Panelin kendi isteklerini — panel/Xray sürüm kontrolleri ve indirmeleri, Telegram ve normal geo dosyası güncellemesi — bu Xray gideni üzerinden yönlendirir; sunucu tarafındaki GitHub/Telegram filtrelemesini aşmak için. Yerel bir köprü gelen bağlantısı çalışan yapılandırmaya otomatik eklenir ve canlı uygulanır. Xray'in yerel Geodata Otomatik Güncellemesi etkilenmez; kendi indirme gidenine sahiptir. Doğrudan bağlantı için boş bırakın.",
|
||||
"panelOutboundPh": "Doğrudan bağlantı",
|
||||
"remarkModel": "Açıklama Modeli ve Ayırma Karakteri",
|
||||
"datepicker": "Takvim Türü",
|
||||
"datepickerPlaceholder": "Tarih Seçin",
|
||||
"datepickerDescription": "Planlanmış görevler bu takvime göre çalışacaktır.",
|
||||
"sampleRemark": "Örnek Açıklama",
|
||||
"oldUsername": "Mevcut Kullanıcı Adı",
|
||||
"currentPassword": "Mevcut Şifre",
|
||||
"newUsername": "Yeni Kullanıcı Adı",
|
||||
@@ -1110,10 +1108,6 @@
|
||||
"subUpdatesDesc": "İstemci uygulamalarındaki abonelik URL'sinin güncellenme aralığı. (birim: saat)",
|
||||
"subEncrypt": "Kodla",
|
||||
"subEncryptDesc": "Abonelik hizmetinin döndürülen içeriğini Base64 ile şifreler.",
|
||||
"subShowInfo": "Kullanım Bilgisini Göster",
|
||||
"subShowInfoDesc": "Kalan trafiği ve süreyi istemci uygulamalarında görüntüler.",
|
||||
"subEmailInRemark": "Ada E-posta Ekle",
|
||||
"subEmailInRemarkDesc": "Abonelik profil adına kullanıcının e-postasını dahil eder.",
|
||||
"subURI": "Ters Proxy URI",
|
||||
"subURIDesc": "Proxy arkasında kullanılacak abonelik URL'sinin URI yolu.",
|
||||
"externalTrafficInformEnable": "Harici Trafik Bilgisi",
|
||||
|
||||
@@ -1023,11 +1023,9 @@
|
||||
"panelOutbound": "Вихідний для трафіку панелі",
|
||||
"panelOutboundDesc": "Маршрутизує власні запити панелі — перевірки версій і завантаження панелі/Xray, Telegram та звичайне оновлення geo-файлів — через цей вихідний Xray для обходу фільтрації GitHub/Telegram на стороні сервера. Локальний міст-вхідний додається до робочої конфігурації автоматично і застосовується наживо. Вбудоване в Xray автооновлення Geodata не зачіпається; воно має власний вихідний для завантаження. Залиште порожнім для прямого підключення.",
|
||||
"panelOutboundPh": "Пряме підключення",
|
||||
"remarkModel": "Модель зауваження та роздільний символ",
|
||||
"datepicker": "Тип календаря",
|
||||
"datepickerPlaceholder": "Виберіть дату",
|
||||
"datepickerDescription": "Заплановані завдання виконуватимуться на основі цього календаря.",
|
||||
"sampleRemark": "Зразок зауваження",
|
||||
"oldUsername": "Поточне ім'я користувача",
|
||||
"currentPassword": "Поточний пароль",
|
||||
"newUsername": "Нове ім'я користувача",
|
||||
@@ -1110,10 +1108,6 @@
|
||||
"subUpdatesDesc": "Інтервали оновлення URL-адреси підписки в клієнтських програмах. (одиниця: година)",
|
||||
"subEncrypt": "Кодувати",
|
||||
"subEncryptDesc": "Повернений вміст послуги підписки матиме кодування Base64.",
|
||||
"subShowInfo": "Показати інформацію про використання",
|
||||
"subShowInfoDesc": "Залишок трафіку та дата відображатимуться в клієнтських програмах.",
|
||||
"subEmailInRemark": "Включати Email до назви",
|
||||
"subEmailInRemarkDesc": "Включати email клієнта до назви профілю підписки.",
|
||||
"subURI": "URI зворотного проксі",
|
||||
"subURIDesc": "URI до URL-адреси підписки для використання за проксі.",
|
||||
"externalTrafficInformEnable": "Інформація про зовнішній трафік",
|
||||
|
||||
@@ -1023,11 +1023,9 @@
|
||||
"panelOutbound": "Outbound cho lưu lượng panel",
|
||||
"panelOutboundDesc": "Định tuyến các yêu cầu của chính bảng điều khiển — kiểm tra phiên bản và tải xuống panel/Xray, Telegram, và cập nhật tệp geo thông thường — qua outbound Xray này để vượt qua lọc GitHub/Telegram phía máy chủ. Một inbound cầu nối cục bộ được tự động thêm vào cấu hình đang chạy và áp dụng trực tiếp. Tính năng Tự động cập nhật Geodata gốc của Xray không bị ảnh hưởng; nó có outbound tải xuống riêng. Để trống để kết nối trực tiếp.",
|
||||
"panelOutboundPh": "Kết nối trực tiếp",
|
||||
"remarkModel": "Ghi chú mô hình và ký tự phân tách",
|
||||
"datepicker": "Kiểu lịch",
|
||||
"datepickerPlaceholder": "Chọn ngày",
|
||||
"datepickerDescription": "Tác vụ chạy theo lịch trình sẽ chạy theo kiểu lịch này.",
|
||||
"sampleRemark": "Nhận xét mẫu",
|
||||
"oldUsername": "Tên người dùng hiện tại",
|
||||
"currentPassword": "Mật khẩu hiện tại",
|
||||
"newUsername": "Tên người dùng mới",
|
||||
@@ -1110,10 +1108,6 @@
|
||||
"subUpdatesDesc": "Số giờ giữa các cập nhật trong ứng dụng khách",
|
||||
"subEncrypt": "Mã hóa",
|
||||
"subEncryptDesc": "Mã hóa các cấu hình được trả về trong gói đăng ký",
|
||||
"subShowInfo": "Hiển thị thông tin sử dụng",
|
||||
"subShowInfoDesc": "Hiển thị lưu lượng truy cập còn lại và ngày sau tên cấu hình",
|
||||
"subEmailInRemark": "Thêm Email vào tên",
|
||||
"subEmailInRemarkDesc": "Thêm email của client vào tên hồ sơ đăng ký.",
|
||||
"subURI": "URI proxy trung gian",
|
||||
"subURIDesc": "Thay đổi URI cơ sở của URL gói đăng ký để sử dụng cho proxy trung gian",
|
||||
"externalTrafficInformEnable": "Thông báo giao thông bên ngoài",
|
||||
|
||||
@@ -1023,11 +1023,9 @@
|
||||
"panelOutbound": "面板流量出站",
|
||||
"panelOutboundDesc": "通过此 Xray 出站路由面板自身的请求(面板/Xray 版本检查与下载、Telegram、普通 geo 文件更新),以绕过服务端对 GitHub/Telegram 的过滤。本地桥接入站会自动添加到运行中的配置并实时生效。Xray 原生的 Geodata 自动更新不受影响,它有自己的下载出站。留空表示直连。",
|
||||
"panelOutboundPh": "直连",
|
||||
"remarkModel": "备注模型和分隔符",
|
||||
"datepicker": "日期选择器",
|
||||
"datepickerPlaceholder": "选择日期",
|
||||
"datepickerDescription": "选择器日历类型指定到期日期",
|
||||
"sampleRemark": "备注示例",
|
||||
"oldUsername": "原用户名",
|
||||
"currentPassword": "原密码",
|
||||
"newUsername": "新用户名",
|
||||
@@ -1110,10 +1108,6 @@
|
||||
"subUpdatesDesc": "客户端应用中订阅 URL 的更新间隔(单位:小时)",
|
||||
"subEncrypt": "编码",
|
||||
"subEncryptDesc": "订阅服务返回的内容将采用 Base64 编码",
|
||||
"subShowInfo": "显示使用信息",
|
||||
"subShowInfoDesc": "客户端应用中将显示剩余流量和日期信息",
|
||||
"subEmailInRemark": "在名称中包含邮箱",
|
||||
"subEmailInRemarkDesc": "在订阅配置名称中包含客户端邮箱。",
|
||||
"subURI": "反向代理 URI",
|
||||
"subURIDesc": "用于代理后面的订阅 URL 的 URI 路径",
|
||||
"externalTrafficInformEnable": "外部交通通知",
|
||||
|
||||
@@ -1023,11 +1023,9 @@
|
||||
"panelOutbound": "面板流量出站",
|
||||
"panelOutboundDesc": "透過此 Xray 出站路由面板自身的請求(面板/Xray 版本檢查與下載、Telegram、一般 geo 檔案更新),以繞過伺服器端對 GitHub/Telegram 的過濾。本地橋接入站會自動加入執行中的設定並即時生效。Xray 原生的 Geodata 自動更新不受影響,它有自己的下載出站。留空表示直連。",
|
||||
"panelOutboundPh": "直連",
|
||||
"remarkModel": "備註模型和分隔符",
|
||||
"datepicker": "日期選擇器",
|
||||
"datepickerPlaceholder": "選擇日期",
|
||||
"datepickerDescription": "選擇器日曆類型指定到期日期",
|
||||
"sampleRemark": "備註示例",
|
||||
"oldUsername": "原使用者名稱",
|
||||
"currentPassword": "原密碼",
|
||||
"newUsername": "新使用者名稱",
|
||||
@@ -1110,10 +1108,6 @@
|
||||
"subUpdatesDesc": "客戶端應用中訂閱 URL 的更新間隔(單位:小時)",
|
||||
"subEncrypt": "編碼",
|
||||
"subEncryptDesc": "訂閱服務返回的內容將採用 Base64 編碼",
|
||||
"subShowInfo": "顯示使用資訊",
|
||||
"subShowInfoDesc": "客戶端應用中將顯示剩餘流量和日期資訊",
|
||||
"subEmailInRemark": "在名稱中包含郵箱",
|
||||
"subEmailInRemarkDesc": "在訂閱配置名稱中包含客戶端郵箱。",
|
||||
"subURI": "反向代理 URI",
|
||||
"subURIDesc": "用於代理後面的訂閱 URL 的 URI 路徑",
|
||||
"externalTrafficInformEnable": "外部交通通知",
|
||||
|
||||
Reference in New Issue
Block a user