安装使用frp
2022-06-21 程序界 1479
准备:
https://github.com/fatedier/frp/releases
frp: wget https://github.com/fatedier/frp/releases/download/v0.43.0/frp_0.43.0_linux_amd64.tar.gz tar -xvf frp_0.43.0_linux_amd64.tar.gz -C /usr/local/ mv /usr/local/frp_0.43.0_linux_amd64/ /usr/local/frp_server cd /usr/local/frp_server/ ./frps -c frps.ini # frps.ini [common] bind_addr = 0.0.0.0 bind_port = 7000 # Virtual host configuration vhost_http_port = 80 vhost_https_port = 443 # Dashboard configuration dashboard_addr = 0.0.0.0 dashboard_port = 7500 dashboard_user = xxxxx dashboard_pwd = 12345678 # logs log_file = ./frps.log log_level = info log_max_days = 3 # auth token token = xxxtokenxx max_pool_count = 5 max_ports_per_client = 0 authentication_timeout = 900 tcp_mux = true ####################################################### vi /usr/lib/systemd/system/frps.service [Unit] Description=frp server After=network.target [Service] Type=simple ExecStart=/usr/local/frp_server/frps -c /usr/local/frp_server/frps.ini ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID [Install] WantedBy=multi-user.target systemctl enable frps systemctl start frps.service systemctl status frps systemctl restart frps.service frp 后台 http://xxx.xxx.com:7500/ # 前台启动 # 下载windows版本 frp frpc.exe -c frpc.ini #frpc.ini [common] server_addr = xxx.xxx.xxx.xxx # 192.168.22.23 server_port = 7000 token = xxxtokenxx [web] type = http local_port = 80 custom_domains = x.xxxx.com [https] type = https local_port = 443 custom_domains = x.xxxx.com # 以下为https新加的内容 plugin = https2http #将 https请求转换成http请求后再发送给本地服务 plugin_local_addr = 127.0.0.1:8000 #转换http后的端口 #证书相关配置 plugin_crt_path = C:\Users\Administrator\Desktop\test.test.com\fullchain1.crt #linux下生成的证书为fullchain.pem格式,复制到Windows上改成.crt后缀即可 plugin_key_path = C:\Users\Administrator\Desktop\test.test.com\privkey1.key #linux下生成的证书为privkey.pem格式,复制到Windows上改成.key后缀即可 plugin_host_header_rewrite = 127.0.0.1 plugin_header_X-From-Where = frp
很赞哦! (0)
相关文章
文章评论
-
-
-
0条评论