-
Notifications
You must be signed in to change notification settings - Fork 296
/
env
144 lines (124 loc) · 4.3 KB
/
env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
sh_debug=false
monitor=false
export LANGUAGE=
export LC_ALL=
export LANG=en_US.UTF-8
red='\033[31m'
green='\033[32m'
yellow='\033[33m'
cyan='\033[36m'
white='\033[37m'
blue='\033[94m'
normal='\033[0m'
dim_underlined='\033[37;4;2m'
indent_6='\r\033[6C'
indent_20='\r\033[20C'
# files
SH_LINK=https://woniuzfb.github.io/iptv/iptv.sh
AIOS_PREFIX=/usr/local
SH_FALLBACK=cn.epub.fun
SH_FILE="$AIOS_PREFIX"/bin/tv
i18n_FILE="$AIOS_PREFIX"/bin/tv-i18n
OR_FILE="$AIOS_PREFIX"/bin/or
NX_FILE="$AIOS_PREFIX"/bin/nx
XC_FILE="$AIOS_PREFIX"/bin/cx
ARM_FILE="$AIOS_PREFIX"/bin/arm
PVE_FILE="$AIOS_PREFIX"/bin/pve
LOG_FILE="$HOME"/iptv.log
JQ_FILE="$AIOS_PREFIX"/bin/jq
YQ_FILE="$AIOS_PREFIX"/bin/yq
FFMPEG_FILE="$AIOS_PREFIX"/bin/ffmpeg
FFPROBE_FILE="$AIOS_PREFIX"/bin/ffprobe
CURL_IMPERSONATE_FILE="$AIOS_PREFIX"/bin/curl-impersonate
# backup
BACKUP_ROOT="$HOME"/iptv_sh_backup
# FFmpeg
FFMPEG_ROOT="$HOME"
# node
NODE_ROOT="$HOME"/iptv_sh_node
NODE_SCRIPTS_LINK=https://raw.githubusercontent.com/woniuzfb/iptv/main/scripts
NODE_TOUTIAO_VER=1.0.0
# iptv
IPTV_ROOT="$AIOS_PREFIX"/iptv
FFMPEG_LOG_ROOT="$IPTV_ROOT"/ffmpeg
FFMPEG_MIRROR_LINK=http://pngquant.com/ffmpeg
FFMPEG_MIRROR_ROOT="$IPTV_ROOT"/ffmpeg
LOCK_FILE="$IPTV_ROOT"/lock
CHANNELS_FILE="$IPTV_ROOT"/channels.json
MONITOR_LOG="$IPTV_ROOT"/monitor.log
LOGROTATE_CONFIG="$IPTV_ROOT"/logrotate
CRON_FILE="$IPTV_ROOT"/cron
XTREAM_CODES="$IPTV_ROOT"/xtream_codes
XTREAM_CODES_EXAM="$IPTV_ROOT"/xtream_codes_exam
IP_DENY="$IPTV_ROOT"/ip.deny
IP_LOG="$IPTV_ROOT"/ip.log
LIVE_ROOT="$IPTV_ROOT"/live
VIP_FILE="$IPTV_ROOT"/vip.json
VIP_CHANNELS_LINK="$FFMPEG_MIRROR_LINK"/vip_channels.json
VIP_CHANNELS_FILE="$IPTV_ROOT"/vip_channels.json
VIP_ROOT="$IPTV_ROOT"/vip
VIP_USERS_ROOT="$VIP_ROOT"/users
C_ROOT="$IPTV_ROOT"/c
MD5SUM_FILE="$C_ROOT"/md5sum
MD5SUM_LINK=https://raw.githubusercontent.com/woniuzfb/iptv/main/scripts/md5sum.c
MD5SUM_LINK_FALLBACK="$FFMPEG_MIRROR_LINK"/md5sum.c
DEFAULT_DEMOS=default.json
TS_CHANNELS=channels.json
XTREAM_CODES_CHANNELS=xtream_codes
USER_AGENT_BROWSER="Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
USER_AGENT_TV="Mozilla/5.0 (QtEmbedded; U; Linux; C) AppleWebKit/533.3 (KHTML, like Gecko) MAG200 stbapp ver: 2 rev: 250 Safari/533.3"
USER_AGENT_PHONE="iPhone; CPU iPhone OS 15_2 like Mac OS X"
# v2ray
V2_FILE="$AIOS_PREFIX"/bin/v2
V2_LINK=https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
V2_LINK_FALLBACK="$FFMPEG_MIRROR_LINK"/v2ray_install-release.sh
V2CTL_FILE="$AIOS_PREFIX"/bin/v2ctl
V2_CONFIG="$AIOS_PREFIX"/etc/v2ray/config.json
# xray
X_FILE="$AIOS_PREFIX"/bin/x
X_CONFIG="$AIOS_PREFIX"/etc/xray/config.json
# cloudflare
CF_FILE="$AIOS_PREFIX"/bin/cf
CF_CONFIG="$HOME"/cloudflare.json
CF_WORKERS_ROOT="$HOME"/workers
CF_WORKERS_FILE="$CF_WORKERS_ROOT"/cloudflare_workers.py
CF_WORKERS_LINK=https://raw.githubusercontent.com/woniuzfb/iptv/main/scripts/cloudflare_workers.py
CF_WORKERS_LINK_FALLBACK="$FFMPEG_MIRROR_LINK"/cloudflare_workers.py
STREAM_PROXY_LINK=https://raw.githubusercontent.com/woniuzfb/iptv/main/scripts/stream_proxy.js
STREAM_PROXY_LINK_FALLBACK="$FFMPEG_MIRROR_LINK"/stream_proxy.js
XTREAM_CODES_PROXY_LINK=https://raw.githubusercontent.com/woniuzfb/iptv/main/scripts/xtream_codes_proxy.js
XTREAM_CODES_PROXY_LINK_FALLBACK="$FFMPEG_MIRROR_LINK"/xtream_codes_proxy.js
# ibm cf
IBM_FILE="$AIOS_PREFIX"/bin/ibm
IBM_APPS_ROOT="$HOME"/ibm_apps
IBM_CONFIG="$HOME"/ibm.json
# Services
SERVICES_ROOT="$HOME"/iptv_sh_services
SERVICES_CONFIG="$SERVICES_ROOT"/config.json
# depends
DEPENDS_ROOT="$SERVICES_ROOT"/depends
AIOS_LINK=https://github.com/woniuzfb/iptv
# Alist
ALIST_FILE="$AIOS_PREFIX"/bin/ali
ALIST_ROOT="$SERVICES_ROOT"/alist
ALIST_LINK=https://github.com/alist-org/alist
ALIST_LINK_FALLBACK="$FFMPEG_MIRROR_LINK"/alist
# LianHuanHua
LIANHUANHUA_FILE="$AIOS_PREFIX"/bin/lhh
LIANHUANHUA_ROOT="$SERVICES_ROOT"/lianhuanhua
LIANHUANHUA_CONFIG="$LIANHUANHUA_ROOT"/config.json
# Rclone
RCLONE_FILE="$AIOS_PREFIX"/bin/rc
RCLONE_ROOT="$SERVICES_ROOT"/rclone
# Calibre
CALIBRE_FILE="$AIOS_PREFIX"/bin/cw
CALIBRE_ROOT="$SERVICES_ROOT"/calibre
# Kcc
KCC_ROOT="$CALIBRE_ROOT"/kcc
KCC_FILE="$KCC_ROOT"/kcc-c2e.py
# docker
DOCKER_FILE="$AIOS_PREFIX"/bin/dr
DOCKER_ROOT="$SERVICES_ROOT"/docker
DOCKER_CONFIG="$SERVICES_ROOT"/docker/docker-compose.yml
# HAProxy
HAPROXY_FILE="$AIOS_PREFIX"/bin/ha