Skip to content

feat(subscription): recognize InHive client for sing-box format#31

Open
twilgate wants to merge 1 commit into
hiddify:devfrom
TwilgateLabs:add-inhive-client
Open

feat(subscription): recognize InHive client for sing-box format#31
twilgate wants to merge 1 commit into
hiddify:devfrom
TwilgateLabs:add-inhive-client

Conversation

@twilgate

Copy link
Copy Markdown

Adds InHive to both sing-box User-Agent regexes so InHive clients receive the sing-box config:

# hiddifypanel/hutils/flask.py
- res['is_singbox'] = re.match('^(HiddifyNext|Dart|SFI|SFA)', ua, re.IGNORECASE) and True
+ res['is_singbox'] = re.match('^(HiddifyNext|Dart|SFI|SFA|InHive)', ua, re.IGNORECASE) and True
# hiddifypanel/panel/user/user.py
- if g.user_agent['is_singbox'] or re.match('^(HiddifyNext|Dart|SFI|SFA)', ua, re.IGNORECASE):
+ if g.user_agent['is_singbox'] or re.match('^(HiddifyNext|Dart|SFI|SFA|InHive)', ua, re.IGNORECASE):

InHive is a public sing-box-based client (releases at github.com/TwilgateLabs) supporting hysteria2/TUIC/Reality; UA InHive/<ver> (<platform>; <hwid>). Both spots updated together (they mirror the same regex).

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant