hiddifypanel 10.80.6__py3-none-any.whl → 10.80.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hiddifypanel/VERSION +1 -1
- hiddifypanel/VERSION.py +1 -1
- hiddifypanel/base.py +10 -8
- hiddifypanel/panel/admin/QuickSetup.py +1 -1
- hiddifypanel/panel/admin/SettingAdmin.py +1 -1
- hiddifypanel/panel/hiddify.py +7 -6
- hiddifypanel/panel/init_db.py +6 -0
- hiddifypanel/translations/en/LC_MESSAGES/messages.mo +0 -0
- hiddifypanel/translations/en/LC_MESSAGES/messages.po +9 -6
- hiddifypanel/translations/fa/LC_MESSAGES/messages.mo +0 -0
- hiddifypanel/translations/fa/LC_MESSAGES/messages.po +6 -3
- hiddifypanel/translations/my/LC_MESSAGES/messages.mo +0 -0
- hiddifypanel/translations/my/LC_MESSAGES/messages.po +2790 -0
- hiddifypanel/translations/pt/LC_MESSAGES/messages.mo +0 -0
- hiddifypanel/translations/pt/LC_MESSAGES/messages.po +3 -0
- hiddifypanel/translations/ru/LC_MESSAGES/messages.mo +0 -0
- hiddifypanel/translations/ru/LC_MESSAGES/messages.po +6 -3
- hiddifypanel/translations/zh/LC_MESSAGES/messages.mo +0 -0
- hiddifypanel/translations/zh/LC_MESSAGES/messages.po +3 -0
- hiddifypanel/translations.i18n/en.json +7 -6
- hiddifypanel/translations.i18n/fa.json +4 -3
- hiddifypanel/translations.i18n/my.json +20 -20
- hiddifypanel/translations.i18n/pt.json +1 -0
- hiddifypanel/translations.i18n/ru.json +4 -3
- hiddifypanel/translations.i18n/zh.json +1 -0
- {hiddifypanel-10.80.6.dist-info → hiddifypanel-10.80.8.dist-info}/METADATA +1 -1
- {hiddifypanel-10.80.6.dist-info → hiddifypanel-10.80.8.dist-info}/RECORD +30 -28
- {hiddifypanel-10.80.6.dist-info → hiddifypanel-10.80.8.dist-info}/LICENSE.md +0 -0
- {hiddifypanel-10.80.6.dist-info → hiddifypanel-10.80.8.dist-info}/WHEEL +0 -0
- {hiddifypanel-10.80.6.dist-info → hiddifypanel-10.80.8.dist-info}/entry_points.txt +0 -0
hiddifypanel/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
10.80.
|
1
|
+
10.80.8
|
hiddifypanel/VERSION.py
CHANGED
@@ -2,5 +2,5 @@ import importlib.metadata
|
|
2
2
|
from datetime import datetime
|
3
3
|
|
4
4
|
__version__ = importlib.metadata.version(__package__ or __name__)
|
5
|
-
__release_time__= datetime.strptime('2024-12-
|
5
|
+
__release_time__= datetime.strptime('2024-12-18T01:39:58','%Y-%m-%dT%H:%M:%S')
|
6
6
|
is_released_version=True
|
hiddifypanel/base.py
CHANGED
@@ -14,10 +14,10 @@ from loguru import logger
|
|
14
14
|
|
15
15
|
from dynaconf import FlaskDynaconf
|
16
16
|
|
17
|
-
def create_app(*args,
|
18
|
-
|
17
|
+
def create_app(*args, app_mode="normal", **config):
|
18
|
+
|
19
19
|
app = APIFlask(__name__, static_url_path="/<proxy_path>/static/", instance_relative_config=True, version='2.2.0', title="Hiddify API",
|
20
|
-
openapi_blueprint_url_prefix="/<proxy_path>/api", docs_ui='elements', json_errors=False, enable_openapi=
|
20
|
+
openapi_blueprint_url_prefix="/<proxy_path>/api", docs_ui='elements', json_errors=False, enable_openapi=app_mode=="normal")
|
21
21
|
# app = Flask(__name__, static_url_path="/<proxy_path>/static/", instance_relative_config=True)
|
22
22
|
# app.asgi_app = WsgiToAsgi(app)
|
23
23
|
|
@@ -29,14 +29,16 @@ def create_app(*args, cli=False, **config):
|
|
29
29
|
app.config[c] = v
|
30
30
|
dyn=FlaskDynaconf(app,settings_files=[os.environ.get("HIDDIFY_CFG_PATH", 'app.cfg')])
|
31
31
|
|
32
|
-
if cli:
|
32
|
+
if app_mode in ["cli","celery"]:
|
33
33
|
app.config['EXTENSIONS']=[
|
34
34
|
# "hiddifypanel.cache:init_app",
|
35
35
|
"hiddifypanel.database:init_app",
|
36
36
|
"hiddifypanel.panel.hlogger:init_cli",
|
37
|
-
"hiddifypanel.panel.cli:init_app",
|
38
|
-
"hiddifypanel.celery:init_app",
|
39
37
|
]
|
38
|
+
if app_mode=="celery":
|
39
|
+
app.config['EXTENSIONS'].append("hiddifypanel.celery:init_app")
|
40
|
+
else:
|
41
|
+
app.config['EXTENSIONS'].append("hiddifypanel.panel.cli:init_app")
|
40
42
|
else:
|
41
43
|
app.config['EXTENSIONS']=[
|
42
44
|
# "hiddifypanel.cache:init_app",
|
@@ -67,7 +69,7 @@ def create_app_wsgi(*args, **kwargs):
|
|
67
69
|
# https://github.com/pallets/flask/issues/4170
|
68
70
|
cli = ("hiddifypanel" in sys.argv[0] ) or (sys.argv[1] in ["update-usage", "all-configs", "admin_links", "admin_path"])
|
69
71
|
|
70
|
-
app = create_app(
|
72
|
+
app = create_app(app_mode="cli" if cli else "normal")
|
71
73
|
return app
|
72
74
|
|
73
75
|
|
@@ -78,5 +80,5 @@ def create_celery_app():
|
|
78
80
|
# # to be passed to create_app
|
79
81
|
# # https://github.com/pallets/flask/issues/4170
|
80
82
|
# print(kwargs)
|
81
|
-
app = create_app(
|
83
|
+
app = create_app(app_mode="celery")
|
82
84
|
return app.extensions["celery"]
|
@@ -67,7 +67,7 @@ def get_lang_form(empty=False):
|
|
67
67
|
class LangForm(FlaskForm):
|
68
68
|
step = wtf.HiddenField(default="1")
|
69
69
|
admin_lang = wtf.SelectField(
|
70
|
-
_("config.admin_lang.label"), choices=[("en", _("lang.en")), ("fa", _("lang.fa")), ("pt", _("lang.pt")), ("zh", _("lang.zh")), ("ru", _("lang.ru"))],
|
70
|
+
_("config.admin_lang.label"), choices=[("en", _("lang.en")), ("fa", _("lang.fa")), ("pt", _("lang.pt")), ("zh", _("lang.zh")), ("ru", _("lang.ru")), ("my", _("lang.my"))],
|
71
71
|
description=_("config.admin_lang.description"),
|
72
72
|
default=hconfig(ConfigEnum.admin_lang))
|
73
73
|
# lang=wtf.SelectField(_("config.lang.label"),choices=[("en",_("lang.en")),("fa",_("lang.fa"))],description=_("config.lang.description"),default=hconfig(ConfigEnum.lang))
|
@@ -216,7 +216,7 @@ def get_config_form():
|
|
216
216
|
elif c.key == ConfigEnum.lang or c.key == ConfigEnum.admin_lang:
|
217
217
|
field = wtf.SelectField(
|
218
218
|
_(f"config.{c.key}.label"),
|
219
|
-
choices=[("en", _("lang.en")), ("fa", Markup(_("lang.fa"))), ("zh", _("lang.zh")), ("pt", _("lang.pt")), ("ru", _("lang.ru"))],
|
219
|
+
choices=[("en", _("lang.en")), ("fa", Markup(_("lang.fa"))), ("zh", _("lang.zh")), ("pt", _("lang.pt")), ("ru", _("lang.ru")), ("my", _("lang.my"))],
|
220
220
|
description=_(f"config.{c.key}.description"),
|
221
221
|
default=hconfig(c.key))
|
222
222
|
elif c.key == ConfigEnum.country:
|
hiddifypanel/panel/hiddify.py
CHANGED
@@ -344,18 +344,18 @@ def get_backup_child_unique_id(backupdata: dict) -> str:
|
|
344
344
|
def all_configs_for_cli():
|
345
345
|
valid_users = [u.to_dict(dump_id=True) for u in User.query.filter((User.usage_limit > User.current_usage)).all() if u.is_active]
|
346
346
|
host_child_ids = [c.id for c in Child.query.filter(Child.mode == ChildMode.virtual).all()]
|
347
|
+
domains = Domain.query.filter(Domain.child_id.in_(host_child_ids),~Domain.domain.contains("*")).all()
|
347
348
|
configs = {
|
348
349
|
"users": valid_users,
|
349
|
-
"domains": [u.to_dict(dump_ports=True, dump_child_id=True) for u in
|
350
|
+
"domains": [u.to_dict(dump_ports=True, dump_child_id=True) for u in domains],
|
350
351
|
# "hconfigs": get_hconfigs(json=True),
|
351
352
|
"chconfigs": get_hconfigs_childs(host_child_ids, json=True)
|
352
353
|
}
|
353
354
|
|
354
|
-
def_user =
|
355
|
-
|
356
|
-
sslip_domains = [d.domain for d in domains if "sslip.io" in d.domain]
|
355
|
+
def_user = User.query.filter(User.name == 'default').first() if User.query.count() == 1 else None
|
356
|
+
|
357
357
|
|
358
|
-
configs['chconfigs'][0]['first_setup'] = def_user is not None and
|
358
|
+
configs['chconfigs'][0]['first_setup'] = def_user is not None and Domain.query.filter(Domain.domain.contains("sslip.io")).limit(1).count() > 0
|
359
359
|
server_ip = hutils.network.get_ip_str(4)
|
360
360
|
owner = AdminUser.get_super_admin()
|
361
361
|
configs['api_key'] = owner.uuid
|
@@ -364,9 +364,10 @@ def all_configs_for_cli():
|
|
364
364
|
configs['panel_links'] = []
|
365
365
|
configs['panel_links'].append(get_account_panel_link(owner, server_ip, is_https=False))
|
366
366
|
configs['panel_links'].append(get_account_panel_link(owner, server_ip))
|
367
|
+
|
367
368
|
domains = Domain.get_domains()
|
368
|
-
|
369
369
|
for d in domains:
|
370
370
|
configs['panel_links'].append(get_account_panel_link(owner, d.domain))
|
371
|
+
|
371
372
|
|
372
373
|
return configs
|
hiddifypanel/panel/init_db.py
CHANGED
@@ -17,6 +17,12 @@ from loguru import logger
|
|
17
17
|
MAX_DB_VERSION = 100
|
18
18
|
|
19
19
|
|
20
|
+
def _v98(child_id):
|
21
|
+
add_config_if_not_exist(ConfigEnum.path_xhttp,hutils.random.get_random_string(7, 15))
|
22
|
+
add_config_if_not_exist(ConfigEnum.xhttp_enable, False)
|
23
|
+
db.session.bulk_save_objects(get_proxy_rows_v1())
|
24
|
+
|
25
|
+
|
20
26
|
def _v97(child_id):
|
21
27
|
keys = hutils.crypto.generate_ssh_host_keys()
|
22
28
|
# set_hconfig(ConfigEnum.ssh_host_dsa_pk, keys['dsa']['pk'])
|
Binary file
|
@@ -10,13 +10,13 @@ msgstr ""
|
|
10
10
|
" Settings"
|
11
11
|
|
12
12
|
msgid "%(count)s records were successfully disabled."
|
13
|
-
msgstr "%(count)s
|
13
|
+
msgstr "%(count)s Records were successfully disabled."
|
14
14
|
|
15
15
|
msgid "%(count)s records were successfully enabled."
|
16
|
-
msgstr "%(count)s
|
16
|
+
msgstr "%(count)s Records were successfully enabled."
|
17
17
|
|
18
18
|
msgid "%(expire_days)s days"
|
19
|
-
msgstr "%(expire_days)s
|
19
|
+
msgstr "%(expire_days)s Days"
|
20
20
|
|
21
21
|
msgid "%(placeholder)s"
|
22
22
|
msgstr "%(placeholder)s"
|
@@ -1707,10 +1707,10 @@ msgid "config.path_ws.label"
|
|
1707
1707
|
msgstr "ℹ️ Path of Websocket Requests"
|
1708
1708
|
|
1709
1709
|
msgid "config.path_xhttp.description"
|
1710
|
-
msgstr "This option defines the Path for
|
1710
|
+
msgstr "This option defines the Path for XHTTP"
|
1711
1711
|
|
1712
1712
|
msgid "config.path_xhttp.label"
|
1713
|
-
msgstr "ℹ️ Path for
|
1713
|
+
msgstr "ℹ️ Path for XHTTP"
|
1714
1714
|
|
1715
1715
|
msgid "config.proxies.description"
|
1716
1716
|
msgstr "Define specific proxy settings"
|
@@ -2383,7 +2383,7 @@ msgstr ""
|
|
2383
2383
|
"⚠️ <strong>Not Supported in SignBox based Clients. Only <a href=\"https://app.hiddify.com\" target=\"_blank\">Hiddify</a> App, and XRay base Clients are supported.</strong>"
|
2384
2384
|
|
2385
2385
|
msgid "config.xhttp_enable.label"
|
2386
|
-
msgstr "🈁
|
2386
|
+
msgstr "🈁 XHTTP"
|
2387
2387
|
|
2388
2388
|
msgid "config.xtls_enable.description"
|
2389
2389
|
msgstr "Enables XTLS Protocol"
|
@@ -2490,6 +2490,9 @@ msgstr "🇺🇸 English"
|
|
2490
2490
|
msgid "lang.fa"
|
2491
2491
|
msgstr "🇮🇷 Persian - فارسی"
|
2492
2492
|
|
2493
|
+
msgid "lang.my"
|
2494
|
+
msgstr "lang.my"
|
2495
|
+
|
2493
2496
|
msgid "lang.pt"
|
2494
2497
|
msgstr "🇵🇹 Portuguese - Português "
|
2495
2498
|
|
Binary file
|
@@ -1692,10 +1692,10 @@ msgid "config.path_ws.label"
|
|
1692
1692
|
msgstr "ℹ️ مسیر درخواست های Websocket"
|
1693
1693
|
|
1694
1694
|
msgid "config.path_xhttp.description"
|
1695
|
-
msgstr "این گزینه مسیر را برای
|
1695
|
+
msgstr "این گزینه مسیر را برای XHTTP تعریف می کند"
|
1696
1696
|
|
1697
1697
|
msgid "config.path_xhttp.label"
|
1698
|
-
msgstr "ℹ️ مسیر برای
|
1698
|
+
msgstr "ℹ️ مسیر برای XHTTP"
|
1699
1699
|
|
1700
1700
|
msgid "config.proxies.description"
|
1701
1701
|
msgstr "تنظیمات اختصاصی را مشخص کنید"
|
@@ -2370,7 +2370,7 @@ msgstr ""
|
|
2370
2370
|
"⚠️<strong> این پروتکل در برنامه های با هسته SingBox پشتیبانی نمیشود. فقط در برنامه <a href=\"https://app.hiddify.com\" target=\"_blank\">Hiddify</a> و برنامه های با هسته XRay پشتیبانی میشود</strong>"
|
2371
2371
|
|
2372
2372
|
msgid "config.xhttp_enable.label"
|
2373
|
-
msgstr "🈁
|
2373
|
+
msgstr "🈁 XHTTP"
|
2374
2374
|
|
2375
2375
|
msgid "config.xtls_enable.description"
|
2376
2376
|
msgstr "پروتکل XTLS را فعال می کند"
|
@@ -2476,6 +2476,9 @@ msgstr " 🇺🇸 انگلیسی - English "
|
|
2476
2476
|
msgid "lang.fa"
|
2477
2477
|
msgstr "🇮🇷 فارسی"
|
2478
2478
|
|
2479
|
+
msgid "lang.my"
|
2480
|
+
msgstr ""
|
2481
|
+
|
2479
2482
|
msgid "lang.pt"
|
2480
2483
|
msgstr "🇵🇹 پرتغالی - Português "
|
2481
2484
|
|
Binary file
|