#!/bin/bash # 最后确认:页面在浏览器里真的能看了 set -u BASE=http://127.0.0.1:8080 PASS=$(cat /root/lanremote-relay/data/admin_password.txt 2>/dev/null) curl -s -c /tmp/ck.txt -o /dev/null --max-time 15 \ -d "username=xmz7891&password=$PASS" "$BASE/admin/login" ct() { curl -sI "$@" --max-time 15 | grep -i '^content-type' | tr -d '\r'; } echo " 管理页 Content-Type: $(ct -b /tmp/ck.txt $BASE/zhongzhuanzhan)" echo " 登录页 Content-Type: $(ct $BASE/zhongzhuanzhan)" echo " 官网 Content-Type: $(ct $BASE/)" echo " 截图 Content-Type: $(ct $BASE/shot/pc-main.png)" echo " favicon Content-Type: $(ct $BASE/favicon.ico)" echo echo " 管理页开头(应该是 ,不是被当文本):" curl -s -b /tmp/ck.txt --max-time 15 "$BASE/zhongzhuanzhan" | head -c 60 echo echo echo " HEAD 支持:" for p in "/" "/v1/health" "/favicon.ico" "/zhongzhuanzhan"; do printf " %-20s HEAD HTTP %s\n" "$p" \ "$(curl -sI -o /dev/null -w '%{http_code}' --max-time 10 "$BASE$p")" done echo echo " 公网:" for i in 1 2 3; do printf " %d: HTTP %s\n" "$i" \ "$(curl -s -o /dev/null -w '%{http_code}' --max-time 20 \ -H 'User-Agent: LanRemote/1.4.0' https://relay.xxmxxs.top/zhongzhuanzhan)" done