您现在的位置是:首页 > 服务器相关

frps配合openvpn

batsom2021-05-24服务器相关

简介frps openvpn

frps配置文件:

[common]
server_addr = frps服务器ip
server_port = 端口
privilege_token = token
log_file = ./frpc.log
log_level = info
log_max_days = 7

[test]
type = tcp
#需要穿透的ip
local_ip = 127.0.0.1
#需要穿透的端口
local_port = 22
use_compression = true
use_encryption = true
#服务器的端口
remote_port = 61000

openvpn守护进程:
#!/bin/bash

app_dir="/etc/openvpn"
app_dir_bin="${app_dir}/sbin/"
app_ini_dir="${app_dir}/server/"
app_ini="server.conf"
app_num=`ps aux|grep "${app_ini}"|grep -v grep|wc -l`

if test ${app_num} -eq 1 ;then
   exit
else
   ps -ef|grep "${app_ini}"|grep -v grep|cut -c 9-15|xargs kill -9
   nohup ${app_dir_bin}openvpn ${app_ini_dir}${app_ini} &
fi





 

郑重声明:

本站所有活动均为互联网所得,如有侵权请联系本站删除处理

随便看看

文章排行

本栏推荐

栏目更新