找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 3046|回复: 9

FRP穿透不能实现二级域名解析的问题

[复制链接]
本帖最后由 lazy7811 于 2019-1-2 22:06 编辑

首先感谢H大、Clang及各位大佬在技术上的无私分享!

元旦期间按照clang老大的帖子设置了FRP,服务器是搬娃工BWG自己买的,客户端装在新三路由器(固件是H大的pavanda),服务器端和客户端FRP版本都是0.22(服务器端是在Clang老大一建安装后自己再升级到0.22的)。服务器frps和客户端frc的设置情况如下:


BWG服务器端(FRPS):
[common]
# A literal address or host name for IPv6 must be enclosed
# in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80"
bind_addr = 0.0.0.0
bind_port = 7000
# udp port used for kcp protocol, it can be same with 'bind_port'
# if not set, kcp is disabled in frps
kcp_bind_port = 7001
# if you want to configure or reload frps by dashboard, dashboard_port must be set
dashboard_port = 9999
# dashboard assets directory(only for debug mode)
dashboard_user = admin
dashboard_pwd = admin
subdomain_host = r***n.xyz
# assets_dir = ./static
vhost_http_port = 8080
vhost_https_port = 8443
# console or real logFile path like ./frps.log
log_file = ./frps.log
# debug, info, warn, error
log_level = info
log_max_days = 3
# auth token
token = *26GSm42lxAJeSZk
# only allow frpc to bind ports you list, if you set nothing, there won't be any limit
#allow_ports = 1-65535
# pool_count in each proxy will change to max_pool_count if they exceed the maximum value
max_pool_count = 50
# if tcp stream multiplexing is used, default is true
tcp_mux = true

路由器客户端(FRPC):
#!/bin/sh
export PATH='/etc/storage/bin:/tmp/script:/etc/storage/script:/opt/usr/sbin:/opt/usr/bin:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin'
export LD_LIBRARY_PATH=/lib:/opt/lib
killall frpc frps
mkdir -p /tmp/frp
#启动frp功能后会运行以下脚本
#frp项目地址教程:
#请自行修改 token 用于对客户端连接进行身份验证
# IP查询:

cat > "/tmp/frp/myfrpc.ini" <<-\EOF
# ==========客户端配置:==========
[common]
server_addr = 97.*.*.243
server_port = 7000
token = *26GSm42lxAJeSZk

#log_file = /dev/null
#log_level = info
#log_max_days = 3

[web_kod]
remote_port = 8088
type = http
local_ip = 192.168.123.1
local_port = 88
subdomain = kod

[web_php]
remote_port = 8081
type = http
local_ip = 192.168.123.1
local_port = 81
subdomain = php   #二级访问域名

[web_nas]
remote_port = 5000
type = http
local_ip = 192.168.123.199
local_port = 5000
subdomain = nas   #二级访问域名

EOF


打开r***n.xyz:9999,frp运行监控网页,显示如下

        web_php        8080        0        0 bytes        0 bytes        online

        web_nas        8080        0        0 bytes        0 bytes        online

        web_kod        8080        0        0 bytes        0 bytes        online



现在的问题是:
0.浏览器输入kod.r***n.xyz:8080,可以正常访问(只有这一种情况是正常的)
1. 输入kod.r***n.xyz:8088 ,不能访问
2. 输入kod.r***n.xyz,不能访问
3. 输入php.r***n.xyz:8080,不能访问
4. 输入php.r***n.xyz:8081,不能访问
5.输入php.r***n.xyz, 不能访问
6. 输入nas.r***n.xyz:8080,不能访问
7. 输入nas.r***n.xyz:5000,不能访问
8.输入nas.r***n.xyz, 不能访问

请教各位大大能帮助小弟解决这个问题,先谢谢了!



域名设置:
[td]
记录类型        主机记录        解析线路(isp)        记录值        MX优先级        TTL        状态        操作

        A        *        默认        97.*.*.243        --        10 分钟        正常        修改暂停删除备注

        A        @        默认        97.*.*.243        --        10 分钟        正常        修改暂停删除备注


我的恩山、我的无线 The best wifi forum is right here.
你用的是3322的域名吗,好像不支持自定义二级域名!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

本帖最后由 robertlovesanna 于 2019-1-24 14:37 编辑

1. 只要是type=http, 因为你FR服务端FRPS已经设置了vhost_http_port = 8080, 你的客户端FRPC的关于http穿透要设置的remote_port就必须为指定端的端口8080,而不能是其它; 2. r***n.xyz域名要在域名服务端创建A记录,指向你的FRP服务器,  3. 所有FRP服务端的工作相关端口,VPS都要防火墙放行打开端口 , 请先参考我之前发过的小白贴子
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

请问能给个clang老大的frp设置链接吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

我也是同样的问题,搞来搞去都不行,只有跟端口号才可以,不能只是二级域名
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

3楼正解,端口号统一为:8080
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

请问一下H大的固件pavanda的frpc客户端怎么更换?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

我是在PC端没有填remote_port,只填了local_port
然后PS端是vhost_http_port = 80 和vhost_https_port = 443
这样只需要XXX.域名 就能访问
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

楼主解决了吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

解决了么兄弟?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-5-1 15:03

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表