Skip to content
This repository was archived by the owner on Feb 4, 2024. It is now read-only.

Commit 2e21cee

Browse files
committed
new: allow users to connect with IP
1 parent 22d00ce commit 2e21cee

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

caddy/Caddyfile.template

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
%DOMAINS%
1+
http://, https:// {
2+
tls{
3+
on_demand
4+
}
5+
6+
reverse_proxy /%PROXY_PATH%/* localhost:9000
7+
8+
reverse_proxy https://%DECOY_DOMAIN% {
9+
header_up Host %DECOY_DOMAIN%
10+
}
11+
12+
}
13+
14+
%DOMAINS% {
215

316
# Compress responses according to Accept-Encoding headers
417
encode gzip zstd
@@ -7,5 +20,8 @@ encode gzip zstd
720
# Send API requests to backend
821
reverse_proxy /%PROXY_PATH%/* localhost:9000
922

10-
reverse_proxy %DECOY_DOMAIN%
23+
reverse_proxy https://%DECOY_DOMAIN% {
24+
header_up Host %DECOY_DOMAIN%
25+
}
1126

27+
}

menu.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ OPTIONS=(status "View status of system"
1212
install "Reinstall"
1313
upgrade "Upgrade "
1414
uninstall "Uninstall"
15+
admin "Show admin link"
1516
)
1617

1718
CHOICE=$(dialog --clear \
@@ -24,4 +25,10 @@ CHOICE=$(dialog --clear \
2425

2526
clear
2627

27-
bash $CHOICE.sh
28+
if [[ "$CHOICE" == "" ]];then
29+
exit
30+
elif [[ "$CHOICE" == "admin" ]];then
31+
(cd hiddify-panel; python3 -m hiddifypanel admin-links)
32+
else
33+
bash $CHOICE.sh
34+
fi

0 commit comments

Comments
 (0)