大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。
Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺
说明
- Linux搭建frp实现内网穿透
操作步骤
-
安装步骤省略(下载解压拷贝到server服务器和client服务器完事)具体移步:github
- 注意程序文件需要追加可执行权限!
- 注意相关端口放行!
-
服务端配置文件:frps.ini
[common] bind_port = 7777 authentication_method = token token = 12345678 tls_only = true kcp_bind_port = 7777 max_pool_count = 10 log_file = /path/to/frp/frps.log ### trace, debug, info, warn, error log_level = error log_max_days = 3 # allow_ports = 1,4-5 vhost_http_port = 80 vhost_https_port = 443 dashboard_port = 10 dashboard_user = admin dashboard_pwd = 12345678
-
客户端配置文件:frpc.ini
[common] server_addr = 8.8.8.8 server_port = 7777 tls_enable = true token = 12345678 protocol = kcp # pool_count = 5 log_file = /root/frp/frpc.log log_level = trace log_max_days = 3 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 1 [http:test] type = http local_ip = 127.0.0.1 local_port = 80 custom_domains = test.top proxy_protocol_version = v2 [https:test] type = https local_port = 443 custom_domains = test.top proxy_protocol_version = v2 use_encryption = true use_compression = true #plugin = https2http #plugin_local_addr = 127.0.0.1:80 #plugin_crt_path = /path/to/test.pem #plugin_key_path = /path/to/test.key #plugin_host_header_rewrite = test.top #plugin_header_X-From-Where = frp
-
服务端开机自启动
# 添加系统服务 sudo vim /lib/systemd/system/frps.service # 服务内容 [Unit] Description=frps service After=network.target syslog.target Wants=network.target [Service] Type=simple ExecStart=/path/to/frp/frps -c /path/to/frp/frps.ini [Install] WantedBy=multi-user.target # 启动 sudo systemctl start frps # 开机启动 sudo systemctl enable frps # 其它命令 sudo systemctl restart frps sudo systemctl stop frps sudo systemctl status frps
-
客户端开机自启动
# 添加系统服务 sudo vim /lib/systemd/system/frpc.service # 服务内容 [Unit] Description=frpc service After=network.target syslog.target Wants=network.target [Service] Type=simple ExecStart=/path/to/frp/frpc -c /path/to/frp/frpc.ini [Install] WantedBy=multi-user.target # 启动 sudo systemctl start frpc # 开机启动 sudo systemctl enable frpc # 其它命令 sudo systemctl restart frpc sudo systemctl stop frpc sudo systemctl status frpc
-
定时任务,每天定时重启server和client
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/194445.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...