hiddifypanel 8.8.94__py3-none-any.whl → 8.8.96__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 +2 -2
- hiddifypanel/models/config_enum.py +2 -0
- hiddifypanel/models/user.py +1 -1
- hiddifypanel/panel/admin/Actions.py +1 -1
- hiddifypanel/panel/admin/QuickSetup.py +11 -6
- hiddifypanel/translations/en/LC_MESSAGES/messages.mo +0 -0
- hiddifypanel/translations/en/LC_MESSAGES/messages.po +588 -226
- hiddifypanel/translations/fa/LC_MESSAGES/messages.mo +0 -0
- hiddifypanel/translations/fa/LC_MESSAGES/messages.po +650 -280
- hiddifypanel/translations/pt/LC_MESSAGES/messages.mo +0 -0
- hiddifypanel/translations/pt/LC_MESSAGES/messages.po +627 -259
- hiddifypanel/translations/ru/LC_MESSAGES/messages.mo +0 -0
- hiddifypanel/translations/ru/LC_MESSAGES/messages.po +1125 -692
- hiddifypanel/translations/zh/LC_MESSAGES/messages.mo +0 -0
- hiddifypanel/translations/zh/LC_MESSAGES/messages.po +1676 -1183
- {hiddifypanel-8.8.94.dist-info → hiddifypanel-8.8.96.dist-info}/METADATA +1 -1
- {hiddifypanel-8.8.94.dist-info → hiddifypanel-8.8.96.dist-info}/RECORD +22 -22
- {hiddifypanel-8.8.94.dist-info → hiddifypanel-8.8.96.dist-info}/LICENSE.md +0 -0
- {hiddifypanel-8.8.94.dist-info → hiddifypanel-8.8.96.dist-info}/WHEEL +0 -0
- {hiddifypanel-8.8.94.dist-info → hiddifypanel-8.8.96.dist-info}/entry_points.txt +0 -0
- {hiddifypanel-8.8.94.dist-info → hiddifypanel-8.8.96.dist-info}/top_level.txt +0 -0
hiddifypanel/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
8.8.
|
1
|
+
8.8.96
|
hiddifypanel/VERSION.py
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
__version__='8.8.
|
1
|
+
__version__='8.8.96'
|
2
2
|
from datetime import datetime
|
3
|
-
__release_date__= datetime.strptime('2024-
|
3
|
+
__release_date__= datetime.strptime('2024-02-21','%Y-%m-%d')
|
@@ -42,6 +42,7 @@ class ConfigCategory(StrEnum):
|
|
42
42
|
|
43
43
|
|
44
44
|
class ConfigEnum(StrEnum):
|
45
|
+
create_easysetup_link = auto()
|
45
46
|
ssh_server_redis_url = auto()
|
46
47
|
ssh_server_port = auto()
|
47
48
|
ssh_server_enable = auto()
|
@@ -146,6 +147,7 @@ class ConfigEnum(StrEnum):
|
|
146
147
|
|
147
148
|
def info(self):
|
148
149
|
map = {
|
150
|
+
self.create_easysetup_link: {'category': ConfigCategory.hidden},
|
149
151
|
self.ssh_server_redis_url: {'category': ConfigCategory.hidden},
|
150
152
|
self.ssh_server_port: {'category': ConfigCategory.ssh, 'apply_mode': 'apply'},
|
151
153
|
self.ssh_server_enable: {'category': ConfigCategory.ssh, 'type': bool, 'apply_mode': 'apply'},
|
hiddifypanel/models/user.py
CHANGED
@@ -145,7 +145,7 @@ class User(db.Model, SerializerMixin):
|
|
145
145
|
'current_usage_GB': d.current_usage_GB,
|
146
146
|
'last_reset_time': hiddify.date_to_json(d.last_reset_time),
|
147
147
|
'comment': d.comment,
|
148
|
-
'added_by_uuid': d.admin.uuid,
|
148
|
+
'added_by_uuid': d.admin.uuid if d.admin else '',
|
149
149
|
'telegram_id': d.telegram_id,
|
150
150
|
'ed25519_private_key': d.ed25519_private_key,
|
151
151
|
'ed25519_public_key': d.ed25519_public_key
|
@@ -134,7 +134,7 @@ class Actions(FlaskView):
|
|
134
134
|
out_type="info",
|
135
135
|
out_msg=_("Success! Please wait around 4 minutes to make sure everything is updated. During this time, please save your proxy links which are:") +
|
136
136
|
admin_links,
|
137
|
-
log_path=get_logpath("
|
137
|
+
log_path=get_logpath("install.log"),
|
138
138
|
show_success=True,
|
139
139
|
domains=get_domains(),
|
140
140
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from hiddifypanel.models import *
|
2
2
|
import flask_babel
|
3
3
|
import flask_babelex
|
4
|
-
|
4
|
+
import uuid
|
5
5
|
# from flask_babelex import lazy_gettext as _
|
6
6
|
from flask_babelex import gettext as _
|
7
7
|
import wtforms as wtf
|
@@ -13,7 +13,7 @@ from flask_admin.base import expose
|
|
13
13
|
from wtforms.validators import Regexp, ValidationError
|
14
14
|
|
15
15
|
import re
|
16
|
-
from flask import render_template, current_app, Markup, redirect, url_for
|
16
|
+
from flask import render_template, current_app, Markup, redirect, url_for, request
|
17
17
|
from hiddifypanel.models import User, Domain, DomainType, StrConfig, ConfigEnum, get_hconfigs
|
18
18
|
from hiddifypanel.panel.database import db
|
19
19
|
from wtforms.fields import *
|
@@ -29,6 +29,9 @@ class QuickSetup(FlaskView):
|
|
29
29
|
|
30
30
|
def post(self):
|
31
31
|
set_hconfig(ConfigEnum.first_setup, False)
|
32
|
+
if request.args.get('changepw') == "true":
|
33
|
+
AdminUser.current_admin_or_owner().uuid = str(uuid.uuid4())
|
34
|
+
|
32
35
|
quick_form = get_quick_setup_form()
|
33
36
|
lang_form = get_lang_form()
|
34
37
|
if lang_form.lang_submit.data:
|
@@ -109,9 +112,11 @@ def get_quick_setup_form(empty=False):
|
|
109
112
|
]
|
110
113
|
domain = wtf.fields.StringField(_("domain.domain"), domain_validators, description=_("domain.description"), render_kw={
|
111
114
|
"class": "ltr", "pattern": domain_validators[0].regex.pattern, "title": domain_validators[0].message, "required": "", "placeholder": "sub.domain.com"})
|
112
|
-
enable_telegram = SwitchField(_("config.telegram_enable.label"), description=_(
|
115
|
+
enable_telegram = SwitchField(_("config.telegram_enable.label"), description=_(
|
116
|
+
"config.telegram_enable.description"), default=hconfig(ConfigEnum.telegram_enable))
|
113
117
|
enable_firewall = SwitchField(_("config.firewall.label"), description=_("config.firewall.description"), default=hconfig(ConfigEnum.firewall))
|
114
|
-
block_iran_sites = SwitchField(_("config.block_iran_sites.label"), description=_(
|
118
|
+
block_iran_sites = SwitchField(_("config.block_iran_sites.label"), description=_(
|
119
|
+
"config.block_iran_sites.description"), default=hconfig(ConfigEnum.block_iran_sites))
|
115
120
|
enable_vmess = SwitchField(_("config.vmess_enable.label"), description=_("config.vmess_enable.description"), default=hconfig(ConfigEnum.vmess_enable))
|
116
121
|
decoy_domain = wtf.fields.StringField(_("config.decoy_domain.label"), description=_("config.decoy_domain.description"), default=hconfig(
|
117
122
|
ConfigEnum.decoy_domain), validators=[wtf.validators.Regexp(domain_regex, re.IGNORECASE, _("config.Invalid domain")), hiddify.validate_domain_exist])
|
@@ -135,6 +140,6 @@ def validate_domain(form, field):
|
|
135
140
|
def admin_link():
|
136
141
|
domains = get_panel_domains()
|
137
142
|
if len(domains):
|
138
|
-
return "https://"+domains[0].domain+hiddify.get_admin_path()
|
143
|
+
return "https://" + domains[0].domain + hiddify.get_admin_path()
|
139
144
|
else:
|
140
|
-
return "https://"+hiddify.get_ip(4)+hiddify.get_admin_path()
|
145
|
+
return "https://" + hiddify.get_ip(4) + hiddify.get_admin_path()
|
Binary file
|