frp 不能远程访问小米路由器页面
資深大佬 : sherlock1122 28
之前一直访问不了,也没有细究,以为是 frp 的问题。昨晚测试了一下,小米路由器严格检查 http 请求的 HOST 字段,如果是非局域网内的机器,就直接不响应了,或者响应重定向。
“`
[email protected]:~# curl -H “Host: baidu.com:123” 192.168.50.1 -v
> GET / HTTP/1.1
> Host: baidu.com:123
> User-Agent: curl/7.77.0
> Accept: */*
>
直接卡住了……
[email protected]:~# curl -H “Host: 192.168.50.3” 192.168.50.1 -v
> GET / HTTP/1.1
> Host: 192.168.50.3
> User-Agent: curl/7.77.0
> Accept: */*
>
< HTTP/1.1 502 Bad Gateway
< Server: nginx/1.12.2
< Date: Wed, 01 Dec 2021 04:50:45 GMT
< Content-Type: text/html; charset=UTF-8
< Content-Length: 173
< Connection: close
[email protected]:~# curl -H “Host: 192.168.50.2” 192.168.50.1 -v
> GET / HTTP/1.1
> Host: 192.168.50.2
> User-Agent: curl/7.77.0
> Accept: */*
>
< HTTP/1.1 403 Forbidden
< Server: nginx/1.12.2
< Date: Wed, 01 Dec 2021 04:54:37 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: close
< Cache-Control: no-cache
< Pragma: no-cache
< Expires: 0
<
<!DOCTYPE html>
<html lang=”zh-cn”>
<head>
<meta charset=”utf-8″>
<title>OpenWrt – LuCI</title>
“`
[email protected]:~# curl -H “Host: baidu.com:123” 192.168.50.1 -v
> GET / HTTP/1.1
> Host: baidu.com:123
> User-Agent: curl/7.77.0
> Accept: */*
>
直接卡住了……
[email protected]:~# curl -H “Host: 192.168.50.3” 192.168.50.1 -v
> GET / HTTP/1.1
> Host: 192.168.50.3
> User-Agent: curl/7.77.0
> Accept: */*
>
< HTTP/1.1 502 Bad Gateway
< Server: nginx/1.12.2
< Date: Wed, 01 Dec 2021 04:50:45 GMT
< Content-Type: text/html; charset=UTF-8
< Content-Length: 173
< Connection: close
[email protected]:~# curl -H “Host: 192.168.50.2” 192.168.50.1 -v
> GET / HTTP/1.1
> Host: 192.168.50.2
> User-Agent: curl/7.77.0
> Accept: */*
>
< HTTP/1.1 403 Forbidden
< Server: nginx/1.12.2
< Date: Wed, 01 Dec 2021 04:54:37 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: close
< Cache-Control: no-cache
< Pragma: no-cache
< Expires: 0
<
<!DOCTYPE html>
<html lang=”zh-cn”>
<head>
<meta charset=”utf-8″>
<title>OpenWrt – LuCI</title>
大佬有話說 (13)