Skip to content

fix(subscription): recognize InHive via is_v2ray (base64 links) to preserve kcp - #31

Open
twilgate wants to merge 2 commits into
hiddify:devfrom
TwilgateLabs:add-inhive-client
Open

fix(subscription): recognize InHive via is_v2ray (base64 links) to preserve kcp#31
twilgate wants to merge 2 commits into
hiddify:devfrom
TwilgateLabs:add-inhive-client

Conversation

@twilgate

@twilgate twilgate commented Jun 26, 2026

Copy link
Copy Markdown

Supersedes the original approach in this PR. Instead of adding InHive to the sing-box User-Agent group, this routes it to the base64 share-links group (is_v2ray).

Why the change from sing-box to base64 links

InHive is a universal client (sing-box + Xray parity) that ingests base64 share-links natively. The sing-box branch (hutils/proxy/singbox.py) drops kcp — if proxy['l3'] == "kcp": return {... "msg": "does not support kcp" ...}. The base64 branch (links_impmake_v2ray_configsto_link) emits every configured proxy including kcp, so it's the only branch that delivers the full set. Routing InHive through sing-box would silently strip kcp from its users.

InHive also isn't affected by the xray-json branch (which drops hysteria2/tuic), since that only fires for v2rayNG≥1.8.17 / Streisand — so it lands cleanly on the base64 links branch.

Changes

  • hiddifypanel/hutils/flask.py: remove InHive from is_singbox, add to is_v2ray.
  • hiddifypanel/panel/user/user.py: mirror the same in the routing branch.

On safety: InHive uses per-install localhost auth (no open unauthenticated local proxy), so serving it the full config set carries no additional exposure. UA format: InHive/<ver> (<platform>; <hwid>). Releases: github.com/TwilgateLabs.

twilgate and others added 2 commits June 27, 2026 02:39
InHive (https://inhive.ru) is a public sing-box-based VPN client
(github.com/TwilgateLabs: inhive-android, inhive-windows; iOS soon),
UA "InHive/<ver> (<platform>; <hwid>)", core supports hysteria2/TUIC/Reality.

Add the InHive token to both sing-box UA regexes (hutils/flask.py
is_singbox flag + panel/user/user.py endpoint selection) so its UA is
served the sing-box config instead of falling through to v2ray/base64.

Co-Authored-By: Claude <noreply@anthropic.com>
The sing-box branch (to_singbox) drops kcp; the base64 links branch (to_link)
carries the full protocol set including kcp. Move InHive from is_singbox to
is_v2ray so its clients receive every configured protocol.

Co-Authored-By: Claude <noreply@anthropic.com>
@twilgate twilgate changed the title feat(subscription): recognize InHive client for sing-box format Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant