零号智能

  • Python
  • 部署
  • go
  • VPS
  • 运维
  • 生活琐事
  • html
零号智能
Fantasia's blog npc0.com.
  1. 首页
  2. 部署
  3. 正文

FRP服务折腾记

2020年7月10日 13304点热度 0人点赞 3条评论

请注意:本次FRP服务折腾失败,成果(HTTP可以访问,可以获得客户端ip地址,HTTPS可以访问,但是没法获得ip地址),由于防火墙https拦截cc攻击,把HTTPS的用户都拦截下来,故本次参试宣布失败。不介意https的可以使用本配置。
pre配置简写

[www80]
privilege_mode = true
type = http
local_ip = 127.0.0.1
local_port = 80
custom_domains = www.npc0.com
use_encryption = true
use_compression = true
proxy_protocol_version = v2 
[www_https]
privilege_mode = true
type = https
local_ip = 127.0.0.1
local_port = 443
custom_domains = www.npc0.com
use_encryption = true
use_compression = true
proxy_protocol_version = v2

nginx配置:

listen 80 proxy_protocol;
listen 443 ssl proxy_protocol http2; 
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;
real_ip_recursive off;

当然如果FRP服务端是你自己配置的,那么可以在FRP之前加个nginx,所有域名和相关证书在nginx中配置好,然后nginx代理到FRP的http端口(此处FRP的http务必不能用80和443端口);
nginx反向代理

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Frame-Options DENY;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:frp的端口;
}
本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2021年5月22日

vpc

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

  • sikis

    Very good post! We will be linking to this great content on our site. Sherilyn Kaiser Kwok

    2020年12月17日
    回复
  • erotik

    Utterly written subject matter, regards for selective information . Ainslie Glynn Grani

    2020年12月18日
    回复
  • bluray

    For the reason that the admin of this web site is working, no doubt very shortly it will be famous, due to its feature contents. Veriee Gasper Cedric

    2020年12月21日
    回复
  • razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
    取消回复

    COPYRIGHT © 2021 npc0.com. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang

    粤ICP备19157245号-1

    粤公网安备 44030702002746号