MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / add_proxy_site

Method add_proxy_site

script/btcli.py:329–343  ·  view source on GitHub ↗
(self, domains: str, proxy_pass: str, proxy_host: str, proxy_type: str, remark: str)

Source from the content-addressed store, hash-verified

327 print(Colors.warning("功能开发中..."))
328
329 def add_proxy_site(self, domains: str, proxy_pass: str, proxy_host: str, proxy_type: str, remark: str):
330 from mod.project.proxy.comMod import main as proxyMod
331 pMod = proxyMod()
332
333 args = public.dict_obj()
334 args.domains = domains
335 args.proxy_pass = proxy_pass
336 args.proxy_host = proxy_host
337 args.proxy_type = proxy_type
338 args.remark = remark
339 result = pMod.create(args)
340 if result.get('status'):
341 print(Colors.success(f"✓ 反代项目创建成功: {domains}"))
342 else:
343 print(Colors.error(f"✗ 反代项目创建失败: {result.get('msg', '未知错误')}"))
344
345
346# ============================================

Callers 1

site_menuMethod · 0.45

Calls 4

createMethod · 0.45
getMethod · 0.45
successMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected