当前位置: 首页 > 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/792243.html

相关文章:

  • 网站 如何添加备案号seo排名赚app官网
  • 外汇跟单社区网站开发厦门淘宝网站设计公司
  • 免费推广网站平台排名游戏建设网站
  • 三合一模板网站2.2 网站建设的流程
  • 网站制作是怎么学的湛江专业的建站软件
  • 网站名百度搜不到山东网页设计公司
  • 网站维护和制作怎么做会计分录如何选择赣州网站建设
  • 广州微信网站建设61制作工厂网站
  • 网站建设这块是怎么挣钱平台网站兼职做sap
  • 高端网站设计多少钱wordpress改文字大小
  • 泉州做网站公司做网站能用假图片吗
  • 柳州哪家公司做网站好建设网站费用吗
  • 网站做三个月收录100wordpress设置导航
  • 什么云的网站开发平台百度网站优化排名
  • 购物网站建站系统企业网站的建设要注意哪些方面
  • 在福州的网站制作公司wordpress主题文章形式
  • 电子政务门户网站建设汇报靖江网站
  • 休闲采摘园网站建设做签名的网站
  • 甜品网站首页设计中国人做外贸生意的网站
  • 宁波建设网网点为什么打开网址都是seo综合查询
  • 网站上的通话功能怎么做专业做网站联系电话
  • 南京市住房和城乡建设网站长春建站网站
  • 昆山网站制作网页编辑模式快捷键
  • 用自己的计算机做服务器建网站支付宝也做网站吗
  • 北京建站公司哪个好网站12栅格系统怎么做
  • 以下不属于网站建设优化网站建设方案应该怎么写
  • 精品课程网站设计代码做公司网站报价
  • 欧美平面设计网站哪个公司做网站好
  • 高端求职网站排名网站制作的公
  • 有什么做动图比较方便的网站wordpress主页导航