hiddifypanel 9.0.0.dev40__py3-none-any.whl → 9.0.0.dev42__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 CHANGED
@@ -1 +1 @@
1
- 9.0.0.dev40
1
+ 9.0.0.dev42
hiddifypanel/VERSION.py CHANGED
@@ -1,3 +1,3 @@
1
- __version__='9.0.0.dev40'
1
+ __version__='9.0.0.dev42'
2
2
  from datetime import datetime
3
3
  __release_date__= datetime.strptime('2024-01-09','%Y-%m-%d')
@@ -77,7 +77,7 @@ class SettingAdmin(FlaskView):
77
77
  # print(cat,vs)
78
78
 
79
79
  merged_configs = {**old_configs, **changed_configs}
80
- if len(set([merged_configs[ConfigEnum.proxy_path], merged_configs[ConfigEnum.proxy_path_client], merged_configs[ConfigEnum.proxy_path_admin])) != 3:
80
+ if len(set([merged_configs[ConfigEnum.proxy_path], merged_configs[ConfigEnum.proxy_path_client], merged_configs[ConfigEnum.proxy_path_admin]])) != 3:
81
81
  flash(_("ProxyPath is already used! use different proxy path"), 'error')
82
82
  return render_template('config.html', form=form)
83
83
  # for k in [ConfigEnum.reality_server_names,ConfigEnum.reality_fallback_domain]:
@@ -178,12 +178,12 @@ def is_admin_role(role: Role):
178
178
 
179
179
  def is_admin_proxy_path() -> bool:
180
180
  proxy_path = g.get('proxy_path') or get_proxy_path_from_url(request.url)
181
- return proxy_path in [hconfig(ConfigEnum.proxy_path_admin), hconfig(ConfigEnum.proxy_path)]
181
+ return proxy_path in [hconfig(ConfigEnum.proxy_path_admin)] or (proxy_path in [hconfig(ConfigEnum.proxy_path)] and "/admin/" in request.path)
182
182
 
183
183
 
184
184
  def is_client_proxy_path() -> bool:
185
185
  proxy_path = g.get('proxy_path') or get_proxy_path_from_url(request.url)
186
- return proxy_path in [hconfig(ConfigEnum.proxy_path_client), hconfig(ConfigEnum.proxy_path)]
186
+ return proxy_path in [hconfig(ConfigEnum.proxy_path_client)] or (proxy_path in [hconfig(ConfigEnum.proxy_path)] and "/admin/" not in request.path)
187
187
 
188
188
 
189
189
  def proxy_path_validator(proxy_path):
@@ -896,7 +896,6 @@ def get_account_panel_link(account: BaseAccount, host: str, is_https: bool = Tru
896
896
  return link
897
897
 
898
898
 
899
-
900
899
  def is_valid_uuid(val: str, version: int | None = None):
901
900
  try:
902
901
  uuid.UUID(val, version=version)