提交 da6b7104 编写于 作者: H hjdhnx

增加t4的ali_token可在设置中心编辑

上级 d7efb3c5
......@@ -42,4 +42,5 @@ CATE_EXCLUDE = '首页|留言|APP|下载|资讯|新闻|动态|明星|专题|最
TAB_EXCLUDE = '猜你|喜欢|APP|下载|剧情|简介' # 动态线路名过滤
# {% if config.WALL_PAPER %}"wallpaper":"{{ config.WALL_PAPER }}",{% endif %}
SEARCH_TIMEOUT = 5000 # 聚搜超时毫秒
MULTI_MODE = 0 # 多源模式
\ No newline at end of file
MULTI_MODE = 0 # 多源模式
ALI_TOKEN = '' # 适用于初始配置的阿里云token
\ No newline at end of file
......@@ -10,7 +10,7 @@
"key":"t4",
"name":"T4",
"type":4,
"api":"https://t4.secan.icu/vod?sites=all&ali_token=xxx&timeout=10",
"api":"https://t4.secan.icu/vod?sites=all&ali_token={{ali_token}}&timeout=8",
"searchable":1,
"quickSearch":1,
"filterable":0
......
无法预览此类型文件
......@@ -188,7 +188,10 @@ def config_render(mode):
new_conf.update(store_conf_dict)
# print(type(new_conf),new_conf)
host = getHost(mode)
customConfig = getCustonDict(host)
# ali_token = lsg.getItem('ALI_TOKEN')
ali_token = new_conf.ALI_TOKEN
# print(ali_token)
customConfig = getCustonDict(host,ali_token)
# print(customConfig)
jxs = getJxs()
lsg = storage_service()
......
......@@ -18,7 +18,7 @@ class storage_service(object):
def __init__(self):
conf_list = ['LIVE_URL', 'USE_PY', 'PLAY_URL', 'PLAY_DISABLE', 'LAZYPARSE_MODE', 'WALL_PAPER_ENABLE',
'WALL_PAPER', 'UNAME', 'PWD', 'LIVE_MODE', 'CATE_EXCLUDE', 'TAB_EXCLUDE','SEARCH_TIMEOUT','MULTI_MODE']
'WALL_PAPER', 'UNAME', 'PWD', 'LIVE_MODE', 'CATE_EXCLUDE', 'TAB_EXCLUDE','SEARCH_TIMEOUT','MULTI_MODE','ALI_TOKEN']
for conf in conf_list:
if not self.hasItem(conf):
print(f'开始初始化{conf}')
......@@ -28,9 +28,9 @@ class storage_service(object):
def getStoreConf(self):
# MAX_CONTENT_LENGTH 最大上传和端口ip一样是顶级配置,无法外部修改的
conf_list = ['LIVE_URL', 'LIVE_MODE','PLAY_URL', 'PID_URL','USE_PY', 'PLAY_DISABLE', 'LAZYPARSE_MODE', 'WALL_PAPER_ENABLE',
'WALL_PAPER', 'UNAME', 'PWD', 'CATE_EXCLUDE', 'TAB_EXCLUDE','SEARCH_TIMEOUT','MULTI_MODE']
'WALL_PAPER', 'UNAME', 'PWD', 'CATE_EXCLUDE', 'TAB_EXCLUDE','SEARCH_TIMEOUT','MULTI_MODE','ALI_TOKEN']
conf_name_list = ['直播地址', '直播模式','远程地址', '进程管理链接','启用py源', '禁用免嗅', '免嗅模式', '启用壁纸', '壁纸链接', '管理账号',
'管理密码', '分类排除', '线路排除','聚搜超时','多源模式']
'管理密码', '分类排除', '线路排除','聚搜超时','多源模式','阿里tk']
conf_lists = []
for i in range(len(conf_list)):
conf = conf_list[i]
......
......@@ -90,7 +90,7 @@ def custom_merge(original:dict,custom:dict):
original[key].extend(extend_obj[key])
return original
def getCustonDict(host):
def getCustonDict(host,ali_token=''):
customFile = 'base/custom.conf'
if not os.path.exists(customFile):
with open(customFile, 'w+', encoding='utf-8') as f:
......@@ -99,7 +99,7 @@ def getCustonDict(host):
try:
with open(customFile,'r',encoding='utf-8') as f:
text = f.read()
customConfig = parseText(render_template_string(text,host=host))
customConfig = parseText(render_template_string(text,host=host,ali_token=ali_token))
except Exception as e:
logger.info(f'用户自定义配置加载失败:{e}')
return customConfig
......
......@@ -31,7 +31,41 @@ https://ide.goorm.io/my/dashboard
http://drpy.frp.muddery.com/index
```
### 群友实践教程
```shell
1.slack 选python
2.always on 打开,然后进去容器run的界面
3.依次输入如下指令:
mkdir -p /root/sd/pywork/
cd /root/sd/pywork/
wget https://gitcode.net/qq_32394351/dr_py/-/archive/master/dr_py-master.zip
echo 'export LANG="C.UTF-8"' >> /etc/profile
source /etc/profile
unzip dr_py-master.zip
mv dr_py-master dr_py
cd dr_py
pip install --upgrade pip
pip install -r requirements.txt
. ./app.sh 0
4.上方菜单选container,port那里,输入5705,生成ip和端口,复制出来就可以加个index访问了
5.上方菜单选container,port那里,输入9001,生成ip和端口,复制出来就可以管理进程了
```
#### 不同设置 搭建drpy性能对比:
真服务器>台式机>游戏本>win11笔记本>轻量云服务器>865手机>软路由>765g及以下cpu手机>goorm
\ No newline at end of file
真服务器>台式机>游戏本>win11笔记本>轻量云服务器>865手机>软路由>765g及以下cpu手机>goorm
#### 外部在线文件管理器kodbox
[app下载](http://kodcloud.com/download/)
```shell
docker run -d -p 9003:80 -v /home/pywork/kod:/var/www/html --name kod kodcloud/kodbox
# 宿主机上对应的kod文件目录
/home/pywork/kod/data/files
# 该目录数字命名的文件夹为kod登录用户的用户目录,可以通过下面命令在宿主机里查到文件路径
# 操作方法为在kod面板新建一个文件宿主机用find命令去查找
find . -iname drpy.txt
# 推荐drpy项目映射方案:
-v /home/pywork/kod/data/files/dr_py:/root/sd/pywork/dr_py
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册