2

付费咨询 frps 设置

 9 months ago
source link: https://www.v2ex.com/t/966380
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  问与答

付费咨询 frps 设置

  sudoy · 3 小时 40 分钟前 · 398 次点击

需求:我在 frps 启用了subdomain_host,并且将 *.example.com 解析到我的云服务器(假设 5.6.7.8 )。这样一来,任何人只要有我的云服务器 IP 、frps 端口以及 token ,都能通过自定义的二级域名(如 test1.example.com )将本地暴露在公网。我现在需要在 frps 那里设置域名和二级域名白名单,只有白名单里的域名和二级域名才能使用我的反代服务。

我用 cloudflare 作为 DNS 管理并且开启了代理(橙色的云朵),因此,我所有的二级域名自带 https ,并且可以正常访问所有内网 web 服务。我刚才试了用 nginx 来创建域名白名单,但是无法正常访问内网 web 服务。我需要不影响 cloudflare 免费 ssl 使用,同时能在 frps 那里启用白名单。

FRPS 和 FRPC 配置如下:

# frps.ini
[common]
bind_port = 7000
vhost_http_port = 80
subdomain_host = example.com
token = test123

[common]
server_addr = 5.6.7.8
server_port = 7000
authentication_method = token
token = test123

[web1]
type = http
local_ip = 127.0.0.1
local_port = 8080
subdomain = web1
custom_domains = customer.com
authentication_method = token
token = test123

在上面这个配置里面,假设某个不认识的人,知道了我的服务器 IP 5.6.7.8 、端口 7000 以及 token test123 ,他就能免费用我的反代服务。我想限制只有我授权的域名和二级域名才能用我的反代服务。

有解决访问的老哥,请加我微信报价,我的预算是 100RMB

IMG

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK