Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
荒野大飞
dr_py
提交
da6b7104
dr_py
项目概览
荒野大飞
/
dr_py
与 Fork 源项目一致
Fork自
晚风拂柳颜 / dr_py
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
dr_py
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
da6b7104
编写于
9月 21, 2022
作者:
H
hjdhnx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加t4的ali_token可在设置中心编辑
上级
d7efb3c5
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
48 addition
and
10 deletion
+48
-10
base/config.py
base/config.py
+2
-1
base/custom.conf
base/custom.conf
+1
-1
base/rules.db
base/rules.db
+0
-0
controllers/home.py
controllers/home.py
+4
-1
controllers/service.py
controllers/service.py
+3
-3
utils/files.py
utils/files.py
+2
-2
道长乱说.md
道长乱说.md
+36
-2
未找到文件。
base/config.py
浏览文件 @
da6b7104
...
...
@@ -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
base/custom.conf
浏览文件 @
da6b7104
...
...
@@ -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
...
...
base/rules.db
浏览文件 @
da6b7104
无法预览此类型文件
controllers/home.py
浏览文件 @
da6b7104
...
...
@@ -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
()
...
...
controllers/service.py
浏览文件 @
da6b7104
...
...
@@ -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
]
...
...
utils/files.py
浏览文件 @
da6b7104
...
...
@@ -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
...
...
道长乱说.md
浏览文件 @
da6b7104
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录