feature!: убрана поддержка Cloudlfare

К сожалению проксирование недоступно принципиально
This commit is contained in:
protokey committed 2026-09-25 17:40:00 +04:00
1 parent 96213e182e
commit 064bb70f32
7 files changed
+28 -56

No files matched your search

+1 -25
View File
@@ -13,7 +13,6 @@ DRAFT = 'draft'
DRAFT_SERVER = 'draft.server'
DRAFT_MASK = 'draft.mask'
DRAFT_DOMAIN = 'draft.domain'
DRAFT_CLOUDFLARE = 'draft.cloudflare'
DRAFT_PROXY = 'draft.proxy'
SELECT = 'select'
POINT = 'point'
@@ -103,10 +102,6 @@ class MyPointInterface(Interface):
def ask_domain(self, ctx):
self.ask(ctx, DRAFT_DOMAIN, texts.DOMAIN_PROMPT, [[texts.CANCEL, texts.DELETE]])
@text(texts.CLOUDFLARE, state=DRAFT)
def ask_cloudflare(self, ctx):
self.ask(ctx, DRAFT_CLOUDFLARE, texts.CLOUDFLARE_PROMPT, [[texts.ENABLE, texts.DISABLE, texts.CANCEL]])
@text(texts.PROXY, state=DRAFT)
def ask_proxy(self, ctx):
self.ask(ctx, DRAFT_PROXY, texts.PROXY_PROMPT, [[texts.CF_WARP, texts.CANCEL, texts.DELETE]])
@@ -118,7 +113,6 @@ class MyPointInterface(Interface):
@text(texts.CANCEL, state=DRAFT_SERVER)
@text(texts.CANCEL, state=DRAFT_MASK)
@text(texts.CANCEL, state=DRAFT_DOMAIN)
@text(texts.CANCEL, state=DRAFT_CLOUDFLARE)
@text(texts.CANCEL, state=DRAFT_PROXY)
def back_to_draft(self, ctx):
self.show_draft(ctx)
@@ -153,20 +147,6 @@ class MyPointInterface(Interface):
ctx.data['draft']['domain'] = ''
self.show_draft(ctx)
@text(texts.ENABLE, state=DRAFT_CLOUDFLARE)
def enable_cloudflare(self, ctx):
ctx.data['draft']['cloudflare'] = True
self.show_draft(ctx)
@text(texts.DISABLE, state=DRAFT_CLOUDFLARE)
def disable_cloudflare(self, ctx):
ctx.data['draft']['cloudflare'] = False
self.show_draft(ctx)
@state(DRAFT_CLOUDFLARE)
def repeat_cloudflare(self, ctx):
self.ask_cloudflare(ctx)
@state(DRAFT_PROXY)
def set_proxy(self, ctx):
proxy = ctx.text.strip()
@@ -192,14 +172,11 @@ class MyPointInterface(Interface):
return ctx.reply(texts.DRAFT_INCOMPLETE)
if draft.get('mask') and not draft.get('domain'):
return ctx.reply(texts.MASK_WITHOUT_DOMAIN)
if draft.get('cloudflare') and not draft.get('domain'):
return ctx.reply(texts.CLOUDFLARE_WITHOUT_DOMAIN)
point = Point.objects.create_point(
ctx.user,
panel=Credentials(**draft['server']),
mask=Credentials(**draft['mask']) if draft.get('mask') else None,
domain=draft.get('domain', ''),
cloudflare=draft.get('cloudflare', False),
outbound_proxy=draft.get('proxy', ''),
)
tasks.install_point.send(point.pk, ctx.chat.pk)
@@ -305,8 +282,7 @@ class MyPointInterface(Interface):
@text(texts.POINT_DOMAIN, state=POINT)
@text(texts.POINT_PROXY, state=POINT)
@text(texts.POINT_CLOUDFLARE, state=POINT)
@text(texts.CLIENTS, state=POINT)
def not_implemented(self, ctx):
# TODO: настройки домена, прокси, cloudflare и клиенты через API панели 3x-ui
# TODO: настройки домена, прокси и клиенты через API панели 3x-ui
ctx.reply(texts.NOT_IMPLEMENTED)