File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -90,13 +90,22 @@ sudo systemctl daemon-reload
9090sudo systemctl enable ratholes@aquadx --now
9191sudo systemctl restart ratholes@aquadx
9292
93+ # Ask the user to input the localhost
94+ echo " Please input the host that the rathole server is running on (e.g. euro.prox.aquadx.net):"
95+ read -r host
96+ # Check if the host is empty
97+ if [ -z " $host " ]; then
98+ echo " Host cannot be empty"
99+ exit 1
100+ fi
101+
93102# Add to caddyfile if the "# Managed by setup_rathole.sh script" line is not found
94103if ! grep -q " # Managed by setup_rathole.sh script" /etc/caddy/Caddyfile; then
95104 cat << EOF >> /etc/caddy/Caddyfile
96105# Managed by setup_rathole.sh script
97106http:// {
98107 reverse_proxy localhost:8092 {
99- header_up AllNet-Forwarded-From "euro.prox.aquadx.net "
108+ header_up AllNet-Forwarded-From "$host "
100109 }
101110}
102111# !Managed
You can’t perform that action at this time.
0 commit comments