frp 是一个专注于内网穿透的高性能的反向代理应用,支持 TCP、UDP、HTTP、HTTPS 等多种协议,且支持 P2P 通信。可以将内网服务以安全、便捷的方式通过具有公网 IP 节点的中转暴露到公网。
项目地址:https://github.com/fatedier/frp
docker https://github.com/snowdreamtech/frp?tab=readme-ov-file
下载:点击下载
[common] server_addr = 127.0.0.1 server_port = 7000 token = password login_fail_exit = true dns_server = 127.0.0.153 [plugin_http_proxy] type = tcp remote_port = 22 plugin = http_proxy plugin_http_user = a plugin_http_passwd = b [plugin_socks5] type = tcp remote_port = 11 plugin = socks5 plugin_user = a plugin_passwd = b
[common] bind_port = 7000 kcp_bind_port = 7000 detailed_errors_to_client = true authentication_method = token token = password
创建frpc.service
将文件复制到/usr/lib/systemd/system/
[Unit] Description=Frp Client Service After=network.target [Service] Type=simple User=nobody Restart=on-failure RestartSec=5s ExecStartPre=/bin/sleep 10 ExecStart=/etc/frp/frpc -c /etc/frp/frpc.ini ExecReload=/etc/frp/frpc reload -c /etc/frp/frpc.ini [Install] WantedBy=multi-user.target
创建frps.service
将文件复制到/usr/lib/systemd/system/
[Unit] Description=Frp Server Service After=network.target [Service] Type=simple User=nobody Restart=on-failure RestartSec=5s ExecStart=/etc/frp/frps -c /etc/frp/frps.ini ExecReload=/etc/frp/frps reload -c /etc/frp/frps.ini [Install] WantedBy=multi-user.target
cp *.service /usr/lib/systemd/system/
systemctl enable frps
systemctl enable frpc
systemctl start frps
systemctl start frpc