当前位置: 首页 > wzjs >正文

多个页面网站的制作方法搜狗网站

多个页面网站的制作方法,搜狗网站,网站建设包括什么科目,网站建设规范文章目录选择准备环境安装一键安装服务端(在公网服务器上)docker安装客户端(在本地局域网)1panel安装客户端(在本地局域网)安全配置生成默认 ca生成 frps 证书生成 frpc 的证书服务端配置客户端配置参考选择…

文章目录

  • 选择
  • 准备环境
  • 安装
    • 一键安装服务端(在公网服务器上)
    • docker安装客户端(在本地局域网)
    • 1panel安装客户端(在本地局域网)
  • 安全配置
    • 生成默认 ca
    • 生成 frps 证书
    • 生成 frpc 的证书
  • 服务端配置
  • 客户端配置
  • 参考

选择

截至2025年,nps四年没维护了:https://github.com/ehang-io/nps

主流方案:https://github.com/fatedier/frp

准备环境

需要一台公网服务器
需要一个域名,并提供泛域名解析。

安装

一键安装服务端(在公网服务器上)

https://github.com/MvsCode/frps-onekey

wget https://gitee.com/mvscode/frps-onekey/raw/master/install-frps.sh -O ./install-frps.sh
chmod 700 ./install-frps.sh
./install-frps.sh install

frps安装路径:/usr/local/frps

frps status manage : frps {start|stop|restart|status|config|version}
Example:start: frps startstop: frps stop
restart: frps restart

docker安装客户端(在本地局域网)

docker run --restart=always --network host -d -v ~/frpc.ini:/etc/frp/frpc.ini --name frpc snowdreamtech/frpc

1panel安装客户端(在本地局域网)

略,很简单

安全配置

自定义 TLS 协议加密

cat > my-openssl.cnf << EOF
[ ca ]
default_ca = CA_default
[ CA_default ]
x509_extensions = usr_cert
[ req ]
default_bits        = 2048
default_md          = sha256
default_keyfile     = privkey.pem
distinguished_name  = req_distinguished_name
attributes          = req_attributes
x509_extensions     = v3_ca
string_mask         = utf8only
[ req_distinguished_name ]
[ req_attributes ]
[ usr_cert ]
basicConstraints       = CA:FALSE
nsComment              = "OpenSSL Generated Certificate"
subjectKeyIdentifier   = hash
authorityKeyIdentifier = keyid,issuer
[ v3_ca ]
subjectKeyIdentifier   = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints       = CA:true
EOF

生成默认 ca

openssl genrsa -out ca.key 2048
openssl req -x509 -new -nodes -key ca.key -subj "/CN=domain.com" -days 36500 -out ca.crt

生成 frps 证书

openssl genrsa -out server.key 2048openssl req -new -sha256 -key server.key \-subj "/C=XX/ST=DEFAULT/L=DEFAULT/O=DEFAULT/CN=domain.com" \-reqexts SAN \-config <(cat my-openssl.cnf <(printf "\n[SAN]\nsubjectAltName=DNS:localhost,IP:127.0.0.1,DNS:domain.com")) \-out server.csropenssl x509 -req -days 365 -sha256 \-in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial \-extfile <(printf "subjectAltName=DNS:localhost,IP:127.0.0.1,DNS:domain.com") \-out server.crt

生成 frpc 的证书

openssl genrsa -out client.key 2048
openssl req -new -sha256 -key client.key \-subj "/C=XX/ST=DEFAULT/L=DEFAULT/O=DEFAULT/CN=domain.com" \-reqexts SAN \-config <(cat my-openssl.cnf <(printf "\n[SAN]\nsubjectAltName=DNS:localhost,IP:127.0.0.1,DNS:domain.com")) \-out client.csropenssl x509 -req -days 365 -sha256 \-in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial \-extfile <(printf "subjectAltName=DNS:localhost,DNS:domain.com") \-out client.crt

服务端配置

将上面生成好的文件放到/usr/local/frps/ssl/

nano /usr/local/frps/frps.toml 
transport.tls.certFile = "/usr/local/frps/ssl/server.crt"
transport.tls.keyFile = "/usr/local/frps/ssl/server.key"
transport.tls.trustedCaFile = "/usr/local/frps/ssl/ca.crt"

客户端配置

将上面生成好的文件放到/etc/frp/ssl/

serverAddr = 
serverPort = auth.method = "token"
auth.token = "xxxxxx"webServer.addr = "0.0.0.0"
webServer.port = 8080
webServer.user = "xxxxxx"
webServer.password = "xxxxxx"
webServer.pprofEnable = false# tls
transport.tls.certFile = "/etc/frp/ssl/client.crt"
transport.tls.keyFile = "/etc/frp/ssl/client.key"
transport.tls.trustedCaFile = "/etc/frp/ssl/ca.crt"[[proxies]]
name = "ha"
type = "https"
localPort = 443
localIP = "192.168.141.250"
subdomain = "ha"
transport.useEncryption = true
transport.useCompression = true[[proxies]]
name = "freshrss"
#type = "https"
#localPort = 443
type = "http"
localPort = 80
localIP = "192.168.170.1"
subdomain = "freshrss"
transport.useEncryption = true
transport.useCompression = true[[proxies]]
name = "wol"
type = "http"
localPort = 9090
localIP = "192.168.255.254"
subdomain = "wol"
transport.useEncryption = true
transport.useCompression = true

参考

https://shaonianzhentan.github.io/ha-docs/#/install_frpc

http://www.dtcms.com/wzjs/88736.html

相关文章:

  • 为企业建网站营销型企业网站制作
  • 网站建设开发计划书如何利用seo赚钱
  • 装企网站建设山西seo排名
  • 东莞企业网站建设什么平台可以发广告引流
  • wordpress主题不显示衡阳seo快速排名
  • 苏州网站制作最近三天的新闻大事简短
  • 河南网站开发阻断艾滋病的药有哪些
  • 青浦赵巷网站建设seo搜索优化技术
  • 丹麦网站后缀地推网推平台
  • 微信红包网站制作长沙seo工作室
  • 微商城网站建设价位贵州seo培训
  • 建筑图纸字母代号大全抖音seo优化系统招商
  • 学做美食的网站视频seo如何提升排名收录
  • 宿迁房产网丫丫找房南京网站设计优化公司
  • 2015年做哪个网站能致富百度 营销推广怎么操作
  • 网站制作真人游戏娱乐平台怎么做杭州网站seo推广软件
  • 工信部 网站备案查询今日实时热点新闻事件
  • 怎么做新闻网站河北seo基础入门教程
  • 北京建设教育协会官方网站外贸网站建设设计方案
  • 网站集约化 建设方案平台推广引流
  • 网站专题优化如何创建自己的卡网
  • 找个人做网站开不出发票怎么办网店怎么开
  • 竞拍网站做烂了百度收录提交申请
  • 织梦上网站次导航怎么做百度网盘在线观看资源
  • 学校网站作用站长网站推广
  • 长春网站建设制作服装营销方式和手段
  • 导航网站搭建网址注册
  • 厦门建设网站首页今日国内新闻最新消息
  • 弄淘宝招牌图什么网站可以做网站百度不收录
  • 永春政府网站建设情况深圳正规seo