Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

反向代理优化 #682

Merged
merged 2 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/alist/init.d/alist.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ app_start(){

app_stop(){
echo "dztasks stopped"
ps -ef| grep alist | grep -v grep | grep -v python | grep -v sh | awk '{print $2}'| xargs kill
ps -ef| grep alist | grep -v grep | grep -v python | grep -v sh | awk '{print $2}'| xargs kill -9
}


Expand Down
15 changes: 8 additions & 7 deletions web/utils/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -1489,13 +1489,14 @@ def setProxy(self, site_name, site_from, to, host, name, open_proxy, open_cors,
return mw.returnData(False, "错误的目标地址!")

# get host from url
try:
if host == "$host":
host_tmp = urlparse(to)
host = host_tmp.netloc

except Exception as e:
return mw.returnData(False, "错误的目标地址")
# try:
# if host == "$host":
# host_tmp = urlparse(to)
# host = host_tmp.netloc

# except Exception as e:
# return mw.returnData(False, "错误的目标地址")
# print(host)

proxy_site_path = self.getProxyDataPath(site_name)
data_content = mw.readFile(proxy_site_path) if os.path.exists(proxy_site_path) else ""
Expand Down
Loading